Reload data and invalidate layout whenever message view returns from background.

// FREEBIE
pull/1/head
Matthew Chen 7 years ago
parent 5af43580bc
commit 1ac487835a

@ -446,6 +446,10 @@ typedef enum : NSUInteger {
selector:@selector(startExpirationTimerAnimations)
name:UIApplicationWillEnterForegroundNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(resetContentAndLayout)
name:UIApplicationWillEnterForegroundNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(cancelReadTimer)
name:UIApplicationDidEnterBackgroundNotification
@ -525,6 +529,11 @@ typedef enum : NSUInteger {
[self ensureBlockStateIndicator];
[self resetContentAndLayout];
}
- (void)resetContentAndLayout
{
// Avoid layout corrupt issues and out-of-date message subtitles.
[self.collectionView.collectionViewLayout invalidateLayout];
[self.collectionView reloadData];

Loading…
Cancel
Save