Fixed handling update read inbox

This commit is contained in:
Igor Zhukov 2015-12-07 22:25:49 +03:00
parent 74fd5ccad3
commit 192288dbc7

View File

@ -2751,6 +2751,13 @@ angular.module('myApp.services')
}
}
}
if (!isOut && foundDialog) {
if (newUnreadCount &&
foundDialog[0].top_message <= maxID) {
newUnreadCount = foundDialog[0].unread_count = 0;
}
foundDialog[0].read_inbox_max_id = maxID;
}
if (newUnreadCount !== false) {
$rootScope.$broadcast('dialog_unread', {peerID: peerID, count: newUnreadCount});