diff options
author | Marc Stibane <marc@taler.net> | 2024-04-25 21:53:34 +0200 |
---|---|---|
committer | Marc Stibane <marc@taler.net> | 2024-04-25 21:53:34 +0200 |
commit | d27b3c0b8a83e324e0277233c68dbd04c4f6e279 (patch) | |
tree | 3b1f87e263b2cccd203bfe02161ebc04f7b004e2 | |
parent | 35654f9b943ae08876ad0144fa6b337fef233bc5 (diff) | |
download | taler-ios-d27b3c0b8a83e324e0277233c68dbd04c4f6e279.tar.gz taler-ios-d27b3c0b8a83e324e0277233c68dbd04c4f6e279.tar.bz2 taler-ios-d27b3c0b8a83e324e0277233c68dbd04c4f6e279.zip |
cleanup
-rw-r--r-- | TalerWallet1/Views/Main/MainView.swift | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/TalerWallet1/Views/Main/MainView.swift b/TalerWallet1/Views/Main/MainView.swift index f5e17d0..3c3bced 100644 --- a/TalerWallet1/Views/Main/MainView.swift +++ b/TalerWallet1/Views/Main/MainView.swift @@ -41,6 +41,7 @@ struct MainView: View { func sheetDismissed() -> Void { logger.info("sheet dismiss") + ViewState.shared.popToRootView(nil) } var body: some View { #if PRINT_CHANGES @@ -106,26 +107,25 @@ extension MainView { struct Content: View { let logger: Logger let stack: CallStack - @State private var shouldReloadBalances = 0 - @State private var balances: [Balance] = [] @Binding var talerFontIndex: Int + +#if DEBUG + @AppStorage("developerMode") var developerMode: Bool = true +#else + @AppStorage("developerMode") var developerMode: Bool = false +#endif @AppStorage("minimalistic") var minimalistic: Bool = false @EnvironmentObject private var controller: Controller @EnvironmentObject private var model: WalletModel @EnvironmentObject private var viewState: ViewState // popToRootView() @EnvironmentObject private var viewState2: ViewState2 // popToRootView() - let balancesTitle = String(localized: "TitleBalances", defaultValue: "Balances") -// let exchangesTitle = String(localized: "TitleExchanges", defaultValue: "Banking") - let settingsTitle = String(localized: "TitleSettings", defaultValue: "Settings") + + @State private var shouldReloadBalances = 0 + @State private var balances: [Balance] = [] @State private var selectedTab: Tab = .balances @State private var showKycAlert: Bool = false @State private var kycURI: URL? -#if DEBUG - @AppStorage("developerMode") var developerMode: Bool = true -#else - @AppStorage("developerMode") var developerMode: Bool = false -#endif private var openKycButton: some View { Button("KYC") { @@ -183,6 +183,9 @@ extension MainView { #else let delay: UInt = 0 // no delay for release builds #endif + let balancesTitle = String(localized: "TitleBalances", defaultValue: "Balances") +// let exchangesTitle = String(localized: "TitleExchanges", defaultValue: "Banking") + let settingsTitle = String(localized: "TitleSettings", defaultValue: "Settings") Group { // let labelStyle = minimalistic ? IconOnlyLabelStyle() : TitleAndIconLabelStyle() // labelStyle doesn't work TabView(selection: tabSelection()) { |