Fix “mark as read” logic.

// FREEBIE
pull/1/head
Matthew Chen 8 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.
OWSAssert([self unreadMessagesWithTransaction:transaction].count < 1);
OWSAssert([self unseenMessagesWithTransaction:transaction].count < 1);
}
- (void)markAllAsRead
{
for (id<OWSReadTracking> message in [self unreadMessages]) {
[message markAsReadLocally];
}
[self.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
[self markAllAsReadWithTransaction:transaction];
}];
}
- (TSInteraction *) lastInteraction {

Loading…
Cancel
Save