Better completetion

This commit is contained in:
kevinzhow
2015-10-24 18:50:13 +08:00
parent b3964ae7b3
commit 2e9ebfa5e1
+1 -3
View File
@@ -219,7 +219,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return
}
syncUnreadMessages() {
completionHandler(UIBackgroundFetchResult.NewData)
APService.handleRemoteNotification(userInfo)
}
@@ -227,7 +226,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
officialMessages { messagesCount in
println("new officialMessages count: \(messagesCount)")
completionHandler(UIBackgroundFetchResult.NewData)
APService.handleRemoteNotification(userInfo)
}
@@ -235,13 +233,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
if let subType = userInfo["subtype"] as? String {
if subType == "accepted" {
syncFriendshipsAndDoFurtherAction {
completionHandler(UIBackgroundFetchResult.NewData)
APService.handleRemoteNotification(userInfo)
}
}
}
}
completionHandler(UIBackgroundFetchResult.NewData)
//
if application.applicationState != .Active {
self.remoteNotificationType = remoteNotificationType