gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] branch master updated (f7e86aa -> be6a335)


From: gnunet
Subject: [taler-taler-ios] branch master updated (f7e86aa -> be6a335)
Date: Tue, 21 Nov 2023 22:59:54 +0100

This is an automated email from the git hooks/post-receive script.

marc-stibane pushed a change to branch master
in repository taler-ios.

    from f7e86aa  VersionInfo
     new 6faeced  code optional
     new b05bc7b  Omit "incomplete"
     new 12203ac  strikethrough
     new be6a335  Bump version to 0.9.3 (28)

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 TalerWallet.xcodeproj/project.pbxproj              | 10 ++----
 TalerWallet1/Helper/CurrencySpecification.swift    |  2 +-
 TalerWallet1/Model/Model+Transactions.swift        | 13 +-------
 TalerWallet1/Model/Transaction.swift               |  1 -
 TalerWallet1/Views/Balances/BalanceRowView.swift   |  2 +-
 .../Views/Balances/BalancesSectionView.swift       | 26 ---------------
 TalerWallet1/Views/Balances/IncompleteRowV.swift   | 39 ----------------------
 TalerWallet1/Views/HelperViews/AmountRowV.swift    | 10 +++---
 .../Views/Transactions/TransactionRowView.swift    |  7 ++--
 TestFlight/WhatToTest.en-US.txt                    |  7 ++++
 10 files changed, 23 insertions(+), 94 deletions(-)
 delete mode 100644 TalerWallet1/Views/Balances/IncompleteRowV.swift

diff --git a/TalerWallet.xcodeproj/project.pbxproj 
b/TalerWallet.xcodeproj/project.pbxproj
index 999c516..5df7760 100644
--- a/TalerWallet.xcodeproj/project.pbxproj
+++ b/TalerWallet.xcodeproj/project.pbxproj
@@ -42,7 +42,6 @@
                4E3EAE2D2A990778009F1BE8 /* Model+Exchange.swift in Sources */ 
= {isa = PBXBuildFile; fileRef = 4E3B4BC82A42BC4800CC88B8 /* 
Model+Exchange.swift */; };
                4E3EAE2E2A990778009F1BE8 /* QRCodeDetailView.swift in Sources 
*/ = {isa = PBXBuildFile; fileRef = 4E5A88F42A38A4FD00072618 /* 
QRCodeDetailView.swift */; };
                4E3EAE2F2A990778009F1BE8 /* TransactionsEmptyView.swift in 
Sources */ = {isa = PBXBuildFile; fileRef = 4E87C8722A31CB7F001C6406 /* 
TransactionsEmptyView.swift */; };
-               4E3EAE302A990778009F1BE8 /* IncompleteRowV.swift in Sources */ 
= {isa = PBXBuildFile; fileRef = 4E87C8742A34B411001C6406 /* 
IncompleteRowV.swift */; };
                4E3EAE312A990778009F1BE8 /* SendAmount.swift in Sources */ = 
{isa = PBXBuildFile; fileRef = 4E40E0BD29F25ABB00B85369 /* SendAmount.swift */; 
};
                4E3EAE332A990778009F1BE8 /* EqualIconWidthDomain.swift in 
Sources */ = {isa = PBXBuildFile; fileRef = 4E8E25322A1CD39700A27BFA /* 
EqualIconWidthDomain.swift */; };
                4E3EAE342A990778009F1BE8 /* SuperScriptDigits.swift in Sources 
*/ = {isa = PBXBuildFile; fileRef = 4EBA563E2A7FD9390084948B /* 
SuperScriptDigits.swift */; };
@@ -156,7 +155,6 @@
                4E753A082A0B6A5F002D9328 /* ShareSheet.swift in Sources */ = 
{isa = PBXBuildFile; fileRef = 4E753A072A0B6A5F002D9328 /* ShareSheet.swift */; 
};
                4E7940DE29FC307C00A9AEA1 /* P2PSubjectV.swift in Sources */ = 
{isa = PBXBuildFile; fileRef = 4E7940DD29FC307C00A9AEA1 /* P2PSubjectV.swift 
*/; };
                4E87C8732A31CB7F001C6406 /* TransactionsEmptyView.swift in 
Sources */ = {isa = PBXBuildFile; fileRef = 4E87C8722A31CB7F001C6406 /* 
TransactionsEmptyView.swift */; };
-               4E87C8752A34B411001C6406 /* IncompleteRowV.swift in Sources */ 
= {isa = PBXBuildFile; fileRef = 4E87C8742A34B411001C6406 /* 
IncompleteRowV.swift */; };
                4E8C17202A6509BB005B2392 /* 
Atkinson-Hyperlegible-Regular-102.otf in Resources */ = {isa = PBXBuildFile; 
fileRef = 4E8C171C2A6509BB005B2392 /* Atkinson-Hyperlegible-Regular-102.otf */; 
};
                4E8C17212A6509BB005B2392 /* 
Atkinson-Hyperlegible-Italic-102.otf in Resources */ = {isa = PBXBuildFile; 
fileRef = 4E8C171D2A6509BB005B2392 /* Atkinson-Hyperlegible-Italic-102.otf */; 
};
                4E8C17222A6509BB005B2392 /* Atkinson-Hyperlegible-Bold-102.otf 
in Resources */ = {isa = PBXBuildFile; fileRef = 4E8C171E2A6509BB005B2392 /* 
Atkinson-Hyperlegible-Bold-102.otf */; };
@@ -330,7 +328,6 @@
                4E7940DD29FC307C00A9AEA1 /* P2PSubjectV.swift */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path 
