ios: fix background refresh (#769)
* ios: fix background refresh * change app inactive check
This commit is contained in:
committed by
GitHub
parent
a8ba4ede82
commit
29c6d51e6a
@@ -61,17 +61,12 @@ class AppDelegate: NSObject, UIApplicationDelegate {
|
||||
completionHandler(.noData)
|
||||
}
|
||||
} else if let checkMessages = ntfData["checkMessages"] as? Bool, checkMessages {
|
||||
// TODO check if app in background
|
||||
logger.debug("AppDelegate: didReceiveRemoteNotification: checkMessages")
|
||||
// TODO remove
|
||||
// NtfManager.shared.notifyCheckingMessages()
|
||||
completionHandler(.noData)
|
||||
// receiveMessages(completionHandler)
|
||||
} else if let smpQueue = ntfData["checkMessage"] as? String {
|
||||
// TODO check if app in background
|
||||
logger.debug("AppDelegate: didReceiveRemoteNotification: checkMessage \(smpQueue)")
|
||||
completionHandler(.noData)
|
||||
// receiveMessages(completionHandler)
|
||||
if isAppInactive() {
|
||||
receiveMessages(completionHandler)
|
||||
} else {
|
||||
completionHandler(.noData)
|
||||
}
|
||||
} else {
|
||||
completionHandler(.noData)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user