Эх сурвалжийг харах

delete foreground notifications after 4 seconds, so the user has more time to tap on the notification

cyberta 4 жил өмнө
parent
commit
8fea14b178

+ 2 - 2
deltachat-ios/AppDelegate.swift

@@ -279,9 +279,9 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
     }
 
     func userNotificationCenter(_: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
-        //remove foreground notifications after 3 seconds
+        //remove foreground notifications after 4 seconds
         if notification.request.identifier == Constants.notificationIdentifier {
-            DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+            DispatchQueue.main.asyncAfter(deadline: .now() + 4) {
                 UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: [notification.request.identifier])
             }
         }