= P2PSubjectV.swift; sourceTree = "<group>"; };
                4E7CFD372A532CE100CBAFF3 /* WhatToTest.en-US.txt */ = {isa = 
PBXFileReference; lastKnownFileType = text; path = "WhatToTest.en-US.txt"; 
sourceTree = "<group>"; };
                4E87C8722A31CB7F001C6406 /* TransactionsEmptyView.swift */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.swift; path = TransactionsEmptyView.swift; sourceTree = "<group>"; };
-               4E87C8742A34B411001C6406 /* IncompleteRowV.swift */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path 
= IncompleteRowV.swift; sourceTree = "<group>"; };
                4E8C171C2A6509BB005B2392 /* 
Atkinson-Hyperlegible-Regular-102.otf */ = {isa = PBXFileReference; 
lastKnownFileType = file; path = "Atkinson-Hyperlegible-Regular-102.otf"; 
sourceTree = "<group>"; };
                4E8C171D2A6509BB005B2392 /* 
Atkinson-Hyperlegible-Italic-102.otf */ = {isa = PBXFileReference; 
lastKnownFileType = file; path = "Atkinson-Hyperlegible-Italic-102.otf"; 
sourceTree = "<group>"; };
                4E8C171E2A6509BB005B2392 /* Atkinson-Hyperlegible-Bold-102.otf 
*/ = {isa = PBXFileReference; lastKnownFileType = file; path = 
"Atkinson-Hyperlegible-Bold-102.otf"; sourceTree = "<group>"; };
@@ -696,7 +693,6 @@
                                4EB095362989CBFE0043A8A1 /* 
BalanceRowView.swift */,
                                4EB065432A4CD1A80039B91D /* TwoRowButtons.swift 
*/,
                                4EB095382989CBFE0043A8A1 /* 
PendingRowView.swift */,
-                               4E87C8742A34B411001C6406 /* 
IncompleteRowV.swift */,
                        );
                        path = Balances;
                        sourceTree = "<group>";
