Browse Source

Formatting.

pull/113/head
Abhishek Banthia 3 years ago
parent
commit
c1236b3fad
  1. 10
      Clocker/AppDelegate.swift
  2. 2
      Clocker/Panel/Data Layer/TimezoneDataOperations.swift
  3. 2
      Clocker/Panel/UI/TimezoneDataSource.swift
  4. 2
      Clocker/Preferences/General/PreferencesDataSource.swift

10
Clocker/AppDelegate.swift

@ -91,11 +91,13 @@ open class AppDelegate: NSObject, NSApplicationDelegate {
private var controller: OnboardingController? private var controller: OnboardingController?
private func showOnboardingFlowIfEligible() { private func showOnboardingFlowIfEligible() {
let shouldLaunchOnboarding = (DataStore.shared().retrieve(key: CLShowOnboardingFlow) == nil let isTestInProgress = ProcessInfo.processInfo.arguments.contains(CLOnboaringTestsLaunchArgument)
&& DataStore.shared().timezones().isEmpty) let shouldLaunchOnboarding =
|| ProcessInfo.processInfo.arguments.contains(CLOnboaringTestsLaunchArgument) (DataStore.shared().retrieve(key: CLShowOnboardingFlow) == nil
&& DataStore.shared().timezones().isEmpty)
|| isTestInProgress
if (shouldLaunchOnboarding) { if shouldLaunchOnboarding {
let onboardingStoryboard = NSStoryboard(name: NSStoryboard.Name("Onboarding"), bundle: nil) let onboardingStoryboard = NSStoryboard(name: NSStoryboard.Name("Onboarding"), bundle: nil)
controller = onboardingStoryboard.instantiateController(withIdentifier: NSStoryboard.SceneIdentifier("onboardingFlow")) as? OnboardingController controller = onboardingStoryboard.instantiateController(withIdentifier: NSStoryboard.SceneIdentifier("onboardingFlow")) as? OnboardingController
controller?.launch() controller?.launch()

2
Clocker/Panel/Data Layer/TimezoneDataOperations.swift

@ -14,7 +14,7 @@ class TimezoneDataOperations: NSObject {
private static let currentLocale = Locale.current.identifier private static let currentLocale = Locale.current.identifier
init(with timezone: TimezoneData, store: DataStore) { init(with timezone: TimezoneData, store: DataStore) {
self.dataObject = timezone dataObject = timezone
self.store = store self.store = store
super.init() super.init()
} }

2
Clocker/Panel/UI/TimezoneDataSource.swift

@ -143,7 +143,7 @@ extension TimezoneDataSource: NSTableViewDataSource, NSTableViewDelegate {
tableView.removeRows(at: indexSet, withAnimation: NSTableView.AnimationOptions()) tableView.removeRows(at: indexSet, withAnimation: NSTableView.AnimationOptions())
if self.dataStore.shouldDisplay(ViewType.showAppInForeground) { if self.dataStore.shouldDisplay(ViewType.showAppInForeground) {
windowController.deleteTimezone(at: row) windowController.deleteTimezone(at: row)
} else { } else {
guard let panelController = PanelController.panel() else { return } guard let panelController = PanelController.panel() else { return }

2
Clocker/Preferences/General/PreferencesDataSource.swift

@ -29,7 +29,7 @@ class PreferencesDataSource: NSObject {
init(with store: DataStore, callbackDelegate delegate: PreferenceSelectionUpdates) { init(with store: DataStore, callbackDelegate delegate: PreferenceSelectionUpdates) {
self.store = store self.store = store
self.updateDelegate = delegate updateDelegate = delegate
super.init() super.init()
} }
} }

Loading…
Cancel
Save