From 6766ed496dbc70d1b7d4e583dd3e334fae15b1e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adem=20=C3=96zsay=C4=B1n?= Date: Mon, 29 Jul 2024 08:57:33 +0300 Subject: [PATCH] Fix nav bar crash and empty settings screen after logout (#2124) --- IceCubesApp/App/Main/AppView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/IceCubesApp/App/Main/AppView.swift b/IceCubesApp/App/Main/AppView.swift index ff72955c..c1e4cb43 100644 --- a/IceCubesApp/App/Main/AppView.swift +++ b/IceCubesApp/App/Main/AppView.swift @@ -122,6 +122,7 @@ struct AppView: View { .tag(tab) } } + .id(availableTabs.count) /// Resets the TabView state when the number of tabs changes to avoid navigation bar issues and prevent crashes .introspect(.tabView, on: .iOS(.v17, .v18)) { (tabview: UITabBarController) in tabview.tabBar.isHidden = horizontalSizeClass == .regular tabview.customizableViewControllers = []