Merge branch 'hotfix/display-text-crash' into hotfix/2.11.2

pull/1/head
Michael Kirk 9 years ago
commit ee7adca039

@ -98,16 +98,20 @@ NS_ASSUME_NONNULL_BEGIN
: [UIColor lightGrayColor]),
}]];
}
[snippetText appendAttributedString:[[NSAttributedString alloc] initWithString:[[DisplayableTextFilter new] displayableText:thread.lastMessageLabel]
NSString *displayableText = [[DisplayableTextFilter new] displayableText:thread.lastMessageLabel];
if (displayableText) {
[snippetText appendAttributedString:[[NSAttributedString alloc]
initWithString:displayableText
attributes:@{
NSFontAttributeName : (thread.hasUnreadMessages
? [UIFont ows_mediumFontWithSize:12]
: [UIFont ows_regularFontWithSize:12]),
NSForegroundColorAttributeName : (thread.hasUnreadMessages
? [UIColor ows_blackColor]
NSForegroundColorAttributeName :
(thread.hasUnreadMessages ? [UIColor ows_blackColor]
: [UIColor lightGrayColor]),
}]];
}
}
NSAttributedString *attributedDate = [self dateAttributedString:thread.lastMessageDate];
NSUInteger unreadCount = [[TSMessagesManager sharedManager] unreadMessagesInThread:thread];

Loading…
Cancel
Save