commit 420cdf349df8a088e9219fab1767a88aa565c59d parent eaca3b532d9e817ea959f95e15d7dc860214f954 Author: Marc Stibane <marc@taler.net> Date: Thu, 15 Feb 2024 06:59:30 +0100 Pop back on tab item Diffstat:
| M | TalerWallet1/Views/Main/MainView.swift | | | 14 | +++++++++++--- |
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/TalerWallet1/Views/Main/MainView.swift b/TalerWallet1/Views/Main/MainView.swift @@ -118,15 +118,23 @@ extension MainView { self.selectedTab } set: { tappedTab in if tappedTab == self.selectedTab { - //User tapped on the tab twice == Pop to root view + // User tapped on the tab twice == Pop to root view + switch tappedTab { + case .balances: + ViewState.shared.popToRootView(nil) + case .exchanges: + ViewState2.shared.popToRootView(nil) + default: + break + } // if homeNavigationStack.isEmpty { //User already on home view, scroll to top // } else { // homeNavigationStack = [] // } + } else { // Set the tab to the tabbed tab + self.selectedTab = tappedTab } - //Set the tab to the tabbed tab - self.selectedTab = tappedTab } }