Ensure message is saved after queueing attachment downloads
This commit is contained in:
parent
f363836ab5
commit
d18888a53d
2 changed files with 4 additions and 9 deletions
|
@ -180,18 +180,11 @@ export class AttachmentDownloadManager extends JobManager<CoreAttachmentDownload
|
||||||
|
|
||||||
const newJob = parseResult.data;
|
const newJob = parseResult.data;
|
||||||
|
|
||||||
const { isAlreadyRunning } = await this._addJob(newJob, {
|
await this._addJob(newJob, {
|
||||||
forceStart: urgency === AttachmentDownloadUrgency.IMMEDIATE,
|
forceStart: urgency === AttachmentDownloadUrgency.IMMEDIATE,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isAlreadyRunning) {
|
return attachment;
|
||||||
return attachment;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
...attachment,
|
|
||||||
pending: !this.params.shouldHoldOffOnStartingQueuedJobs?.(),
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateVisibleTimelineMessages(messageIds: Array<string>): void {
|
updateVisibleTimelineMessages(messageIds: Array<string>): void {
|
||||||
|
|
|
@ -1348,6 +1348,8 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.set(value);
|
this.set(value);
|
||||||
|
queueUpdateMessage(this.attributes);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue