Move to MessageCache.saveMessage, queue downloads piecemeal
This commit is contained in:
parent
197660a966
commit
ed30059bd5
32 changed files with 138 additions and 298 deletions
|
@ -124,12 +124,11 @@ export async function onSync(sync: ViewSyncAttributesType): Promise<void> {
|
|||
|
||||
const attachments = message.get('attachments');
|
||||
if (!attachments?.every(isDownloaded)) {
|
||||
const updatedFields = await queueAttachmentDownloads(
|
||||
message.attributes,
|
||||
{ urgency: AttachmentDownloadUrgency.STANDARD }
|
||||
);
|
||||
if (updatedFields) {
|
||||
message.set(updatedFields);
|
||||
const didQueueDownload = await queueAttachmentDownloads(message, {
|
||||
urgency: AttachmentDownloadUrgency.STANDARD,
|
||||
});
|
||||
if (didQueueDownload) {
|
||||
didChangeMessage = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue