Minor refactoring
This commit is contained in:
parent
74ba177250
commit
61dd768e5c
|
@ -144,14 +144,14 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL isAllAttachmentDownloaded = YES;
|
BOOL areAllAttachmentsDownloaded = YES;
|
||||||
for (NSString *attachmentId in self.attachmentIds) {
|
for (NSString *attachmentId in self.attachmentIds) {
|
||||||
TSAttachment *attachment = [TSAttachment fetchObjectWithUniqueID:attachmentId transaction:transaction];
|
TSAttachment *attachment = [TSAttachment fetchObjectWithUniqueID:attachmentId transaction:transaction];
|
||||||
isAllAttachmentDownloaded = isAllAttachmentDownloaded && attachment.isDownloaded;
|
areAllAttachmentsDownloaded = areAllAttachmentsDownloaded && attachment.isDownloaded;
|
||||||
if (!isAllAttachmentDownloaded) break;
|
if (!areAllAttachmentsDownloaded) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isAllAttachmentDownloaded) {
|
if (!areAllAttachmentsDownloaded) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue