Skip to content

Commit

Permalink
Rename to OnboardingModifier
Browse files Browse the repository at this point in the history
  • Loading branch information
keeshux committed Nov 25, 2024
1 parent 4005e50 commit 83b502b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// AppLaunchModifier.swift
// OnboardingModifier.swift
// Passepartout
//
// Created by Davide De Rosa on 11/25/24.
Expand Down Expand Up @@ -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?
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 83b502b

Please sign in to comment.