fixes cold launch from widget
This commit is contained in:
parent
fa26fd565e
commit
fd33dc9be1
|
@ -28,6 +28,12 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||||
|
|
||||||
NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange), name: UserDefaults.didChangeNotification, object: nil)
|
NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange), name: UserDefaults.didChangeNotification, object: nil)
|
||||||
|
|
||||||
|
if let _ = connectionOptions.urlContexts.first?.url {
|
||||||
|
window?.makeKeyAndVisible()
|
||||||
|
self.scene(scene, openURLContexts: connectionOptions.urlContexts)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if let shortcutItem = connectionOptions.shortcutItem {
|
if let shortcutItem = connectionOptions.shortcutItem {
|
||||||
window!.makeKeyAndVisible()
|
window!.makeKeyAndVisible()
|
||||||
handleShortcutItem(shortcutItem)
|
handleShortcutItem(shortcutItem)
|
||||||
|
@ -44,10 +50,6 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||||
coordinator.handle(userActivity)
|
coordinator.handle(userActivity)
|
||||||
}
|
}
|
||||||
|
|
||||||
if let _ = connectionOptions.urlContexts.first?.url {
|
|
||||||
self.scene(scene, openURLContexts: connectionOptions.urlContexts)
|
|
||||||
}
|
|
||||||
|
|
||||||
window!.makeKeyAndVisible()
|
window!.makeKeyAndVisible()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue