diff --git a/Podfile.lock b/Podfile.lock index 41098adeb..673f22e9e 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -140,7 +140,7 @@ CHECKOUT OPTIONS: :commit: 919d541d6b8a8802a94f943026b8f68394e2c0b8 :git: https://github.com/WhisperSystems/SignalProtocolKit.git SignalServiceKit: - :commit: 653727ae9f00d6b7dec5c92813a295ae0bccbe91 + :commit: 311d80fb2e8b8f2a0170a956b6964e2b6c7d0155 :git: https://github.com/WhisperSystems/SignalServiceKit.git SocketRocket: :commit: 41b57bb2fc292a814f758441a05243eb38457027 diff --git a/Signal/src/view controllers/MessagesViewController.m b/Signal/src/view controllers/MessagesViewController.m index f8152ba7a..2f66e7c44 100644 --- a/Signal/src/view controllers/MessagesViewController.m +++ b/Signal/src/view controllers/MessagesViewController.m @@ -189,6 +189,8 @@ typedef enum : NSUInteger { isGroupConversation = [self.thread isKindOfClass:[TSGroupThread class]]; _composeOnOpen = keyboardAppearing; + [self markAllMessagesAsRead]; + [self.uiDatabaseConnection beginLongLivedReadTransaction]; self.messageMappings = [[YapDatabaseViewMappings alloc] initWithGroups:@[ thread.uniqueId ] view:TSMessageDatabaseViewExtensionName]; @@ -196,7 +198,6 @@ typedef enum : NSUInteger { [self.messageMappings updateWithTransaction:transaction]; self.page = 0; [self updateRangeOptionsForPage:self.page]; - [self markAllMessagesAsRead]; [self.collectionView reloadData]; }]; [self updateLoadEarlierVisible];