gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]