Don't show doubled "New Post" in window titlebar on macOS

Closes #429
This commit is contained in:
Shadowfacts 2023-09-24 23:50:08 -04:00
parent 7ae741cd83
commit 6821f1b9a0
1 changed files with 5 additions and 1 deletions

View File

@ -91,7 +91,10 @@ class ComposeSceneDelegate: UIResponder, UIWindowSceneDelegate, TuskerSceneDeleg
} }
private func updateTitle(draft: Draft) { private func updateTitle(draft: Draft) {
guard let scene = window?.windowScene, // Don't set the scene title on macOS since it shows both that and the VC title in the window titlebar
#if !targetEnvironment(macCatalyst)
guard !ProcessInfo.processInfo.isiOSAppOnMac,
let scene = window?.windowScene,
let mastodonController = scene.session.mastodonController else { let mastodonController = scene.session.mastodonController else {
return return
} }
@ -101,6 +104,7 @@ class ComposeSceneDelegate: UIResponder, UIWindowSceneDelegate, TuskerSceneDeleg
} else { } else {
scene.title = "New Post" scene.title = "New Post"
} }
#endif
} }
@objc private func themePrefChanged() { @objc private func themePrefChanged() {