TF-1812 Handle add sending email to queue in work manager

(cherry picked from commit c5d89665f525550949bf4e694133ce5ea2777846)
This commit is contained in:
dab246
2023-05-26 08:51:16 +07:00
committed by Dat Vu
parent c98be4cfc5
commit fc94e0aa04
14 changed files with 122 additions and 34 deletions
+7
View File
@@ -20,6 +20,8 @@ import workmanager
/// Register the app's plugins in the context of a normal run
AppDelegate.registerPlugins(with: self)
UNUserNotificationCenter.current().delegate = self
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as UNUserNotificationCenterDelegate
}
@@ -91,4 +93,9 @@ import workmanager
return URL(string: "ShareMedia-\(appDomain)://dataUrl=\(sharedKey)#text")
}
override func userNotificationCenter(_ center: UNUserNotificationCenter,
willPresent notification: UNNotification,
withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
completionHandler(.alert) // shows banner even if app is in foreground
}
}