summaryrefslogtreecommitdiff
path: root/Juick/Views/MessageCell.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-10-02 11:19:23 +0300
committerGravatar Vitaly Takmazov2019-10-02 11:19:23 +0300
commit0d0fa77e02a22bd7b70069c34f8b9f7308c03efd (patch)
tree74f0507a86bfb3de289cf0b5cfb75984be931a33 /Juick/Views/MessageCell.m
parent0242688672c1c2e34e14471767a98ee108cd6bad (diff)
Unread markers
Diffstat (limited to 'Juick/Views/MessageCell.m')
-rw-r--r--Juick/Views/MessageCell.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/Juick/Views/MessageCell.m b/Juick/Views/MessageCell.m
index 4d53273..90d4ae2 100644
--- a/Juick/Views/MessageCell.m
+++ b/Juick/Views/MessageCell.m
@@ -18,6 +18,8 @@
@implementation MessageCell
+const NSString *unreadMarker = @"●";
+
- (void)awakeFromNib {
[super awakeFromNib];
self.text.textColor = [UIColor colorNamed:@"Text"];
@@ -90,6 +92,12 @@
} else {
self.summary.text = nil;
}
+ if (msg.unread) {
+ self.summary.text = [NSString stringWithFormat:@"%@ %@", unreadMarker, self.summary.text];
+ self.summary.textColor = [UIColor colorNamed:@"Funny"];
+ } else {
+ self.summary.textColor = [UIColor colorNamed:@"Muted"];
+ }
self.text.attributedText = nil;
if (msg.text) {
[self.text setHidden:NO];