Enable more specific AttachmentDownload prioritization
This commit is contained in:
parent
87ea909ae9
commit
fc02762588
26 changed files with 2245 additions and 817 deletions
|
@ -16,6 +16,7 @@ import { notificationService } from '../services/notifications';
|
|||
import { queueAttachmentDownloads } from '../util/queueAttachmentDownloads';
|
||||
import { queueUpdateMessage } from '../util/messageBatcher';
|
||||
import { generateCacheKey } from './generateCacheKey';
|
||||
import { AttachmentDownloadUrgency } from '../jobs/AttachmentDownloadManager';
|
||||
|
||||
export type ViewSyncAttributesType = {
|
||||
envelopeId: string;
|
||||
|
@ -127,7 +128,8 @@ export async function onSync(sync: ViewSyncAttributesType): Promise<void> {
|
|||
const attachments = message.get('attachments');
|
||||
if (!attachments?.every(isDownloaded)) {
|
||||
const updatedFields = await queueAttachmentDownloads(
|
||||
message.attributes
|
||||
message.attributes,
|
||||
AttachmentDownloadUrgency.STANDARD
|
||||
);
|
||||
if (updatedFields) {
|
||||
message.set(updatedFields);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue