Remove messages which are read from the notification
This commit is contained in:
Georg Semmler 2015-11-25 23:03:53 +01:00 committed by lilia
parent 5a71d150aa
commit 1a6cedac56

View file

@ -175,6 +175,12 @@
markRead: function() {
if (this.get('unreadCount') > 0) {
this.save({unreadCount: 0});
var conversationId = this.id;
Whisper.Notifications.remove(
Whisper.Notifications.models.filter(
function(model){
return model.attributes.conversationId===conversationId;
}));
}
},