diff options
author | Vitaly Takmazov | 2017-09-27 22:24:38 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-09-27 22:24:38 +0300 |
commit | 6499148cb3f62e20534b62c181125ebeacfa3438 (patch) | |
tree | 3aa289caa409366e70dd1802d67df61903fa992b /Juick/Views/MessageCell.m | |
parent | 25bc4f1357252dc0aeee70f0a638a4226231d5fb (diff) |
cleanup
Diffstat (limited to 'Juick/Views/MessageCell.m')
-rw-r--r-- | Juick/Views/MessageCell.m | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Juick/Views/MessageCell.m b/Juick/Views/MessageCell.m index 2aae74b..cc35446 100644 --- a/Juick/Views/MessageCell.m +++ b/Juick/Views/MessageCell.m @@ -7,6 +7,9 @@ // #import "MessageCell.h" +@import YYWebImage; +@import DateTools; +@import MWFeedParser; #import "ColorScheme.h" @implementation MessageCell @@ -19,12 +22,6 @@ (id)kCTUnderlineStyleAttributeName : [NSNumber numberWithInt:NSUnderlineStyleSingle] }; } -- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - - // Configure the view for the selected state -} - - (void) setMessage:(Message *)msg { _message = msg; self.avatar.yy_imageURL = [NSURL URLWithString:[NSString stringWithFormat:@"https://i.juick.com/a/%d.png", [msg.user.uid intValue]]]; @@ -45,9 +42,11 @@ self.summary.text = nil; } self.text.text = [msg.text stringByDecodingHTMLEntities]; + [self.tags removeAllTags]; if ([msg.tags count] > 0) { - self.text.text = [[NSString alloc] initWithFormat:@"%@\n%@", [msg.tags componentsJoinedByString:@", "], - [msg.text stringByDecodingHTMLEntities]]; + [msg.tags enumerateObjectsUsingBlock:^(NSString * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + [self.tags addTag:obj]; + }]; } } |