[Gekidou] iOS - Fetch and store data on push notification receipt

This commit is contained in:
Elias Nahum
2021-09-20 17:59:42 -03:00
parent 1c26f14fdb
commit 9ed616afa9
15 changed files with 892 additions and 732 deletions

View File

@@ -73,8 +73,12 @@ class NotificationService: UNNotificationServiceExtension {
}
}
}
Network.default.fetchAndStoreDataForPushNotification(bestAttemptContent, withContentHandler: contentHandler)
if (MattermostBucket.init().getPreference("ApplicationIsForeground") as? String != "true") {
Network.default.fetchAndStoreDataForPushNotification(bestAttemptContent, withContentHandler: contentHandler)
} else if let contentHandler = contentHandler {
contentHandler(bestAttemptContent)
}
}
override func serviceExtensionTimeWillExpire() {