taler-ios

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

commit 741d7e0be9a03ed277e2bf93242605aeea97c7f3
parent 45985cc94d0d8e8c18faf9630b299be52791f5a8
Author: Marc Stibane <marc@taler.net>
Date:   Mon, 24 Jul 2023 16:09:26 +0200

rendering on small screens

Diffstat:
MTalerWallet1/Controllers/DebugViewC.swift | 1+
MTalerWallet1/Views/Sheets/P2P_Sheets/P2pAcceptDone.swift | 43+++++++++++++++++++++----------------------
2 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/TalerWallet1/Controllers/DebugViewC.swift b/TalerWallet1/Controllers/DebugViewC.swift @@ -81,6 +81,7 @@ public let SHEET_RCV_REWARD = SHEET_PAYMENT + 10 // 150 Recei // MARK: P2P Pay Invoice // p2p pull debit - openURL (Link or scan QR) public let SHEET_PAY_P2P = SHEET_RCV_REWARD + 10 // 160 Pay P2P Invoice +public let SHEET_PAY_P2P_ACCEPT = SHEET_PAY_P2P + 2 // 162 Pay P2P AcceptView // MARK: P2P Receive Coins // p2p push credit - openURL (Link or scan QR) diff --git a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pAcceptDone.swift b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pAcceptDone.swift @@ -26,33 +26,32 @@ struct P2pAcceptDone: View { let _ = Self._printChanges() let _ = symLog.vlog() // just to get the # to compare it with .onAppear & onDisappear #endif - let navTitle = incoming ? String(localized: "Received P2P") - : String(localized: "Paid P2P") - ScrollViewReader { scrollView in - VStack { - TransactionDetailView(transactionId: transactionId, - reloadAction: reloadOneAction, - doneAction: { dismissTop() }) + let navTitle = incoming ? String(localized: "Received P2P", comment: "Title, short") + : String(localized: "Paid P2P", comment: "Title, short") + TransactionDetailView(transactionId: transactionId, + reloadAction: reloadOneAction, + doneAction: { dismissTop() }) .navigationBarBackButtonHidden(true) .interactiveDismissDisabled() // can only use "Done" button to dismiss .navigationTitle(navTitle) - }.onAppear() { - symLog.log("onAppear") - DebugViewC.shared.setSheetID(SHEET_RCV_P2P_ACCEPT) - }.task { - do { - if incoming { - _ = try await model.acceptPeerPushCreditM(transactionId) - } else { - _ = try await model.confirmPeerPullDebitM(transactionId) + .onAppear() { + symLog.log("onAppear") + DebugViewC.shared.setSheetID(incoming ? SHEET_RCV_P2P_ACCEPT + : SHEET_PAY_P2P_ACCEPT) + } + .task { + do { + if incoming { + _ = try await model.acceptPeerPushCreditM(transactionId) + } else { + _ = try await model.confirmPeerPullDebitM(transactionId) + } + finished = true + } catch { // TODO: error + symLog.log(error.localizedDescription) + controller.playSound(0) } - finished = true - } catch { // TODO: error - symLog.log(error.localizedDescription) - controller.playSound(0) } - } - } } } // MARK: -