From 70cfdf83270c36dd3d304b20545aba92949019af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Heidekr=C3=BCger?= Date: Thu, 29 Feb 2024 19:55:20 +0100 Subject: [PATCH] Use keychain instead of UserDefaults in JustUpdatedChecker.swift --- Sources/Secretive/Controllers/JustUpdatedChecker.swift | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Sources/Secretive/Controllers/JustUpdatedChecker.swift b/Sources/Secretive/Controllers/JustUpdatedChecker.swift index 4c86f68..ee0dceb 100644 --- a/Sources/Secretive/Controllers/JustUpdatedChecker.swift +++ b/Sources/Secretive/Controllers/JustUpdatedChecker.swift @@ -15,14 +15,11 @@ class JustUpdatedChecker: ObservableObject, JustUpdatedCheckerProtocol { } func check() { - let lastBuild = UserDefaults.standard.object(forKey: Constants.previousVersionUserDefaultsKey) as? String ?? "None" + let lastBuild = SettingsStore.get(key: Constants.previousVersionUserDefaultsKey) ?? "None" let currentBuild = Bundle.main.infoDictionary!["CFBundleShortVersionString"] as! String - UserDefaults.standard.set(currentBuild, forKey: Constants.previousVersionUserDefaultsKey) + SettingsStore.set(key: Constants.previousVersionUserDefaultsKey, value: currentBuild) justUpdated = lastBuild != currentBuild } - - - } extension JustUpdatedChecker {