Minor refactoring

This commit is contained in:
Niels Andriesse 2021-05-20 16:22:11 +10:00
parent 74ba177250
commit 61dd768e5c
1 changed files with 4 additions and 4 deletions

View File

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