Browse Source

Remove unused method.

pull/113/head
Abhishek Banthia 3 years ago
parent
commit
31750e5adc
  1. 25
      Clocker/AppDelegate.swift

25
Clocker/AppDelegate.swift

@ -53,9 +53,6 @@ open class AppDelegate: NSObject, NSApplicationDelegate {
AppDefaults.initialize() AppDefaults.initialize()
// For users, still on the old timezones, only migrate timezonezes once setClass has been called
migrateOverridenTimezones()
// Check if we can show the onboarding flow! // Check if we can show the onboarding flow!
showOnboardingFlowIfEligible() showOnboardingFlowIfEligible()
@ -68,28 +65,6 @@ open class AppDelegate: NSObject, NSApplicationDelegate {
#endif #endif
} }
private func migrateOverridenTimezones() {
let defaults = UserDefaults.standard
if let shortCircuit = defaults.object(forKey: "MigrateIndividualTimezoneFormat") as? Bool, shortCircuit == true {
return
}
let timezones = DataStore.shared().timezones()
var migratedTimezones: [Data] = []
for encodedTimezone in timezones {
if let timezoneObject = TimezoneData.customObject(from: encodedTimezone) {
timezoneObject.setShouldOverrideGlobalTimeFormat(0)
migratedTimezones.append(NSKeyedArchiver.archivedData(withRootObject: timezoneObject))
}
}
if migratedTimezones.count > 0 {
defaults.set(migratedTimezones, forKey: CLDefaultPreferenceKey)
defaults.set(true, forKey: "MigrateIndividualTimezoneFormat")
}
}
public func applicationDockMenu(_: NSApplication) -> NSMenu? { public func applicationDockMenu(_: NSApplication) -> NSMenu? {
let menu = NSMenu(title: "Quick Access") let menu = NSMenu(title: "Quick Access")

Loading…
Cancel
Save