mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Move to MessageCache.saveMessage, queue downloads piecemeal
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user