Update conversation.unreadCount in just one place, from database
This commit is contained in:
parent
a9c788b689
commit
d4e0f6a38d
3 changed files with 12 additions and 6 deletions
|
@ -2647,6 +2647,8 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
|
||||
window.Whisper.events.trigger('incrementProgress');
|
||||
confirm();
|
||||
|
||||
conversation.queueJob('updateUnread', () => conversation.updateUnread());
|
||||
}
|
||||
|
||||
// This function is called twice - once from handleDataMessage, and then again from
|
||||
|
@ -2776,7 +2778,6 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
);
|
||||
} else if (isFirstRun && !isGroupStoryReply) {
|
||||
conversation.set({
|
||||
unreadCount: (conversation.get('unreadCount') || 0) + 1,
|
||||
isArchived: false,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue