diff --git a/Passepartout/Library/Sources/AppUIMain/Views/App/AppCoordinator.swift b/Passepartout/Library/Sources/AppUIMain/Views/App/AppCoordinator.swift index 1aa756817..a22df7abf 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/App/AppCoordinator.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/App/AppCoordinator.swift @@ -76,7 +76,7 @@ public struct AppCoordinator: View, AppCoordinatorConforming { contentView .toolbar(content: toolbarContent) } - .modifier(AppLaunchModifier(modalRoute: $modalRoute)) + .modifier(OnboardingModifier(modalRoute: $modalRoute)) .modifier(PaywallModifier(reason: $paywallReason)) .themeModal( item: $modalRoute, diff --git a/Passepartout/Library/Sources/AppUIMain/Views/App/AppLaunchModifier.swift b/Passepartout/Library/Sources/AppUIMain/Views/App/OnboardingModifier.swift similarity index 84% rename from Passepartout/Library/Sources/AppUIMain/Views/App/AppLaunchModifier.swift rename to Passepartout/Library/Sources/AppUIMain/Views/App/OnboardingModifier.swift index 7b295b84c..b6a35c5e4 100644 --- a/Passepartout/Library/Sources/AppUIMain/Views/App/AppLaunchModifier.swift +++ b/Passepartout/Library/Sources/AppUIMain/Views/App/OnboardingModifier.swift @@ -1,5 +1,5 @@ // -// AppLaunchModifier.swift +// OnboardingModifier.swift // Passepartout // // Created by Davide De Rosa on 11/25/24. @@ -27,10 +27,10 @@ import CommonLibrary import PassepartoutKit import SwiftUI -struct AppLaunchModifier: ViewModifier { +struct OnboardingModifier: ViewModifier { - @AppStorage(AppPreference.appStep.key) - private var appStep: OnboardingStep? + @AppStorage(AppPreference.onboardingStep.key) + private var step: OnboardingStep? @Binding var modalRoute: AppCoordinator.ModalRoute? @@ -65,13 +65,13 @@ struct AppLaunchModifier: ViewModifier { } } -private extension AppLaunchModifier { +private extension OnboardingModifier { func advance() { - pp_log(.app, .info, "Current step: \(appStep.debugDescription)") - appStep = appStep.nextStep - pp_log(.app, .info, "Next step: \(appStep.debugDescription)") + pp_log(.app, .info, "Current step: \(step.debugDescription)") + step = step.nextStep + pp_log(.app, .info, "Next step: \(step.debugDescription)") - switch appStep { + switch step { case .migrateV3: modalRoute = .migrateProfiles case .community: diff --git a/Passepartout/Library/Sources/CommonLibrary/Domain/AppPreference.swift b/Passepartout/Library/Sources/CommonLibrary/Domain/AppPreference.swift index 1d824debd..2d789c282 100644 --- a/Passepartout/Library/Sources/CommonLibrary/Domain/AppPreference.swift +++ b/Passepartout/Library/Sources/CommonLibrary/Domain/AppPreference.swift @@ -26,14 +26,14 @@ import Foundation public enum AppPreference: String, CaseIterable { - case appStep - case keepsInMenu case locksInBackground case logsPrivateData + case onboardingStep + case onlyShowsFavorites case profilesLayout