@@ -1044,7 +1040,6 @@
                                4E3EAE2D2A990778009F1BE8 /* 
Model+Exchange.swift in Sources */,
                                4E3EAE2E2A990778009F1BE8 /* 
QRCodeDetailView.swift in Sources */,
                                4E3EAE2F2A990778009F1BE8 /* 
TransactionsEmptyView.swift in Sources */,
-                               4E3EAE302A990778009F1BE8 /* 
IncompleteRowV.swift in Sources */,
                                4E605DAF2AADDD13002FB9A7 /* 
UIScreen+screenSize.swift in Sources */,
                                4E3EAE312A990778009F1BE8 /* SendAmount.swift in 
Sources */,
                                4E3EAE332A990778009F1BE8 /* 
EqualIconWidthDomain.swift in Sources */,
@@ -1150,7 +1145,6 @@
                                4E3B4BC92A42BC4800CC88B8 /* 
Model+Exchange.swift in Sources */,
                                4E5A88F52A38A4FD00072618 /* 
QRCodeDetailView.swift in Sources */,
                                4E87C8732A31CB7F001C6406 /* 
TransactionsEmptyView.swift in Sources */,
-                               4E87C8752A34B411001C6406 /* 
IncompleteRowV.swift in Sources */,
                                4E605DB02AADDD13002FB9A7 /* 
UIScreen+screenSize.swift in Sources */,
                                4E40E0BE29F25ABB00B85369 /* SendAmount.swift in 
Sources */,
                                4E8E25332A1CD39700A27BFA /* 
EqualIconWidthDomain.swift in Sources */,
@@ -1470,7 +1464,7 @@
                                CODE_SIGN_ENTITLEMENTS = 
"$(TARGET_NAME).entitlements";
                                CODE_SIGN_IDENTITY = "Apple Development";
                                CODE_SIGN_STYLE = Automatic;
-                               CURRENT_PROJECT_VERSION = 27;
+                               CURRENT_PROJECT_VERSION = 28;
                                DEVELOPMENT_TEAM = GUDDQ9428Y;
                                ENABLE_PREVIEWS = YES;
                                GENERATE_INFOPLIST_FILE = YES;
@@ -1512,7 +1506,7 @@
                                CODE_SIGN_ENTITLEMENTS = 
"$(TARGET_NAME).entitlements";
                                CODE_SIGN_IDENTITY = "Apple Development";
                                CODE_SIGN_STYLE = Automatic;
-                               CURRENT_PROJECT_VERSION = 27;
+                               CURRENT_PROJECT_VERSION = 28;
                                DEVELOPMENT_TEAM = GUDDQ9428Y;
                                ENABLE_PREVIEWS = YES;
                                GENERATE_INFOPLIST_FILE = YES;
