[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 25/30: cleanup
From: |
gnunet |
Subject: |
[taler-taler-ios] 25/30: cleanup |
Date: |
Sun, 19 Nov 2023 23:53:49 +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 da2fe9b573e9287c007cf3d0b1e1e633319ee259
Author: Marc Stibane <marc@taler.net>
AuthorDate: Sun Nov 19 22:06:32 2023 +0100
cleanup
---
TalerWallet1/Helper/CurrencySpecification.swift | 3 ++-
TalerWallet1/Views/Balances/PendingRowView.swift | 2 --
TalerWallet1/Views/Exchange/ManualWithdraw.swift | 7 ++-----
TalerWallet1/Views/HelperViews/AmountRowV.swift | 19 ++++++++-----------
.../Views/Transactions/TransactionDetailView.swift | 1 -
5 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/TalerWallet1/Helper/CurrencySpecification.swift
b/TalerWallet1/Helper/CurrencySpecification.swift
index 523a67a..812a962 100644
--- a/TalerWallet1/Helper/CurrencySpecification.swift
+++ b/TalerWallet1/Helper/CurrencySpecification.swift
@@ -90,11 +90,12 @@ public struct CurrencyInfo {
return nil
}
+ // TODO: use valueAsDecimalTuple instead of valueAsFloatTuple
func string(for valueTuple: (Double, Double), useSymbol: Bool = true) ->
String {
formatter.setUseSymbol(useSymbol)
let (integer, fraction) = valueTuple
if let integerStr = formatter.string(for: integer) {
- if fraction == 0 { return integerStr } // TODO: add
trailing zeroes
+ if fraction == 0 { return integerStr } // formatter
already added trailing zeroes
if let fractionStr = formatter.string(for: fraction) {
if let decimalSeparator = formatter.currencyDecimalSeparator {
if let fractionIndex = fractionStr.endIndex(of:
decimalSeparator) {
diff --git a/TalerWallet1/Views/Balances/PendingRowView.swift
b/TalerWallet1/Views/Balances/PendingRowView.swift
index 4b3ce6e..d6153f6 100644
--- a/TalerWallet1/Views/Balances/PendingRowView.swift
+++ b/TalerWallet1/Views/Balances/PendingRowView.swift
@@ -30,8 +30,6 @@ struct PendingRowView: View {
let pendingColor = WalletColors().pendingColor(incoming)
let imageName = incoming ? "plus.diamond" // goforward.plus
circle
: "minus.diamond" //
- let badgeName = needsKYC ? "star.fill"
- : "circle.fill"
let iconBadge = IconBadge(imageName: imageName, foreColor:
pendingColor, shouldConfirm: shouldConfirm, needsKYC: needsKYC)
let inTitle = iconOnly ? inTitle0 : inTitle1
diff --git a/TalerWallet1/Views/Exchange/ManualWithdraw.swift
b/TalerWallet1/Views/Exchange/ManualWithdraw.swift
index b1e4bd5..dc33b2c 100644
--- a/TalerWallet1/Views/Exchange/ManualWithdraw.swift
+++ b/TalerWallet1/Views/Exchange/ManualWithdraw.swift
@@ -32,8 +32,7 @@ struct ManualWithdraw: View {
let navTitle = String(localized: "NavTitle_Withdraw (currency)",
defaultValue: "Withdraw \(currency)")
// let agePicker = AgePicker(ageMenuList: $ageMenuList, selectedAge:
$selectedAge)
- ScrollView {
- VStack {
+ ScrollView { VStack {
CurrencyInputView(amount: $amountToTransfer,
available: nil,
title: iconOnly ? String(localized: "How
much:")
@@ -75,9 +74,7 @@ struct ManualWithdraw: View {
}
}
} // disabled
- Spacer()
- }
- }
+ } } // ScrollVStack
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal)
.background(WalletColors().backgroundColor.edgesIgnoringSafeArea(.all))
diff --git a/TalerWallet1/Views/HelperViews/AmountRowV.swift
b/TalerWallet1/Views/HelperViews/AmountRowV.swift
index eda77f1..8c981f1 100644
--- a/TalerWallet1/Views/HelperViews/AmountRowV.swift
+++ b/TalerWallet1/Views/HelperViews/AmountRowV.swift
@@ -19,26 +19,23 @@ struct AmountRowV<Content: View>: View {
var content: () -> Content
-
var body: some View {
+ let text = Text(amountStr)
+ .foregroundColor(amountColor)
+ .accessibilityFont(largeAmountFont ? .title : .title2)
+ .monospacedDigit()
if fitsHorizontal {
HStack(alignment: vertAlignment, spacing: 0) {
content()
Spacer(minLength: 0)
- Text(amountStr)
- .foregroundColor(amountColor)
- .accessibilityFont(largeAmountFont ? .title : .title2)
- .monospacedDigit()
+ text
}
} else {
VStack(alignment: .leading, spacing: 0) {
content()
HStack {
Spacer(minLength: 0)
- Text(amountStr)
- .foregroundColor(amountColor)
- .accessibilityFont(largeAmountFont ? .title : .title2)
- .monospacedDigit()
+ text
}
}
}
@@ -47,7 +44,7 @@ struct AmountRowV<Content: View>: View {
// MARK: -
#if DEBUG
-struct SectionWithAmountRow: View {
+struct PreviewSectionWithAmountRow: View {
@Environment(\.sizeCategory) var sizeCategory
@Environment(\.colorSchemeContrast) private var colorSchemeContrast
@@ -92,6 +89,6 @@ struct SectionWithAmountRow: View {
}
#Preview {
- SectionWithAmountRow()
+ PreviewSectionWithAmountRow()
}
#endif
diff --git a/TalerWallet1/Views/Transactions/TransactionDetailView.swift
b/TalerWallet1/Views/Transactions/TransactionDetailView.swift
index a715954..5d1c7f9 100644
--- a/TalerWallet1/Views/Transactions/TransactionDetailView.swift
+++ b/TalerWallet1/Views/Transactions/TransactionDetailView.swift
@@ -26,7 +26,6 @@ struct TransactionDetailView: View {
let stack: CallStack
let transactionId: String
let reloadAction: ((_ transactionId: String) async throws -> Transaction)
-
let navTitle: String?
let doneAction: (() -> Void)?
let abortAction: ((_ transactionId: String) async throws -> Void)?
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 01/30: Bugfix: Arithmetic error, (continued)
- [taler-taler-ios] 01/30: Bugfix: Arithmetic error, gnunet, 2023/11/19
- [taler-taler-ios] 06/30: Notifications, gnunet, 2023/11/19
- [taler-taler-ios] 19/30: tabbed button strings, gnunet, 2023/11/19
- [taler-taler-ios] 18/30: cleanup, gnunet, 2023/11/19
- [taler-taler-ios] 07/30: KYC, gnunet, 2023/11/19
- [taler-taler-ios] 03/30: Dismiss keyboard, gnunet, 2023/11/19
- [taler-taler-ios] 23/30: unify P2P subject, gnunet, 2023/11/19
- [taler-taler-ios] 21/30: fix shortcuts, gnunet, 2023/11/19
- [taler-taler-ios] 26/30: badge for button, gnunet, 2023/11/19
- [taler-taler-ios] 15/30: ScrollVStack, gnunet, 2023/11/19
- [taler-taler-ios] 25/30: cleanup,
gnunet <=
- [taler-taler-ios] 24/30: cleanup P2P, gnunet, 2023/11/19
- [taler-taler-ios] 17/30: accessibilityAddTraits, gnunet, 2023/11/19
- [taler-taler-ios] 11/30: cleanup, gnunet, 2023/11/19
- [taler-taler-ios] 29/30: cleanup notifications, gnunet, 2023/11/19
- [taler-taler-ios] 30/30: Bump version to 0.9.3 (27), gnunet, 2023/11/19
- [taler-taler-ios] 27/30: Remove PendingOps, gnunet, 2023/11/19
- [taler-taler-ios] 12/30: leadingCurrencySymbol, gnunet, 2023/11/19
- [taler-taler-ios] 13/30: cleanup, gnunet, 2023/11/19
- [taler-taler-ios] 14/30: needsKYC badge, gnunet, 2023/11/19
- [taler-taler-ios] 10/30: Remove PendingOps, gnunet, 2023/11/19