From 1f65572f30194f48c6c550fe64df6860cdbc03c8 Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Tue, 28 Sep 2021 15:19:14 +1000 Subject: [PATCH] don't wait for 5s to fire the local PN --- Session/Notifications/UserNotificationsAdaptee.swift | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Session/Notifications/UserNotificationsAdaptee.swift b/Session/Notifications/UserNotificationsAdaptee.swift index 45b9c2a5c..8d8b6ec21 100644 --- a/Session/Notifications/UserNotificationsAdaptee.swift +++ b/Session/Notifications/UserNotificationsAdaptee.swift @@ -108,15 +108,6 @@ extension UserNotificationPresenterAdaptee: NotificationPresenterAdaptee { cancelNotification(identifier: notificationIdentifier) } - let trigger: UNNotificationTrigger? - let checkForCancel = category == .incomingMessage - if checkForCancel { - assert(userInfo[AppNotificationUserInfoKey.threadId] != nil) - trigger = UNTimeIntervalNotificationTrigger(timeInterval: kNotificationDelayForRemoteRead, repeats: false) - } else { - trigger = nil - } - if shouldPresentNotification(category: category, userInfo: userInfo) { if let displayableTitle = title?.filterForDisplay { content.title = displayableTitle @@ -129,7 +120,7 @@ extension UserNotificationPresenterAdaptee: NotificationPresenterAdaptee { Logger.debug("supressing notification body") } - let request = UNNotificationRequest(identifier: notificationIdentifier, content: content, trigger: trigger) + let request = UNNotificationRequest(identifier: notificationIdentifier, content: content, trigger: nil) Logger.debug("presenting notification with identifier: \(notificationIdentifier)") notificationCenter.add(request)