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 func showOnboardingFlowIfEligible() {
let shouldLaunchOnboarding = (DataStore.shared().retrieve(key: CLShowOnboardingFlow) == nil
&& DataStore.shared().timezones().isEmpty)
|| ProcessInfo.processInfo.arguments.contains(CLOnboaringTestsLaunchArgument)
let isTestInProgress = ProcessInfo.processInfo.arguments.contains(CLOnboaringTestsLaunchArgument)
let shouldLaunchOnboarding =
(DataStore.shared().retrieve(key: CLShowOnboardingFlow) == nil
&& DataStore.shared().timezones().isEmpty)
|| isTestInProgress
if (shouldLaunchOnboarding) {
if shouldLaunchOnboarding {
let onboardingStoryboard = NSStoryboard(name: NSStoryboard.Name("Onboarding"), bundle: nil)
controller = onboardingStoryboard.instantiateController(withIdentifier: NSStoryboard.SceneIdentifier("onboardingFlow")) as? OnboardingController
controller?.launch()

2
Clocker/Panel/Data Layer/TimezoneDataOperations.swift

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

4
Clocker/Panel/UI/TimezoneDataSource.swift

@ -143,7 +143,7 @@ extension TimezoneDataSource: NSTableViewDataSource, NSTableViewDelegate {
tableView.removeRows(at: indexSet, withAnimation: NSTableView.AnimationOptions())
if self.dataStore.shouldDisplay(ViewType.showAppInForeground) {
if self.dataStore.shouldDisplay(ViewType.showAppInForeground) {
windowController.deleteTimezone(at: row)
} else {
guard let panelController = PanelController.panel() else { return }
@ -178,7 +178,7 @@ extension TimezoneDataSource: NSTableViewDataSource, NSTableViewDelegate {
if response.rawValue == 1000 {
OperationQueue.main.addOperation { [weak self] in
guard let sSelf = self else { return }
let indexSet = IndexSet(integer: row)
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) {
self.store = store
self.updateDelegate = delegate
updateDelegate = delegate
super.init()
}
}

Loading…
Cancel
Save