Merge branch 'charlesmchen/messageViewGlitches2'

pull/1/head
Matthew Chen 7 years ago
commit 255b3023f5

@ -48,6 +48,11 @@ NS_ASSUME_NONNULL_BEGIN
[DebugUITableViewController sendTextMessage:100
thread:thread];
}],
[OWSTableItem itemWithTitle:@"Send 1,000 messages (1/sec.)"
actionBlock:^{
[DebugUITableViewController sendTextMessage:1000
thread:thread];
}],
[OWSTableItem itemWithTitle:@"Send text/x-signal-plain"
actionBlock:^{
[DebugUITableViewController sendOversizeTextMessage:thread];

@ -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