From 13cf1cc0049a1d7a9dedffb2743ba8c994f1aa75 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Fri, 14 Apr 2023 23:54:05 +0200 Subject: [PATCH] ios: mute groups instantly when notifications are disabled (#2187) --- apps/ios/SimpleX NSE/NotificationService.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/ios/SimpleX NSE/NotificationService.swift b/apps/ios/SimpleX NSE/NotificationService.swift index 10c9a5945d..5a015d9e5b 100644 --- a/apps/ios/SimpleX NSE/NotificationService.swift +++ b/apps/ios/SimpleX NSE/NotificationService.swift @@ -291,7 +291,8 @@ func receivedMsgNtf(_ res: ChatResponse) async -> (String, NSENotification)? { cItem = apiReceiveFile(fileId: file.fileId)?.chatItem ?? cItem } } - return cItem.showMutableNotification ? (aChatItem.chatId, .nse(notification: createMessageReceivedNtf(user, cInfo, cItem))) : nil + let ntf: NSENotification = cInfo.ntfsEnabled ? .nse(notification: createMessageReceivedNtf(user, cInfo, cItem)) : .empty + return cItem.showMutableNotification ? (aChatItem.chatId, ntf) : nil case let .rcvFileSndCancelled(_, aChatItem, _): cleanupFile(aChatItem) return nil