瀏覽代碼

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

cyberta 4 年之前
父節點
當前提交
8fea14b178
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      deltachat-ios/AppDelegate.swift

+ 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])
             }
         }