Merge branch 'charlesmchen/messageViewGlitches2'

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

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

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

Loading…
Cancel
Save