Browse Source

Extra validation!

pull/92/head
Abhishek 5 years ago
parent
commit
4c67819ee2
  1. 8
      Clocker/Panel/Data Layer/TimezoneData.swift

8
Clocker/Panel/Data Layer/TimezoneData.swift

@ -253,6 +253,10 @@ class TimezoneData: NSObject, NSCoding {
} }
} }
if UserDefaults.standard.object(forKey: "shouldOverrideSecondsFormatBug") == nil {
UserDefaults.standard.set("YES", forKey: "shouldOverrideSecondsFormatBug")
}
// Do the serialization // Do the serialization
let serializedModels = newModels.map { (place) -> Data in let serializedModels = newModels.map { (place) -> Data in
NSKeyedArchiver.archivedData(withRootObject: place) NSKeyedArchiver.archivedData(withRootObject: place)
@ -262,10 +266,8 @@ class TimezoneData: NSObject, NSCoding {
} }
private class func shouldOverrideSecondsFormatBugFix(model: TimezoneData) { private class func shouldOverrideSecondsFormatBugFix(model: TimezoneData) {
if UserDefaults.standard.object(forKey: "shouldOverrideSecondsFormatBugFix") == nil { if UserDefaults.standard.object(forKey: "shouldOverrideSecondsFormatBug") == nil {
model.setShouldOverrideSecondsFormat(2) model.setShouldOverrideSecondsFormat(2)
UserDefaults.standard.set("YES", forKey: "shouldOverrideSecondsFormatBugFix")
return
} }
} }

Loading…
Cancel
Save