Skip to content

Commit 6c1245a

Browse files
committed
Add settings key for widget color scheme
1 parent fe681d6 commit 6c1245a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Core/Sources/XPCShared/UserDefaults.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ public extension UserDefaults {
1818
PresentationMode.floatingWidget.rawValue,
1919
forKey: SettingsKey.suggestionPresentationMode
2020
)
21+
setDefaultValue(
22+
WidgetColorScheme.dark.rawValue,
23+
forKey: SettingsKey.widgetColorScheme
24+
)
2125
}
2226
}
2327

@@ -29,4 +33,5 @@ public enum SettingsKey {
2933
public static let suggestionPresentationMode = "SuggestionPresentationMode"
3034
public static let automaticallyCheckForUpdate = "AutomaticallyCheckForUpdate"
3135
public static let suggestionWidgetPositionMode = "SuggestionWidgetPositionMode"
36+
public static let widgetColorScheme = "WidgetColorScheme"
3237
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
public enum WidgetColorScheme: Int {
2+
case system = 0
3+
case light = 1
4+
case dark = 2
5+
}

0 commit comments

Comments
 (0)