forked from shadowfacts/Tusker
Fix Compose window title not being set initially
This commit is contained in:
parent
6bd2eacb88
commit
bb3f353dbc
|
@ -62,15 +62,15 @@ class ComposeSceneDelegate: UIResponder, UIWindowSceneDelegate, TuskerSceneDeleg
|
||||||
composeVC.delegate = self
|
composeVC.delegate = self
|
||||||
let nav = EnhancedNavigationViewController(rootViewController: composeVC)
|
let nav = EnhancedNavigationViewController(rootViewController: composeVC)
|
||||||
|
|
||||||
updateTitle(draft: composeVC.draft)
|
|
||||||
composeVC.uiState.$draft
|
|
||||||
.sink { [unowned self] in self.updateTitle(draft: $0) }
|
|
||||||
.store(in: &cancellables)
|
|
||||||
|
|
||||||
window = UIWindow(windowScene: windowScene)
|
window = UIWindow(windowScene: windowScene)
|
||||||
window!.rootViewController = nav
|
window!.rootViewController = nav
|
||||||
window!.makeKeyAndVisible()
|
window!.makeKeyAndVisible()
|
||||||
|
|
||||||
|
updateTitle(draft: composeVC.draft)
|
||||||
|
composeVC.controller.$draft
|
||||||
|
.sink { [unowned self] in self.updateTitle(draft: $0) }
|
||||||
|
.store(in: &cancellables)
|
||||||
|
|
||||||
NotificationCenter.default.addObserver(self, selector: #selector(themePrefChanged), name: .themePreferenceChanged, object: nil)
|
NotificationCenter.default.addObserver(self, selector: #selector(themePrefChanged), name: .themePreferenceChanged, object: nil)
|
||||||
themePrefChanged()
|
themePrefChanged()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue