diff --git a/Signal/src/ViewControllers/InboxTableViewCell.m b/Signal/src/ViewControllers/InboxTableViewCell.m index 13ec2f167..84ba22ec9 100644 --- a/Signal/src/ViewControllers/InboxTableViewCell.m +++ b/Signal/src/ViewControllers/InboxTableViewCell.m @@ -98,15 +98,19 @@ NS_ASSUME_NONNULL_BEGIN : [UIColor lightGrayColor]), }]]; } - [snippetText appendAttributedString:[[NSAttributedString alloc] initWithString:[[DisplayableTextFilter new] displayableText:thread.lastMessageLabel] - attributes:@{ - NSFontAttributeName : (thread.hasUnreadMessages - ? [UIFont ows_mediumFontWithSize:12] - : [UIFont ows_regularFontWithSize:12]), - NSForegroundColorAttributeName : (thread.hasUnreadMessages - ? [UIColor ows_blackColor] - : [UIColor lightGrayColor]), - }]]; + 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] + : [UIColor lightGrayColor]), + }]]; + } } NSAttributedString *attributedDate = [self dateAttributedString:thread.lastMessageDate];