Drop extraneous db query
This commit is contained in:
parent
598513e037
commit
4c6c869c86
1 changed files with 5 additions and 3 deletions
|
@ -1573,12 +1573,14 @@ export class ConversationModel extends window.Backbone
|
|||
window.Signal.Data.updateConversation(this.attributes);
|
||||
}
|
||||
|
||||
incrementSentMessageCount(): void {
|
||||
incrementSentMessageCount({ save = true }: { save?: boolean } = {}): void {
|
||||
this.set({
|
||||
messageCount: (this.get('messageCount') || 0) + 1,
|
||||
sentMessageCount: (this.get('sentMessageCount') || 0) + 1,
|
||||
});
|
||||
window.Signal.Data.updateConversation(this.attributes);
|
||||
if (save) {
|
||||
window.Signal.Data.updateConversation(this.attributes);
|
||||
}
|
||||
}
|
||||
|
||||
decrementSentMessageCount(): void {
|
||||
|
@ -3714,7 +3716,7 @@ export class ConversationModel extends window.Backbone
|
|||
isArchived: false,
|
||||
});
|
||||
|
||||
this.incrementSentMessageCount();
|
||||
this.incrementSentMessageCount({ save: false });
|
||||
|
||||
const renderDuration = Date.now() - renderStart;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue