handle launching to articles from a cold start

This commit is contained in:
Stuart Breckenridge 2020-11-19 15:52:43 +08:00
parent 1bdfb3aafc
commit 3e69571d09

View File

@ -23,7 +23,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
window!.tintColor = AppAssets.primaryAccentColor
updateUserInterfaceStyle()
window!.rootViewController = coordinator.start(for: window!.frame.size)
coordinator.restoreWindowState(session.stateRestorationActivity)
NotificationCenter.default.addObserver(self, selector: #selector(userDefaultsDidChange), name: UserDefaults.didChangeNotification, object: nil)
@ -44,6 +44,10 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
coordinator.handle(userActivity)
}
if let _ = connectionOptions.urlContexts.first {
self.scene(scene, openURLContexts: connectionOptions.urlContexts)
}
window!.makeKeyAndVisible()
}