From 192288dbc75c8b0b289b901717ce6c626033df52 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Mon, 7 Dec 2015 22:25:49 +0300 Subject: [PATCH] Fixed handling update read inbox --- app/js/messages_manager.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/js/messages_manager.js b/app/js/messages_manager.js index a8472902..0fdb8571 100644 --- a/app/js/messages_manager.js +++ b/app/js/messages_manager.js @@ -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});