taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit e149ceee5a351119d09315ae349009ca6c638fcc
parent c9e709d107168e2b2f7fb37f70a124140811f71e
Author: Marc Stibane <marc@taler.net>
Date:   Thu, 22 Oct 2026 06:53:33 +0200

simplify

Diffstat:
MTalerWallet1/Controllers/Controller.swift | 3---
MTalerWallet1/Views/Main/MigrationView.swift | 6++++--
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/TalerWallet1/Controllers/Controller.swift b/TalerWallet1/Controllers/Controller.swift @@ -194,9 +194,6 @@ class Controller: ObservableObject { } #endif - var isIpad : Bool { UIDevice.current.userInterfaceIdiom == .pad } - var isIphone : Bool { UIDevice.current.userInterfaceIdiom == .phone } - var localizedAppName: String { #if TALER_WALLET let appName = "Taler Wallet" diff --git a/TalerWallet1/Views/Main/MigrationView.swift b/TalerWallet1/Views/Main/MigrationView.swift @@ -82,6 +82,8 @@ struct MigrationView: View { } } + var isIpad : Bool { UIDevice.current.userInterfaceIdiom == .pad } + var body: some View { let list = List { Section(header: Text("Update database")) { @@ -121,8 +123,8 @@ struct MigrationView: View { .talerFont(.body) } } else { - let device = controller.isIpad ? Text("this iPad", comment: "device") - : Text("this iPhone", comment: "device") + let device = isIpad ? Text("this iPad", comment: "device") + : Text("this iPhone", comment: "device") Text("The \(controller.localizedAppName) database on \(device) can be updated and will then be faster.", comment: "appName, device") .talerFont(.title) Text("This might take from a few seconds to a minute or two, depending on how many transactions you made.")