Merge pull request #411 from RyanRory/expiration-timer-fix

Fix Expiration Timer Issues
This commit is contained in:
Niels Andriesse 2021-05-20 16:20:58 +10:00 committed by GitHub
commit 74ba177250
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -354,6 +354,7 @@ final class ConversationVC : BaseVC, ConversationViewModelDelegate, OWSConversat
// the previous value when the keyboard is shown.
self.messagesTableView.reloadData()
}
self.markAllAsRead()
}
if shouldAnimate {
messagesTableView.performBatchUpdates(batchUpdates, completion: batchUpdatesCompletion)

View File

@ -144,6 +144,17 @@ NS_ASSUME_NONNULL_BEGIN
return;
}
BOOL isAllAttachmentDownloaded = YES;
for (NSString *attachmentId in self.attachmentIds) {
TSAttachment *attachment = [TSAttachment fetchObjectWithUniqueID:attachmentId transaction:transaction];
isAllAttachmentDownloaded = isAllAttachmentDownloaded && attachment.isDownloaded;
if (!isAllAttachmentDownloaded) break;
}
if (!isAllAttachmentDownloaded) {
return;
}
_read = YES;
[self saveWithTransaction:transaction];