Fix settings page dismissing immediately by replacing multiple isPresented navigation destinations with value-based NavigationPath

The settings view was being popped immediately after push because multiple
navigationDestination(isPresented:) modifiers on the same view caused SwiftUI
to reset bindings when appState published changes. Replaced with a single
navigationDestination(for: SidebarDestination.self) using an explicit
NavigationStack(path:). Also fixed @ObservedObject -> @StateObject on
SettingsView.ViewModel, added AllRecipesListView/AllRecipesCategoryCardView,
and added translations for new strings.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 02:20:38 +01:00
parent c8ddb098d1
commit 6824dbea6b
6 changed files with 439 additions and 83 deletions

View File

@@ -14,7 +14,7 @@ import SwiftUI
struct SettingsView: View {
@EnvironmentObject var appState: AppState
@ObservedObject var userSettings = UserSettings.shared
@ObservedObject var viewModel = ViewModel()
@StateObject var viewModel = ViewModel()
var body: some View {
Form {