Merge branch 'charlesmchen/maxUnreadCounts'

pull/1/head
Matthew Chen 7 years ago
commit f5387efba3

@ -3828,7 +3828,10 @@ typedef enum : NSUInteger {
_backButtonUnreadCountView.hidden = unreadCount <= 0;
OWSAssert(_backButtonUnreadCountLabel != nil);
_backButtonUnreadCountLabel.text = [NSString stringWithFormat:@"%lu", (unsigned long)unreadCount];
// Max out the unread count at 99+.
const NSUInteger kMaxUnreadCount = 99;
_backButtonUnreadCountLabel.text = [@(MIN(kMaxUnreadCount, unreadCount)) stringValue];
}
#pragma mark 3D Touch Preview Actions

@ -218,7 +218,9 @@ const NSUInteger kContactPictureViewDiameter = 52;
[_messageCounter addSubview:_unreadLabel];
}
_unreadLabel.text = [[NSNumber numberWithUnsignedInteger:unreadMessages] stringValue];
// Max out the unread count at 99+.
const NSUInteger kMaxUnreadCount = 99;
_unreadLabel.text = [@(MIN(kMaxUnreadCount, unreadMessages)) stringValue];
[_unreadLabel sizeToFit];
CGPoint offset = CGPointMake(0.0f, 5.0f);

Loading…
Cancel
Save