[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 02/04: Omit "incomplete"
From: |
gnunet |
Subject: |
[taler-taler-ios] 02/04: Omit "incomplete" |
Date: |
Tue, 21 Nov 2023 22:59:56 +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 b05bc7bb8f95d456e94e523bfc1b95794cd55bc5
Author: Marc Stibane <marc@taler.net>
AuthorDate: Tue Nov 21 21:20:20 2023 +0100
Omit "incomplete"
---
TalerWallet.xcodeproj/project.pbxproj | 6 ----
TalerWallet1/Model/Model+Transactions.swift | 13 +-------
TalerWallet1/Model/Transaction.swift | 1 -
.../Views/Balances/BalancesSectionView.swift | 26 ---------------
TalerWallet1/Views/Balances/IncompleteRowV.swift | 39 ----------------------
5 files changed, 1 insertion(+), 84 deletions(-)
diff --git a/TalerWallet.xcodeproj/project.pbxproj
b/TalerWallet.xcodeproj/project.pbxproj
index 999c516..a704f14 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 */,
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/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
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.