mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-09 08:23:42 +01:00
Update the user interface style on the main thread.
This commit is contained in:
parent
def5d84647
commit
8dbe5691e3
@ -111,13 +111,15 @@ private extension SceneDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func updateUserInterfaceStyle() {
|
func updateUserInterfaceStyle() {
|
||||||
switch AppDefaults.userInterfaceColorPalette {
|
DispatchQueue.main.async {
|
||||||
case .automatic:
|
switch AppDefaults.userInterfaceColorPalette {
|
||||||
window!.overrideUserInterfaceStyle = .unspecified
|
case .automatic:
|
||||||
case .light:
|
self.window?.overrideUserInterfaceStyle = .unspecified
|
||||||
window!.overrideUserInterfaceStyle = .light
|
case .light:
|
||||||
case .dark:
|
self.window?.overrideUserInterfaceStyle = .light
|
||||||
window!.overrideUserInterfaceStyle = .dark
|
case .dark:
|
||||||
|
self.window?.overrideUserInterfaceStyle = .dark
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user