From 4b652b62dac1fdb0ae2a335c715f6dbfee24d56d Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Wed, 19 Jul 2023 12:14:27 +0100 Subject: [PATCH] ios: better filtering of notificaitons in NSE (to avoid event notifications) (#2722) --- apps/ios/SimpleX NSE/NotificationService.swift | 2 +- apps/ios/SimpleXChat/ChatTypes.swift | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/apps/ios/SimpleX NSE/NotificationService.swift b/apps/ios/SimpleX NSE/NotificationService.swift index 24f5bc5144..12e9d2517b 100644 --- a/apps/ios/SimpleX NSE/NotificationService.swift +++ b/apps/ios/SimpleX NSE/NotificationService.swift @@ -275,7 +275,7 @@ func receivedMsgNtf(_ res: ChatResponse) async -> (String, NSENotification)? { cItem = autoReceiveFile(file) ?? cItem } let ntf: NSENotification = cInfo.ntfsEnabled ? .nse(notification: createMessageReceivedNtf(user, cInfo, cItem)) : .empty - return cItem.showMutableNotification ? (aChatItem.chatId, ntf) : nil + return cItem.showNotification ? (aChatItem.chatId, ntf) : nil case let .rcvFileSndCancelled(_, aChatItem, _): cleanupFile(aChatItem) return nil diff --git a/apps/ios/SimpleXChat/ChatTypes.swift b/apps/ios/SimpleXChat/ChatTypes.swift index 378a032afe..76d9de821d 100644 --- a/apps/ios/SimpleXChat/ChatTypes.swift +++ b/apps/ios/SimpleXChat/ChatTypes.swift @@ -2064,14 +2064,6 @@ public struct ChatItem: Identifiable, Decodable { return nil } - public var showMutableNotification: Bool { - switch content { - case .rcvCall: return false - case .rcvChatFeature: return false - default: return showNtfDir - } - } - public var memberDisplayName: String? { get { if case let .groupRcv(groupMember) = chatDir {