On macOS, just change the colorScheme

This commit is contained in:
Stuart Breckenridge 2020-07-17 22:33:38 +08:00
parent b739f6dd61
commit 19d4afc467
No known key found for this signature in database
GPG Key ID: 79BD673276AE83CE

View File

@ -134,9 +134,13 @@ final class AppDefaults: ObservableObject {
}
set {
AppDefaults.store.set(newValue.rawValue, forKey: Key.userInterfaceColorPalette)
#if os(macOS)
self.objectWillChange.send()
#else
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
self.objectWillChange.send()
})
#endif
}
}