Use preferredColorScheme modifier instead of environment key

This commit is contained in:
Angelo Stavrow 2020-08-11 14:44:34 -04:00
parent c339124703
commit 54d1d64e0e
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

View File

@ -13,7 +13,7 @@ struct WriteFreely_MultiPlatformApp: App {
var body: some Scene {
WindowGroup {
ContentView(postStore: store, preferences: preferences)
.environment(\.colorScheme, preferences.preferredColorScheme)
.preferredColorScheme(preferences.preferredColorScheme)
}
#if os(macOS)