Skip to content

Commit

Permalink
refactor: Revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu-dgl committed Oct 29, 2024
1 parent bf8196e commit 5331da4
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions Mail/Views/Sync Profile/SyncProfileNavigationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,31 @@ struct SyncProfileNavigationView: View {
@State private var navigationPath: [SyncProfileStep] = []

var body: some View {
if #available(iOS 16.0, *) {
NavigationStack(path: $navigationPath) {
SyncWelcomeView(navigationPath: $navigationPath)
.navigationDestination(for: SyncProfileStep.self) { step in
Group {
switch step {
case .downloadProfile:
SyncDownloadProfileView(navigationPath: $navigationPath)
case .copyPassword:
SyncCopyPasswordView(navigationPath: $navigationPath)
case .installProfile:
SyncInstallProfileTutorialView()
}
}
.backButtonDisplayMode(.minimal)
.navigationBarTitleDisplayMode(.inline)
.environment(\.dismissModal) { dismiss() }
}
.toolbar {
ToolbarItem(placement: .cancellationAction) {
CloseButton(dismissAction: dismiss)
NBNavigationStack(path: $navigationPath) {
SyncWelcomeView(navigationPath: $navigationPath)
.nbNavigationDestination(for: SyncProfileStep.self) { step in
Group {
switch step {
case .downloadProfile:
SyncDownloadProfileView(navigationPath: $navigationPath)
case .copyPassword:
SyncCopyPasswordView(navigationPath: $navigationPath)
case .installProfile:
SyncInstallProfileTutorialView()
}
}
.backButtonDisplayMode(.minimal)
}

} else {
Text("Not supported")
.navigationBarTitleDisplayMode(.inline)
.environment(\.dismissModal) { dismiss() }
}
.toolbar {
ToolbarItem(placement: .cancellationAction) {
CloseButton(dismissAction: dismiss)
}
}
.backButtonDisplayMode(.minimal)
}
.nbUseNavigationStack(.whenAvailable)
}
}

Expand Down

0 comments on commit 5331da4

Please sign in to comment.