summaryrefslogtreecommitdiff
path: root/Juick/Views/BubbleMessageCell.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-10-21 18:30:00 +0300
committerGravatar Vitaly Takmazov2018-10-21 18:30:00 +0300
commitd958a11cc1618e080b9aab9a0b84c942afd7012a (patch)
treed4b7b6985fba50d2f6005dddeaec00ea5c385aa2 /Juick/Views/BubbleMessageCell.m
parentc3bd91b2f6b02107322603487094f26259a16703 (diff)
Chat styling
Diffstat (limited to 'Juick/Views/BubbleMessageCell.m')
-rw-r--r--Juick/Views/BubbleMessageCell.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/Juick/Views/BubbleMessageCell.m b/Juick/Views/BubbleMessageCell.m
index 51fbaa2..42b6019 100644
--- a/Juick/Views/BubbleMessageCell.m
+++ b/Juick/Views/BubbleMessageCell.m
@@ -22,7 +22,11 @@
// Configure the view for the selected state
}
--(void) configureWithMessage:(Message *)message {
+-(void) configureWithMessage:(Message *)message isMe:(BOOL)isMe {
+ self.message.backgroundColor = isMe ? [ColorScheme secondaryBackground] : [ColorScheme mainBackground];
+ self.message.textColor = isMe ? [UIColor whiteColor] : [ColorScheme textColor];
+ self.message.linkAttributes = @{ (id)kCTForegroundColorAttributeName: isMe ? [UIColor whiteColor] : [ColorScheme linkColor],
+ (id)kCTUnderlineStyleAttributeName : [NSNumber numberWithInt:NSUnderlineStyleSingle] };
self.name.text = message.user.uname;
self.message.text = message.text;
self.unreadMarker.text = @"";
@@ -37,8 +41,6 @@
completion:nil];
} failure:nil];
self.message.enabledTextCheckingTypes = NSTextCheckingTypeLink;
- self.message.backgroundColor = [ColorScheme mainBackground];
- self.message.layer.cornerRadius = 4;
self.message.clipsToBounds = YES;
self.message.textInsets = UIEdgeInsetsMake(4.0f, 8.0f, 4.0f, 8.0f);
}