From c07a9fa85cb4f0722069448bbf351ded14797b42 Mon Sep 17 00:00:00 2001 From: Dmitrii Vlasenko Date: Mon, 11 Dec 2017 22:06:05 +0500 Subject: [PATCH] Do not count muted conversations as unread --- legacy/TelegraphKit/TGDatabase.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/TelegraphKit/TGDatabase.mm b/legacy/TelegraphKit/TGDatabase.mm index 1737d413a..015710c7e 100644 --- a/legacy/TelegraphKit/TGDatabase.mm +++ b/legacy/TelegraphKit/TGDatabase.mm @@ -17313,7 +17313,7 @@ - (void)transactionAddMessages:(NSArray *)initialAddMessages __block int32_t updatedUnreadCount = 0; [peers enumerateKeysAndObjectsUsingBlock:^(__unused NSNumber *nPeerId, TGConversation *conversation, __unused BOOL *stop) { - if (!TGPeerIdIsChannel(conversation.conversationId)) { + if (!TGPeerIdIsChannel(conversation.conversationId) && ![TGDatabaseInstance() isPeerMuted:conversation.conversationId]) { updatedUnreadCount += conversation.unreadCount; } }];