Merge branch 'charlesmchen/readReceiptsVsOlderMessages2'

pull/1/head
Matthew Chen 8 years ago
commit 9168512058

@ -90,6 +90,10 @@ NSString *const OWSReadReceiptsProcessorMarkedMessageAsReadNotification =
// Mark all unread messages in this thread that are older than message specified in the read // Mark all unread messages in this thread that are older than message specified in the read
// receipt. // receipt.
NSMutableArray<id<OWSReadTracking>> *interactionsToMarkAsRead = [NSMutableArray new]; NSMutableArray<id<OWSReadTracking>> *interactionsToMarkAsRead = [NSMutableArray new];
// Always mark the message specified by the read receipt as read.
[interactionsToMarkAsRead addObject:message];
[self.storageManager.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) { [self.storageManager.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
[[transaction ext:TSUnseenDatabaseViewExtensionName] [[transaction ext:TSUnseenDatabaseViewExtensionName]
enumerateRowsInGroup:message.uniqueThreadId enumerateRowsInGroup:message.uniqueThreadId

Loading…
Cancel
Save