Browse Source

Merge branch 'master' of https://github.com/n0shake/Clocker

pull/92/head
Abhishek 5 years ago
parent
commit
9173151d9a
  1. 9
      Clocker/Panel/Data Layer/TimezoneData.swift

9
Clocker/Panel/Data Layer/TimezoneData.swift

@ -248,6 +248,7 @@ class TimezoneData: NSObject, NSCoding {
let newTimezone = TimezoneData(with: oldModel) let newTimezone = TimezoneData(with: oldModel)
newModels.append(newTimezone) newModels.append(newTimezone)
} else if let newModel = old as? TimezoneData { } else if let newModel = old as? TimezoneData {
shouldOverrideSecondsFormatBugFix(model: newModel)
newModels.append(newModel) newModels.append(newModel)
} }
} }
@ -260,6 +261,14 @@ class TimezoneData: NSObject, NSCoding {
return serializedModels return serializedModels
} }
private class func shouldOverrideSecondsFormatBugFix(model: TimezoneData) {
if UserDefaults.standard.object(forKey: "shouldOverrideSecondsFormatBugFix") == nil {
model.setShouldOverrideSecondsFormat(2)
UserDefaults.standard.set("YES", forKey: "shouldOverrideSecondsFormatBugFix")
return
}
}
func encode(with aCoder: NSCoder) { func encode(with aCoder: NSCoder) {
aCoder.encode(placeID, forKey: "place_id") aCoder.encode(placeID, forKey: "place_id")

Loading…
Cancel
Save