Skip to content
This repository was archived by the owner on Jun 7, 2020. It is now read-only.

Commit 7861286

Browse files
authored
Merge pull request #2618 from RocketChat/chore/ui_adjustments_requested_by_gabriel
[CHORE] UI adjustments on the list of chats
2 parents ecad166 + b8573f7 commit 7861286

4 files changed

Lines changed: 22 additions & 7 deletions

File tree

Rocket.Chat.ShareExtension/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>3.4.0</string>
2121
<key>CFBundleVersion</key>
22-
<string>245</string>
22+
<string>247</string>
2323
<key>ITSEncryptionExportComplianceCode</key>
2424
<string></string>
2525
<key>NSExtension</key>

Rocket.Chat/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
</dict>
223223
</array>
224224
<key>CFBundleVersion</key>
225-
<string>245</string>
225+
<string>247</string>
226226
<key>Fabric</key>
227227
<dict>
228228
<key>APIKey</key>

Rocket.Chat/Views/Cells/Subscription/BaseSubscriptionCell.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ class BaseSubscriptionCell: SwipeTableViewCell, SubscriptionCellProtocol {
109109
labelUnread.text = "\(subscription.unread)"
110110
}
111111
} else {
112-
viewUnread.isHidden = false
113-
labelUnread.text = "!"
112+
viewUnread.isHidden = true
114113
}
115114
}
116115

Rocket.Chat/Views/Cells/Subscription/SubscriptionCell.swift

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,37 @@ final class SubscriptionCell: BaseSubscriptionCell {
4242

4343
super.updateSubscriptionInformation()
4444

45+
setLastMessageColor()
4546
setDateColor()
4647
}
4748

4849
override func updateViewForAlert(with subscription: Subscription) {
4950
super.updateViewForAlert(with: subscription)
51+
labelDate.font = UIFont.systemFont(ofSize: labelDate.font.pointSize, weight: .bold)
5052
labelLastMessage.font = UIFont.systemFont(ofSize: labelLastMessage.font.pointSize, weight: .medium)
5153
}
5254

5355
override func updateViewForNoAlert(with subscription: Subscription) {
5456
super.updateViewForNoAlert(with: subscription)
57+
labelDate.font = UIFont.systemFont(ofSize: labelDate.font.pointSize, weight: .regular)
5558
labelLastMessage.font = UIFont.systemFont(ofSize: labelLastMessage.font.pointSize, weight: .regular)
5659
}
5760

61+
private func setLastMessageColor() {
62+
guard
63+
let theme = theme,
64+
let subscription = subscription?.managedObject
65+
else {
66+
return
67+
}
68+
69+
if subscription.unread > 0 || subscription.alert {
70+
labelLastMessage.textColor = theme.bodyText
71+
} else {
72+
labelLastMessage.textColor = theme.auxiliaryText
73+
}
74+
}
75+
5876
private func setDateColor() {
5977
guard
6078
let theme = theme,
@@ -90,9 +108,7 @@ final class SubscriptionCell: BaseSubscriptionCell {
90108
extension SubscriptionCell {
91109
override func applyTheme() {
92110
super.applyTheme()
93-
guard let theme = theme else { return }
94-
95-
labelLastMessage.textColor = theme.auxiliaryText
111+
setLastMessageColor()
96112
setDateColor()
97113
}
98114
}

0 commit comments

Comments
 (0)