|
@@ -145,6 +145,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
self.pushToDebugArray("📡'")
|
|
self.pushToDebugArray("📡'")
|
|
logger.info("Notifications: remoteNotification: \(String(describing: notificationOption))")
|
|
logger.info("Notifications: remoteNotification: \(String(describing: notificationOption))")
|
|
increaseDebugCounter("notify-remote-launch")
|
|
increaseDebugCounter("notify-remote-launch")
|
|
|
|
+ performFetch(completionHandler: dummyCompletionHandler)
|
|
}
|
|
}
|
|
|
|
|
|
if dcAccounts.getSelected().isConfigured() && !UserDefaults.standard.bool(forKey: "notifications_disabled") {
|
|
if dcAccounts.getSelected().isConfigured() && !UserDefaults.standard.bool(forKey: "notifications_disabled") {
|
|
@@ -158,6 +159,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
return true
|
|
return true
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ func dummyCompletionHandler(_ result: UIBackgroundFetchResult) {
|
|
|
|
+ }
|
|
|
|
+
|
|
// `open` is called when an url should be opened by Delta Chat.
|
|
// `open` is called when an url should be opened by Delta Chat.
|
|
// we currently use that for handling oauth2 and for handing openpgp4fpr.
|
|
// we currently use that for handling oauth2 and for handing openpgp4fpr.
|
|
//
|
|
//
|
|
@@ -587,7 +591,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|
UserDefaults.standard.set(nowTimestamp, forKey: name + "-last")
|
|
UserDefaults.standard.set(nowTimestamp, forKey: name + "-last")
|
|
|
|
|
|
// Values calculated for connectivity view
|
|
// Values calculated for connectivity view
|
|
- if name == "notify-remote-receive" || name == "notify-local-wakeup" {
|
|
|
|
|
|
+ if name == "notify-remote-receive" || name == "notify-remote-launch" || name == "notify-local-wakeup" {
|
|
let timestamps = UserDefaults.standard.array(forKey: Constants.Keys.notificationTimestamps)
|
|
let timestamps = UserDefaults.standard.array(forKey: Constants.Keys.notificationTimestamps)
|
|
var slidingTimeframe: [Double]
|
|
var slidingTimeframe: [Double]
|
|
if timestamps != nil, let timestamps = timestamps as? [Double] {
|
|
if timestamps != nil, let timestamps = timestamps as? [Double] {
|