|
|
@ -3250,18 +3250,13 @@ typedef enum : NSUInteger {
|
|
|
|
// We want to relayout our contents using the old message mappings and
|
|
|
|
// We want to relayout our contents using the old message mappings and
|
|
|
|
// view items before they are updated.
|
|
|
|
// view items before they are updated.
|
|
|
|
[self.collectionView layoutIfNeeded];
|
|
|
|
[self.collectionView layoutIfNeeded];
|
|
|
|
// ENDHACK to work around radar #28167779)
|
|
|
|
// ENDHACK to work around radar #28167779
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)uiDatabaseDidUpdate:(NSNotification *)notification
|
|
|
|
- (void)uiDatabaseDidUpdate:(NSNotification *)notification
|
|
|
|
{
|
|
|
|
{
|
|
|
|
OWSAssertIsOnMainThread();
|
|
|
|
OWSAssertIsOnMainThread();
|
|
|
|
|
|
|
|
|
|
|
|
DDLogInfo(@"%@ uiDatabaseDidUpdate, connection snapshot: %llu, mappings snapshot: %llu.",
|
|
|
|
|
|
|
|
self.logTag,
|
|
|
|
|
|
|
|
self.uiDatabaseConnection.snapshot,
|
|
|
|
|
|
|
|
self.messageMappings.snapshotOfLastUpdate);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!self.shouldObserveDBModifications) {
|
|
|
|
if (!self.shouldObserveDBModifications) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -4875,11 +4870,6 @@ typedef enum : NSUInteger {
|
|
|
|
// Returns NO on error.
|
|
|
|
// Returns NO on error.
|
|
|
|
- (BOOL)reloadViewItems
|
|
|
|
- (BOOL)reloadViewItems
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DDLogInfo(@"%@ reloadViewItems, connection snapshot: %llu, mappings snapshot: %llu.",
|
|
|
|
|
|
|
|
self.logTag,
|
|
|
|
|
|
|
|
self.uiDatabaseConnection.snapshot,
|
|
|
|
|
|
|
|
self.messageMappings.snapshotOfLastUpdate);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NSMutableArray<ConversationViewItem *> *viewItems = [NSMutableArray new];
|
|
|
|
NSMutableArray<ConversationViewItem *> *viewItems = [NSMutableArray new];
|
|
|
|
NSMutableDictionary<NSString *, ConversationViewItem *> *viewItemCache = [NSMutableDictionary new];
|
|
|
|
NSMutableDictionary<NSString *, ConversationViewItem *> *viewItemCache = [NSMutableDictionary new];
|
|
|
|
|
|
|
|
|
|
|
|