|
|
|
@ -91,11 +91,13 @@ 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() |
|
|
|
|