[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 30/204: QrButton in Actions
From: |
gnunet |
Subject: |
[taler-taler-ios] 30/204: QrButton in Actions |
Date: |
Thu, 05 Dec 2024 23:49:58 +0100 |
This is an automated email from the git hooks/post-receive script.
marc-stibane pushed a commit to branch master
in repository taler-ios.
commit bb5f7891351a8d394b54d2b3cc060f56a1e42fe7
Author: Marc Stibane <marc@taler.net>
AuthorDate: Sun Oct 6 09:39:04 2024 +0200
QrButton in Actions
---
TalerWallet1/Controllers/PublicConstants.swift | 1 +
TalerWallet1/Views/Actions/ActionsSheet.swift | 11 +++++++++++
TalerWallet1/Views/Main/MainView.swift | 1 +
3 files changed, 13 insertions(+)
diff --git a/TalerWallet1/Controllers/PublicConstants.swift
b/TalerWallet1/Controllers/PublicConstants.swift
index a43eb00..89b3eb4 100644
--- a/TalerWallet1/Controllers/PublicConstants.swift
+++ b/TalerWallet1/Controllers/PublicConstants.swift
@@ -126,4 +126,5 @@ extension Notification.Name {
static let RequestAction = Notification.Name("requestAction")
static let DepositAction = Notification.Name("depositAction")
static let WithdrawAction = Notification.Name("withdrawAction")
+ static let QrScanAction = Notification.Name("qrScanAction")
}
diff --git a/TalerWallet1/Views/Actions/ActionsSheet.swift
b/TalerWallet1/Views/Actions/ActionsSheet.swift
index dc4b00e..3c32599 100644
--- a/TalerWallet1/Views/Actions/ActionsSheet.swift
+++ b/TalerWallet1/Views/Actions/ActionsSheet.swift
@@ -33,6 +33,13 @@ struct ActionsSheet: View {
return false
}
+ @MainActor
+ func qrButtonTapped() {
+ dismissTop(stack.push())
+ NotificationCenter.default.post(name: .QrScanAction,
+ object: nil)
// will trigger NavigationLink
+ }
+
var body: some View {
VStack {
let width = UIScreen.screenWidth / 3
@@ -67,6 +74,10 @@ struct ActionsSheet: View {
.padding(.bottom, 20)
}
+ QRButton(action: qrButtonTapped)
+ .lineLimit(5)
+ .buttonStyle(TalerButtonStyle(type: .bordered, narrow: true,
aligned: .center))
+
SendRequestV(stack: stack.push(),
balances: $balances,
amountToTransfer: $amountToTransfer, // does still have the
wrong currency
diff --git a/TalerWallet1/Views/Main/MainView.swift
b/TalerWallet1/Views/Main/MainView.swift
index 09a88b8..77b6d5e 100644
--- a/TalerWallet1/Views/Main/MainView.swift
+++ b/TalerWallet1/Views/Main/MainView.swift
@@ -391,6 +391,7 @@ extension MainView {
.onNotification(.RequestAction) {
navModel.actionSelected = 2 }
.onNotification(.DepositAction) {
navModel.actionSelected = 3 }
.onNotification(.WithdrawAction){
navModel.actionSelected = 4 }
+ .onNotification(.QrScanAction) { cameraAction() }
}.id(viewState.rootViewId) // any change to
rootViewId triggers popToRootView behaviour
.navigationViewStyle(.stack)
.tag(Tab.balances)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 21/204: SendAmountV, (continued)
- [taler-taler-ios] 21/204: SendAmountV, gnunet, 2024/12/05
- [taler-taler-ios] 31/204: a11y, gnunet, 2024/12/05
- [taler-taler-ios] 33/204: BarGraph 15, trust GetTransactionsV2, gnunet, 2024/12/05
- [taler-taler-ios] 32/204: cleanup, gnunet, 2024/12/05
- [taler-taler-ios] 37/204: debugging, gnunet, 2024/12/05
- [taler-taler-ios] 44/204: cleanup, gnunet, 2024/12/05
- [taler-taler-ios] 50/204: amountLastUsed, gnunet, 2024/12/05
- [taler-taler-ios] 18/204: Unsuccessfull trial to fix TX-Detailview jump onAppear, gnunet, 2024/12/05
- [taler-taler-ios] 26/204: hide TabBarView, gnunet, 2024/12/05
- [taler-taler-ios] 40/204: EMPTYSTRING, gnunet, 2024/12/05
- [taler-taler-ios] 30/204: QrButton in Actions,
gnunet <=
- [taler-taler-ios] 43/204: no Cancel for sheets, gnunet, 2024/12/05
- [taler-taler-ios] 51/204: scope, gnunet, 2024/12/05
- [taler-taler-ios] 45/204: pull-to-refresh haptics, gnunet, 2024/12/05
- [taler-taler-ios] 47/204: RotatingTaler for demo money, gnunet, 2024/12/05
- [taler-taler-ios] 49/204: wording, gnunet, 2024/12/05
- [taler-taler-ios] 56/204: innerHeight, gnunet, 2024/12/05
- [taler-taler-ios] 60/204: Bump version to 0.13.4 (0.13.6), gnunet, 2024/12/05
- [taler-taler-ios] 55/204: cleanup, docu, gnunet, 2024/12/05
- [taler-taler-ios] 59/204: Layout, wording, gnunet, 2024/12/05
- [taler-taler-ios] 61/204: arrrow names & icons, gnunet, 2024/12/05