From a4d3d58483568641ffc552803b9d85f965ba3d16 Mon Sep 17 00:00:00 2001 From: Avently <7953703+avently@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:34:27 +0700 Subject: [PATCH] simplify --- .../chat/simplex/common/views/chatlist/ChatListView.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 770429c86b..d41866f817 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 @@ -1227,10 +1227,7 @@ private fun filtered(chat: Chat, activeFilter: ActiveFilter?): Boolean = fun presetTagMatchesChat(tag: PresetTagKind, chatInfo: ChatInfo, chatStats: Chat.ChatStats): Boolean = when (tag) { - PresetTagKind.GROUP_REPORTS -> when (chatInfo) { - is ChatInfo.Group -> chatStats.reportsCount > 0 - else -> false - } + PresetTagKind.GROUP_REPORTS -> chatStats.reportsCount > 0 PresetTagKind.FAVORITES -> chatInfo.chatSettings?.favorite == true PresetTagKind.CONTACTS -> when (chatInfo) { is ChatInfo.Direct -> !(chatInfo.contact.activeConn == null && chatInfo.contact.profile.contactLink != null && chatInfo.contact.active) && !chatInfo.contact.chatDeleted