1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-08 04:20:07 +02:00

👌 Use snake case for all key names

This commit is contained in:
2021-03-30 16:38:09 +02:00
parent d3d219751e
commit 7c884610b1

View File

@ -15,15 +15,17 @@ enum PreferenceName: String {
class Preferences { class Preferences {
static func handleFirstTimeLaunch() { static func handleFirstTimeLaunch() {
let launchedBefore = UserDefaults.standard.bool(forKey: "alreadyLaunched") let launchedBefore = UserDefaults.standard.bool(forKey: "launched_before")
if launchedBefore { if launchedBefore {
return return
} }
UserDefaults.standard.setValue(true, forKey: PreferenceName.shouldDisplayDynamicIcon.rawValue) UserDefaults.standard.setValue(true, forKey: PreferenceName.shouldDisplayDynamicIcon.rawValue)
UserDefaults.standard.setValue(true, forKey: "alreadyLaunched") UserDefaults.standard.setValue(true, forKey: "launched_before")
UserDefaults.standard.synchronize() UserDefaults.standard.synchronize()
print("Saving first-time preferences!")
} }
static func retrieve() -> [PreferenceName: Bool] { static func retrieve() -> [PreferenceName: Bool] {