Mark conversation as read if open and window focused
Messages that are received in the active conversation while the window is focused, are automatically marked as read. The conversation appears as unread for a split second as the incoming message arrives but it gets marked as read as soon as the message is displayed.
This commit is contained in:
@@ -30,9 +30,10 @@
|
||||
updateUnreadCount: function(model, count) {
|
||||
var prev = model.previous('unreadCount') || 0;
|
||||
var newUnreadCount = storage.get("unreadCount", 0) - (prev - count);
|
||||
setUnreadCount(newUnreadCount);
|
||||
storage.remove("unreadCount");
|
||||
storage.put("unreadCount", newUnreadCount);
|
||||
|
||||
setUnreadCount(newUnreadCount);
|
||||
}
|
||||
}))();
|
||||
|
||||
|
Reference in New Issue
Block a user