Do not batch single saveMessage calls after start-up

This commit is contained in:
Josh Perez 2021-03-10 22:21:21 -05:00 committed by Josh Perez
parent 80e3582d01
commit 0bd3c78187
7 changed files with 31 additions and 9 deletions

View file

@ -1163,7 +1163,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
referencedMessageNotFound: false,
},
});
window.Signal.Util.updateMessageBatcher.add(this.attributes);
window.Signal.Util.queueUpdateMessage(this.attributes);
}
}
@ -1959,7 +1959,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
window.Whisper.Notifications.removeBy({ messageId: this.id });
if (!skipSave) {
window.Signal.Util.updateMessageBatcher.add(this.attributes);
window.Signal.Util.queueUpdateMessage(this.attributes);
}
}
@ -2008,7 +2008,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
const id = this.get('id');
if (id && !skipSave) {
window.Signal.Util.updateMessageBatcher.add(this.attributes);
window.Signal.Util.queueUpdateMessage(this.attributes);
}
}
}