Fix “mark as read” logic.

// FREEBIE
pull/1/head
Matthew Chen 9 years ago
parent 6acfab6a50
commit e889f49e3b

@ -242,14 +242,14 @@ NS_ASSUME_NONNULL_BEGIN
} }
// Just to be defensive, we'll also check for unread messages. // Just to be defensive, we'll also check for unread messages.
OWSAssert([self unreadMessagesWithTransaction:transaction].count < 1); OWSAssert([self unseenMessagesWithTransaction:transaction].count < 1);
} }
- (void)markAllAsRead - (void)markAllAsRead
{ {
for (id<OWSReadTracking> message in [self unreadMessages]) { [self.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
[message markAsReadLocally]; [self markAllAsReadWithTransaction:transaction];
} }];
} }
- (TSInteraction *) lastInteraction { - (TSInteraction *) lastInteraction {

Loading…
Cancel
Save