From 5fd8e6e4fec6120ff6d2d35bc109d3ba8636f335 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Tue, 12 Mar 2024 17:33:28 +0000 Subject: [PATCH] ui: exclude muted chats from filtered chats (#3900) --- apps/ios/Shared/Views/ChatList/ChatListView.swift | 4 +++- .../kotlin/chat/simplex/common/views/chatlist/ChatListView.kt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/ios/Shared/Views/ChatList/ChatListView.swift b/apps/ios/Shared/Views/ChatList/ChatListView.swift index 22807f6182..38aabdc21d 100644 --- a/apps/ios/Shared/Views/ChatList/ChatListView.swift +++ b/apps/ios/Shared/Views/ChatList/ChatListView.swift @@ -264,7 +264,9 @@ struct ChatListView: View { } func filtered(_ chat: Chat) -> Bool { - (chat.chatInfo.chatSettings?.favorite ?? false) || chat.chatStats.unreadCount > 0 || chat.chatStats.unreadChat + (chat.chatInfo.chatSettings?.favorite ?? false) || + chat.chatStats.unreadChat || + (chat.chatInfo.ntfsEnabled && chat.chatStats.unreadCount > 0) } func viewNameContains(_ cInfo: ChatInfo, _ s: String) -> Bool { diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt index 1380f9ccc4..417050db35 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt @@ -535,7 +535,9 @@ private fun filteredChats( } private fun filtered(chat: Chat): Boolean = - (chat.chatInfo.chatSettings?.favorite ?: false) || chat.chatStats.unreadCount > 0 || chat.chatStats.unreadChat + (chat.chatInfo.chatSettings?.favorite ?: false) || + chat.chatStats.unreadChat || + (chat.chatInfo.ntfsEnabled && chat.chatStats.unreadCount > 0) private fun viewNameContains(cInfo: ChatInfo, s: String): Boolean = cInfo.chatViewName.lowercase().contains(s.lowercase())