Browse Source

Formatting.

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

12
Clocker/AppDelegate.swift

@ -89,13 +89,15 @@ 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()
} }

4
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 }
@ -178,7 +178,7 @@ extension TimezoneDataSource: NSTableViewDataSource, NSTableViewDelegate {
if response.rawValue == 1000 { if response.rawValue == 1000 {
OperationQueue.main.addOperation { [weak self] in OperationQueue.main.addOperation { [weak self] in
guard let sSelf = self else { return } guard let sSelf = self else { return }
let indexSet = IndexSet(integer: row) let indexSet = IndexSet(integer: row)
tableView.removeRows(at: indexSet, withAnimation: NSTableView.AnimationOptions.slideUp) tableView.removeRows(at: indexSet, withAnimation: NSTableView.AnimationOptions.slideUp)

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