Browse Source

Remove unused method.

pull/113/head
Abhishek Banthia 3 years ago
parent
commit
2201b1cda5
  1. 14
      Clocker/Overall App/AppDefaults.swift

14
Clocker/Overall App/AppDefaults.swift

@ -8,16 +8,6 @@ class AppDefaults {
initializeDefaults() initializeDefaults()
} }
private class func deleteOldUserDefaults() {
let userDefaults = UserDefaults.standard
// Now delete the old preferences
if let bundleID = Bundle.main.bundleIdentifier, userDefaults.object(forKey: "PreferencesHaveBeenWiped") == nil {
userDefaults.removePersistentDomain(forName: bundleID)
userDefaults.set(true, forKey: "PreferencesHaveBeenWiped")
}
}
private class func initializeDefaults() { private class func initializeDefaults() {
let userDefaults = UserDefaults.standard let userDefaults = UserDefaults.standard
let dataStore = DataStore.shared() let dataStore = DataStore.shared()
@ -84,9 +74,9 @@ extension UserDefaults {
} }
func wipeIfNeccesary() { func wipeIfNeccesary() {
if let bundleID = Bundle.main.bundleIdentifier, object(forKey: "PreferencesHaveBeenWiped") == nil { if object(forKey: "PreferencesHaveBeenWiped") == nil {
Logger.info("Wiping all user defaults") Logger.info("Wiping all user defaults")
removePersistentDomain(forName: bundleID) wipe()
set(true, forKey: "PreferencesHaveBeenWiped") set(true, forKey: "PreferencesHaveBeenWiped")
} }
} }

Loading…
Cancel
Save