|
|
@ -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() |
|
|
|