Commit c9e031e1 authored by Deuteu's avatar Deuteu

Fix num_unread*2 on minimized chat

When chat was minimized the counter num_unread of unread message was increment when receiving a compose message so the number of unread messages was doubled.
parent 7e42783c
......@@ -3034,7 +3034,9 @@
},
initialize: function () {
this.model.messages.on('add', this.updateUnreadMessagesCounter, this);
this.model.messages.on('add', function(msg) {
if (!msg.attributes.composing) {this.updateUnreadMessagesCounter();}
} , this);
this.model.on('showSentOTRMessage', this.updateUnreadMessagesCounter, this);
this.model.on('showReceivedOTRMessage', this.updateUnreadMessagesCounter, this);
this.model.on('change:minimized', this.clearUnreadMessagesCounter, this);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment