Fix a couple concurrency warnings.
This commit is contained in:
parent
caa5f8b85c
commit
f7cd359804
@ -9,7 +9,7 @@
|
|||||||
import UIKit
|
import UIKit
|
||||||
import Web
|
import Web
|
||||||
import Account
|
import Account
|
||||||
import BackgroundTasks
|
@preconcurrency import BackgroundTasks
|
||||||
import os.log
|
import os.log
|
||||||
import Secrets
|
import Secrets
|
||||||
import WidgetKit
|
import WidgetKit
|
||||||
@ -215,27 +215,28 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|||||||
completionHandler([.list, .banner, .badge, .sound])
|
completionHandler([.list, .banner, .badge, .sound])
|
||||||
}
|
}
|
||||||
|
|
||||||
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
|
nonisolated func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
|
||||||
defer { completionHandler() }
|
|
||||||
|
MainActor.assumeIsolated {
|
||||||
let userInfo = response.notification.request.content.userInfo
|
defer { completionHandler() }
|
||||||
|
|
||||||
switch response.actionIdentifier {
|
let userInfo = response.notification.request.content.userInfo
|
||||||
case "MARK_AS_READ":
|
|
||||||
handleMarkAsRead(userInfo: userInfo)
|
switch response.actionIdentifier {
|
||||||
case "MARK_AS_STARRED":
|
case "MARK_AS_READ":
|
||||||
handleMarkAsStarred(userInfo: userInfo)
|
handleMarkAsRead(userInfo: userInfo)
|
||||||
default:
|
case "MARK_AS_STARRED":
|
||||||
if let sceneDelegate = response.targetScene?.delegate as? SceneDelegate {
|
handleMarkAsStarred(userInfo: userInfo)
|
||||||
sceneDelegate.handle(response)
|
default:
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
|
if let sceneDelegate = response.targetScene?.delegate as? SceneDelegate {
|
||||||
sceneDelegate.coordinator.dismissIfLaunchingFromExternalAction()
|
sceneDelegate.handle(response)
|
||||||
})
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
|
||||||
|
sceneDelegate.coordinator.dismissIfLaunchingFromExternalAction()
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: App Initialization
|
// MARK: App Initialization
|
||||||
|
Loading…
x
Reference in New Issue
Block a user