From 3e3c109a84907ae07556597711e7f346bc807923 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Sun, 22 Jan 2023 16:59:56 +0100 Subject: [PATCH] Fix #272 --- IceCubesApp/App/Tabs/Settings/DisplaySettingsView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/IceCubesApp/App/Tabs/Settings/DisplaySettingsView.swift b/IceCubesApp/App/Tabs/Settings/DisplaySettingsView.swift index f240576b..d6f4f5aa 100644 --- a/IceCubesApp/App/Tabs/Settings/DisplaySettingsView.swift +++ b/IceCubesApp/App/Tabs/Settings/DisplaySettingsView.swift @@ -5,6 +5,7 @@ import Status import SwiftUI struct DisplaySettingsView: View { + @Environment(\.colorScheme) private var colorScheme @EnvironmentObject private var theme: Theme @EnvironmentObject private var userPreferences: UserPreferences @@ -56,7 +57,8 @@ struct DisplaySettingsView: View { Section { Button { - theme.selectedSet = .iceCubeDark + theme.followSystemColorScheme = true + theme.selectedSet = colorScheme == .dark ? .iceCubeDark : .iceCubeLight theme.avatarShape = .rounded theme.avatarPosition = .top theme.statusActionsDisplay = .full