diff --git a/TalerWallet1/Helper/CurrencySpecification.swift 
b/TalerWallet1/Helper/CurrencySpecification.swift
index 1d957f2..5b15d9a 100644
--- a/TalerWallet1/Helper/CurrencySpecification.swift
+++ b/TalerWallet1/Helper/CurrencySpecification.swift
@@ -164,7 +164,7 @@ public struct CurrencySpecification: Codable, Sendable {
     /// some name for this CurrencySpecification
     let name: String
     /// 3-char ISO 4217 code for global currency. Regional MUST be >= 4 letters
-    let code: String
+    let code: String?
     /// how much digits the user may enter after the decimal separator
     let fractionalInputDigits: Int
     /// €,$,£: 2;  some arabic currencies: 3,  ¥: 0
diff --git a/TalerWallet1/Model/Model+Transactions.swift 
b/TalerWallet1/Model/Model+Transactions.swift
index f8e171f..d6226cc 100644
--- a/TalerWallet1/Model/Model+Transactions.swift
+++ b/TalerWallet1/Model/Model+Transactions.swift
@@ -9,15 +9,9 @@ fileprivate let ASYNCDELAY: UInt = 0   //set e.g to 6 or 9 
seconds for debugging
 
 // MARK: -
 extension WalletModel {
-    static func specialTransactions(_ transactions: [Transaction]) -> 
[Transaction] {
-        transactions.filter { transaction in
-            transaction.isSpecial
-        }
-    }
-
     static func completedTransactions(_ transactions: [Transaction]) -> 
[Transaction] {
         transactions.filter { transaction in
-            transaction.isDone
+            !transaction.isPending
         }
     }
     static func pendingTransactions(_ transactions: [Transaction]) -> 
[Transaction] {
@@ -25,11 +19,6 @@ extension WalletModel {
             transaction.isPending
         }
     }
-    static func incompleteTransactions(_ transactions: [Transaction]) -> 
[Transaction] {
-        transactions.filter { transaction in
-            !transaction.isDone && !transaction.isPending
-        }
-    }
 }
 
 // MARK: -
diff --git a/TalerWallet1/Model/Transaction.swift 
b/TalerWallet1/Model/Transaction.swift
index 3f7c69e..a834698 100644
--- a/TalerWallet1/Model/Transaction.swift
+++ b/TalerWallet1/Model/Transaction.swift
@@ -447,7 +447,6 @@ enum Transaction: Decodable, Hashable, Identifiable, 
Sendable {
     var isAbSuspended: Bool { common.txState.major == .suspendedAborting }
     var isFailed     : Bool { common.txState.major == .failed }
     var isExpired    : Bool { common.txState.major == .expired }
-    var isSpecial    : Bool { !(isDone || isPending) }
 
     var isAbortable  : Bool { common.txActions.contains(.abort) }
     var isFailable   : Bool { common.txActions.contains(.fail) }
diff --git a/TalerWallet1/Views/Balances/BalanceRowView.swift 
b/TalerWallet1/Views/Balances/BalanceRowView.swift
index 241c503..962f2fa 100644
--- a/TalerWallet1/Views/Balances/BalanceRowView.swift
+++ b/TalerWallet1/Views/Balances/BalanceRowView.swift
@@ -25,7 +25,7 @@ struct BalanceButton: View {
                     let fitsSideBySide = iconOnly || 
Self.fitsSideBySide(titles, availableWidth: width,
                                                                   
sizeCategory: sizeCategory,
                                                                   padding: 20, 
sameSize: false)
-                    AmountRowV(amountStr: amountStr, amountColor: .primary, 
largeAmountFont: true,
+                    AmountRowV(amountStr: amountStr, amountColor: .primary, 
doneOrPending: true, largeAmountFont: true,
                                fitsHorizontal: fitsSideBySide, vertAlignment: 
.lastTextBaseline) {
                         Text(title)
                             .accessibilityFont(.title2)
diff --git a/TalerWallet1/Views/Balances/BalancesSectionView.swift 
b/TalerWallet1/Views/Balances/BalancesSectionView.swift
index 1e5cede..5b07055 100644
--- a/TalerWallet1/Views/Balances/BalancesSectionView.swift
+++ b/TalerWallet1/Views/Balances/BalancesSectionView.swift
@@ -25,13 +25,11 @@ struct BalancesSectionView {
     @EnvironmentObject private var model: WalletModel
     @EnvironmentObject private var controller: Controller
     @AppStorage("iconOnly") var iconOnly: Bool = false
-//    @AppStorage("moreContrast") var moreContrast: Bool = false
 
     @State private var isShowingDetailView = false
     @State private var transactions: [Transaction] = []
     @State private var completedTransactions: [Transaction] = []
     @State private var pendingTransactions: [Transaction] = []
-    @State private var incompleteTransactions: [Transaction] = []
 
     func reloadOneAction(_ transactionId: String) async throws -> Transaction {
         return try await model.getTransactionByIdT(transactionId)
@@ -51,12 +49,6 @@ struct BalancesSectionView {
         transactions = await model.transactionsT(stack.push(), currency: 
currency)
         pendingTransactions = WalletModel.pendingTransactions(transactions)
     }
-
-    func reloadIncomplete(_ stack: CallStack) async -> () {
-        let currency = balance.scopeInfo.currency
-        transactions = await model.transactionsT(stack.push(), currency: 
currency)
-        incompleteTransactions = 
WalletModel.incompleteTransactions(transactions)
-    }
 }
 
 extension BalancesSectionView: View {
@@ -91,23 +83,6 @@ extension BalancesSectionView: View {
                                 reloadPending: reloadPending,
                               reloadOneAction: reloadOneAction)
             }
-            if incompleteTransactions.count > 0 {
-                NavigationLink {
-//let _ = print("button: Incomplete Transactions: \(currency)")
-                    LazyView {
-                        TransactionsListView(stack: stack.push(),
-                                          navTitle: String(localized: 
"Incomplete", comment: "ViewTitle of TransactionList"),
-                                          currency: currency,
-                                      transactions: incompleteTransactions,
-                                        showUpDown: false,
-                                   reloadAllAction: reloadIncomplete,
-                                   reloadOneAction: reloadOneAction)
-                    }
-                } label: {
-                    IncompleteRowV(incompleteTransactions: 
$incompleteTransactions)
-                }
-
-            }
         } header: {
             BarGraphHeader(stack: stack.push(), currency: currency)
         }.id(sectionID)
@@ -117,7 +92,6 @@ extension BalancesSectionView: View {
                 let response = await model.transactionsT(stack.push(".task - 
reload Transactions"), currency: currency)
                 transactions = response
                 pendingTransactions = WalletModel.pendingTransactions(response)
-                incompleteTransactions = 
WalletModel.incompleteTransactions(response)
                 completedTransactions = 
WalletModel.completedTransactions(response)
                 shownSectionID = sectionID
 //            } else {
diff --git a/TalerWallet1/Views/Balances/IncompleteRowV.swift 
b/TalerWallet1/Views/Balances/IncompleteRowV.swift
deleted file mode 100644
index f76e7fc..0000000
--- a/TalerWallet1/Views/Balances/IncompleteRowV.swift
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * This file is part of GNU Taler, ©2022-23 Taler Systems S.A.
- * See LICENSE.md
- */
-import SwiftUI
-import taler_swift
-
-/// This view shows an incompleteTransactions row in a currency section, below 
the balance
-struct IncompleteRowV: View {
-    @Binding var incompleteTransactions: [Transaction]
-
-    var body: some View {
-        let count = incompleteTransactions.count
-        HStack {
-            Spacer()
-            Text("\(count) incomplete transactions")
-                .accessibilityFont(.title2)
-                .foregroundColor(WalletColors().incompleteColor)
-            Spacer()
-        }
-    }
-}
-// MARK: - Preview
-#if DEBUG
-fileprivate struct IncompleteRowContainer: View {
-    @State var incompleteTransactions: [Transaction] = []
-
-    var body: some View {
-        IncompleteRowV(incompleteTransactions: $incompleteTransactions)
-    }
-}
-struct IncompleteRowV_Previews: PreviewProvider {
-    static var previews: some View {
-        List {
-            IncompleteRowContainer()
-        }
-    }
-}
-#endif
diff --git a/TalerWallet1/Views/HelperViews/AmountRowV.swift 
b/TalerWallet1/Views/HelperViews/AmountRowV.swift
index 8c981f1..7fb6298 100644
--- a/TalerWallet1/Views/HelperViews/AmountRowV.swift
+++ b/TalerWallet1/Views/HelperViews/AmountRowV.swift
@@ -13,6 +13,7 @@ import taler_swift
 struct AmountRowV<Content: View>: View {
     let amountStr: String
     let amountColor: Color
+    let doneOrPending: Bool
     let largeAmountFont: Bool
     let fitsHorizontal: Bool
     let vertAlignment: VerticalAlignment
@@ -21,6 +22,7 @@ struct AmountRowV<Content: View>: View {
 
     var body: some View {
         let text = Text(amountStr)
+            .strikethrough(!doneOrPending)
             .foregroundColor(amountColor)
             .accessibilityFont(largeAmountFont ? .title : .title2)
             .monospacedDigit()
@@ -57,13 +59,13 @@ struct PreviewSectionWithAmountRow: View {
         let demoStr = demo.string(demoInfo)
         List {
             Section {
-                AmountRowV(amountStr: demoStr, amountColor: .primary, 
largeAmountFont: true,
+                AmountRowV(amountStr: demoStr, amountColor: .primary, 
doneOrPending: true, largeAmountFont: true,
                            fitsHorizontal: true, vertAlignment: 
.lastTextBaseline) {
                     Text(verbatim: "Balance")
                         .foregroundColor(colorSchemeContrast == .increased ? 
.primary : .secondary)
                         .accessibilityFont(.title2)
                 }
-                AmountRowV(amountStr: demoStr, amountColor: .primary, 
largeAmountFont: true,
+                AmountRowV(amountStr: demoStr, amountColor: .primary, 
doneOrPending: true, largeAmountFont: true,
                            fitsHorizontal: false, vertAlignment: 
.lastTextBaseline) {
                     Text(verbatim: "Balance")
                         .foregroundColor(colorSchemeContrast == .increased ? 
.primary : .secondary)
@@ -71,13 +73,13 @@ struct PreviewSectionWithAmountRow: View {
                 }
             }
             Section {
-                AmountRowV(amountStr: testStr, amountColor: .primary, 
largeAmountFont: false,
+                AmountRowV(amountStr: testStr, amountColor: .primary, 
doneOrPending: false, largeAmountFont: false,
                            fitsHorizontal: true, vertAlignment: 
.lastTextBaseline) {
                     Text(verbatim: "Balance")
                         .foregroundColor(colorSchemeContrast == .increased ? 
.primary : .secondary)
                         .accessibilityFont(.title2)
                 }
-                AmountRowV(amountStr: testStr, amountColor: .secondary, 
largeAmountFont: false,
+                AmountRowV(amountStr: testStr, amountColor: .secondary, 
doneOrPending: false, largeAmountFont: false,
                            fitsHorizontal: false, vertAlignment: 
.lastTextBaseline) {
                     Text(verbatim: "Balance")
                         .foregroundColor(colorSchemeContrast == .increased ? 
.primary : .secondary)
diff --git a/TalerWallet1/Views/Transactions/TransactionRowView.swift 
b/TalerWallet1/Views/Transactions/TransactionRowView.swift
index 514c1d6..f4a6aa4 100644
--- a/TalerWallet1/Views/Transactions/TransactionRowView.swift
+++ b/TalerWallet1/Views/Transactions/TransactionRowView.swift
@@ -73,14 +73,17 @@ struct TransactionRowContentV: View {
     var body: some View {
         let iconBadge = IconBadge(foreColor: foreColor, done: done, incoming: 
incoming,
                               shouldConfirm: shouldConfirm, needsKYC: needsKYC)
+        let doneOrPending = done || pending
         HStack(spacing: 8) {
             iconBadge
             VStack(alignment: .leading) {
                 Text(centerTop)
+                    .strikethrough(!doneOrPending)
                     .accessibilityFont(.headline)
 //                  .fontWeight(.medium)      iOS 16
                     .padding(.bottom, -2.0)
                 Text(centerBottom)
+                    .strikethrough(!doneOrPending)
                     .accessibilityFont(.callout)
             }
         }
@@ -123,8 +126,8 @@ struct TransactionRowView: View {
                                                           isHorizontal: false, 
sizeCategory: sizeCategory)
                 let needVStack = needVStack(available: width, contentWidth: 
contentWidth, valueWidth: amountWidth)
 
-                AmountRowV(amountStr: amountStr, amountColor: foreColor, 
largeAmountFont: false,
-                           fitsHorizontal: !needVStack, vertAlignment: 
.center) {
+                AmountRowV(amountStr: amountStr, amountColor: foreColor, 
doneOrPending: done || pending,
+                     largeAmountFont: false, fitsHorizontal: !needVStack, 
vertAlignment: .center) {
 
                     TransactionRowContentV(centerTop: 
transaction.localizedType,
                                         centerBottom: dateString, 
isHorizontal: true,
diff --git a/TestFlight/WhatToTest.en-US.txt b/TestFlight/WhatToTest.en-US.txt
index 75405e3..b91d35f 100644
--- a/TestFlight/WhatToTest.en-US.txt
+++ b/TestFlight/WhatToTest.en-US.txt
@@ -1,4 +1,11 @@
 
+Version 0.9.3 (28)
+
+• Unsuccessful (Incomplete) transactions no longer have their own list, but 
are now
+  included in the main transaction list.
+  But they still show the original amount instead of the real cost (fees) 
only. tbc
+
+
 Version 0.9.3 (27)
 
 • New feature: Badges for KYC and Confirm with bank (for bank-integrated 
withdrawals)

-- 
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]