summaryrefslogtreecommitdiff
path: root/Juick/Views/MessageCell.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Views/MessageCell.m')
-rw-r--r--Juick/Views/MessageCell.m15
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];
+ }];
}
}