[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 02/35: navigationBarTitleDisplayMode
From: |
gnunet |
Subject: |
[taler-taler-ios] 02/35: navigationBarTitleDisplayMode |
Date: |
Thu, 27 Jul 2023 09:09:35 +0200 |
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 f2bc812814ba3738aae30bff208f7a2300d03267
Author: Marc Stibane <marc@taler.net>
AuthorDate: Mon Jul 10 13:02:12 2023 +0200
navigationBarTitleDisplayMode
---
TalerWallet1/Model/Model+Payment.swift | 16 ++++++++++++++--
TalerWallet1/Views/Balances/BalancesListView.swift | 1 -
TalerWallet1/Views/Exchange/ExchangeListView.swift | 1 -
TalerWallet1/Views/HelperViews/LoadingView.swift | 3 ++-
TalerWallet1/Views/Main/MainView.swift | 1 +
.../Views/Settings/Pending/PendingOpsListView.swift | 1 -
TalerWallet1/Views/Sheets/Sheet.swift | 3 ++-
.../Views/Transactions/TransactionsListView.swift | 5 -----
.../Views/WithdrawBankIntegrated/WithdrawTOSView.swift | 1 -
9 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/TalerWallet1/Model/Model+Payment.swift
b/TalerWallet1/Model/Model+Payment.swift
index 6c60846..ac1d421 100644
--- a/TalerWallet1/Model/Model+Payment.swift
+++ b/TalerWallet1/Model/Model+Payment.swift
@@ -114,6 +114,16 @@ enum PreparePayResultType: String, Codable {
case insufficientBalance = "insufficient-balance"
}
+struct PayMerchantInsufficientBalanceDetails: Codable {
+ let amountRequested: Amount
+ let balanceAvailable: Amount
+ let balanceMaterial: Amount
+ let balanceAgeAcceptable: Amount
+ let balanceMerchantAcceptable: Amount
+ let balanceMerchantDepositable: Amount
+ let feeGapEstimate: Amount
+}
+
/// The result from PreparePayForUri
struct PaymentDetailsForUri: Codable {
let status: PreparePayResultType
@@ -121,8 +131,10 @@ struct PaymentDetailsForUri: Codable {
let contractTerms: MerchantContractTerms
let contractTermsHash: String
let amountRaw: Amount
- let amountEffective: Amount
- let talerUri: String
+ let amountEffective: Amount? // only if
status != insufficientBalance
+ let balanceDetails: PayMerchantInsufficientBalanceDetails? // only if
status == insufficientBalance
+ let paid: Bool? // only if
status == alreadyConfirmed
+// let talerUri: String?
}
/// A request to get an exchange's payment contract terms.
fileprivate struct PreparePayForUri: WalletBackendFormattedRequest {
diff --git a/TalerWallet1/Views/Balances/BalancesListView.swift
b/TalerWallet1/Views/Balances/BalancesListView.swift
index 790c4ee..00c65c9 100644
--- a/TalerWallet1/Views/Balances/BalancesListView.swift
+++ b/TalerWallet1/Views/Balances/BalancesListView.swift
@@ -86,7 +86,6 @@ struct BalancesListView: View {
centsToTransfer: $centsToTransfer, summary: $summary,
reloadAction: reloadAction)
.navigationTitle(navTitle)
- .navigationBarTitleDisplayMode(.automatic)
.navigationBarItems(leading: HamburgerButton(action:
hamburgerAction),
trailing: QRButton(action:
checkCameraAvailable))
.overlay {
diff --git a/TalerWallet1/Views/Exchange/ExchangeListView.swift
b/TalerWallet1/Views/Exchange/ExchangeListView.swift
index 45ea4a1..f36d510 100644
--- a/TalerWallet1/Views/Exchange/ExchangeListView.swift
+++ b/TalerWallet1/Views/Exchange/ExchangeListView.swift
@@ -54,7 +54,6 @@ struct ExchangeListView: View {
centsToTransfer: $centsToTransfer,
reloadAction: reloadAction)
.navigationTitle(navTitle)
- .navigationBarTitleDisplayMode(.automatic)
.navigationBarItems(leading: HamburgerButton(action: hamburgerAction),
trailing: PlusButton(action: plusAction)
.accessibilityLabel("Add Exchange"))
diff --git a/TalerWallet1/Views/HelperViews/LoadingView.swift
b/TalerWallet1/Views/HelperViews/LoadingView.swift
index 0c1c452..10450fc 100644
--- a/TalerWallet1/Views/HelperViews/LoadingView.swift
+++ b/TalerWallet1/Views/HelperViews/LoadingView.swift
@@ -23,6 +23,7 @@ struct LoadingView_Previews: PreviewProvider {
static var previews: some View {
NavigationView {
LoadingView(backButtonHidden: true)
- }
+ .navigationBarTitleDisplayMode(.automatic)
+ }.navigationViewStyle(.stack)
}
}
diff --git a/TalerWallet1/Views/Main/MainView.swift
b/TalerWallet1/Views/Main/MainView.swift
index 810e052..e81d23e 100644
--- a/TalerWallet1/Views/Main/MainView.swift
+++ b/TalerWallet1/Views/Main/MainView.swift
@@ -113,6 +113,7 @@ extension MainView {
.frame(maxWidth: .infinity, maxHeight: .infinity,
alignment: .center)
.transition(.backslide)
}
+ .navigationBarTitleDisplayMode(.automatic)
}.navigationViewStyle(.stack)
// The side view is on top of the current view
SideBarView(views: views,
diff --git a/TalerWallet1/Views/Settings/Pending/PendingOpsListView.swift
b/TalerWallet1/Views/Settings/Pending/PendingOpsListView.swift
index 66691b6..55cf5c7 100644
--- a/TalerWallet1/Views/Settings/Pending/PendingOpsListView.swift
+++ b/TalerWallet1/Views/Settings/Pending/PendingOpsListView.swift
@@ -44,7 +44,6 @@ extension PendingOpsListView {
PendingOpView(pendingOp: pendingOp)
}
.listStyle(myListStyle.style).anyView
- .navigationBarTitleDisplayMode(.large)
.onAppear() {
DebugViewC.shared.setViewID(VIEW_PENDING)
}
diff --git a/TalerWallet1/Views/Sheets/Sheet.swift
b/TalerWallet1/Views/Sheets/Sheet.swift
index 43b1895..c85966c 100644
--- a/TalerWallet1/Views/Sheets/Sheet.swift
+++ b/TalerWallet1/Views/Sheets/Sheet.swift
@@ -28,8 +28,9 @@ struct Sheet: View {
NavigationView {
sheetView
.navigationBarItems(leading: cancelButton)
+ .navigationBarTitleDisplayMode(.automatic)
.background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
- }
+ }.navigationViewStyle(.stack)
.overlay(alignment: .top) {
// Show the viewID on top of the sheet's NavigationView
Text(idString)
diff --git a/TalerWallet1/Views/Transactions/TransactionsListView.swift
b/TalerWallet1/Views/Transactions/TransactionsListView.swift
index d5a4f3c..b14e47e 100644
--- a/TalerWallet1/Views/Transactions/TransactionsListView.swift
+++ b/TalerWallet1/Views/Transactions/TransactionsListView.swift
@@ -22,9 +22,6 @@ struct TransactionsListView: View {
let _ = symLog.vlog() // just to get the # to compare it with
.onAppear & onDisappear
#endif
let count = transactions.count
- // TODO: Unlock the power of grammatical agreement
-// let title = AttributedString(localized: "^[\(count) Ticket](inflect:
true)")
-// let title: String = "\(count) \(navTitle)"
Content(symLog: symLog,
currency: currency,
transactions: transactions,
@@ -32,9 +29,7 @@ struct TransactionsListView: View {
myListStyle: $myListStyle,
reloadAllAction: reloadAllAction,
reloadOneAction: reloadOneAction)
-// .navigationTitle(title)
.navigationTitle(navTitle)
- .navigationBarTitleDisplayMode(.large) // .inline
.onAppear {
DebugViewC.shared.setViewID(VIEW_TRANSACTIONLIST)
}
diff --git a/TalerWallet1/Views/WithdrawBankIntegrated/WithdrawTOSView.swift
b/TalerWallet1/Views/WithdrawBankIntegrated/WithdrawTOSView.swift
index e7a4a53..bb7e552 100644
--- a/TalerWallet1/Views/WithdrawBankIntegrated/WithdrawTOSView.swift
+++ b/TalerWallet1/Views/WithdrawBankIntegrated/WithdrawTOSView.swift
@@ -39,7 +39,6 @@ struct WithdrawTOSView: View {
}
}
}
- .navigationBarTitleDisplayMode(.large) // .inline
.navigationTitle(navTitle)
.overlay {
if exchangeTOS == nil {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] branch master updated (ad57348 -> dbf44d6), gnunet, 2023/07/27
- [taler-taler-ios] 01/35: Test notes, gnunet, 2023/07/27
- [taler-taler-ios] 03/35: logging, gnunet, 2023/07/27
- [taler-taler-ios] 05/35: insufficientBalance, gnunet, 2023/07/27
- [taler-taler-ios] 02/35: navigationBarTitleDisplayMode,
gnunet <=
- [taler-taler-ios] 06/35: no need to call urlCommand async, gnunet, 2023/07/27
- [taler-taler-ios] 10/35: Atkinson Hyperlegible, gnunet, 2023/07/27
- [taler-taler-ios] 09/35: localizations, wording, gnunet, 2023/07/27
- [taler-taler-ios] 08/35: iOS 15: show ToS, gnunet, 2023/07/27
- [taler-taler-ios] 11/35: monospacedDigit, gnunet, 2023/07/27
- [taler-taler-ios] 07/35: iOS: bump version to 0.9.3 (15), gnunet, 2023/07/27
- [taler-taler-ios] 04/35: Settings: Reset wallet, gnunet, 2023/07/27
- [taler-taler-ios] 18/35: Expiration Constants, gnunet, 2023/07/27
- [taler-taler-ios] 19/35: Move Status to top, gnunet, 2023/07/27
- [taler-taler-ios] 25/35: Simplified, gnunet, 2023/07/27