Redraw message bubbles when corner state changes.

This commit is contained in:
Matthew Chen 2019-03-15 16:25:59 -04:00
parent 467c25db06
commit 6cc28bdf8f
1 changed files with 26 additions and 0 deletions

View File

@ -283,6 +283,32 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType)
[self clearCachedLayoutState];
}
- (void)setIsFirstInCluster:(BOOL)isFirstInCluster
{
if (_isFirstInCluster == isFirstInCluster) {
return;
}
_isFirstInCluster = isFirstInCluster;
// Although this doesn't affect layout size, the view model use
// hasCachedLayoutState to detect which cells needs to be redrawn due to changes.
[self clearCachedLayoutState];
}
- (void)setIsLastInCluster:(BOOL)isLastInCluster
{
if (_isLastInCluster == isLastInCluster) {
return;
}
_isLastInCluster = isLastInCluster;
// Although this doesn't affect layout size, the view model use
// hasCachedLayoutState to detect which cells needs to be redrawn due to changes.
[self clearCachedLayoutState];
}
- (void)setUnreadIndicator:(nullable OWSUnreadIndicator *)unreadIndicator
{
if ([NSObject isNullableObject:_unreadIndicator equalTo:unreadIndicator]) {