[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 01/32: nbs
From: |
gnunet |
Subject: |
[taler-taler-ios] 01/32: nbs |
Date: |
Sun, 14 Jul 2024 00:19:10 +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 e3173dd266df1460ac273373aca839a73042f2bc
Author: Marc Stibane <marc@taler.net>
AuthorDate: Wed Jun 26 14:53:36 2024 +0200
nbs
---
TalerWallet1/Controllers/PublicConstants.swift | 2 +-
taler-swift/Sources/taler-swift/Amount.swift | 12 +++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/TalerWallet1/Controllers/PublicConstants.swift
b/TalerWallet1/Controllers/PublicConstants.swift
index 0873a88..db70307 100644
--- a/TalerWallet1/Controllers/PublicConstants.swift
+++ b/TalerWallet1/Controllers/PublicConstants.swift
@@ -16,7 +16,7 @@ public let SEVENDAYS: UInt = 7 // 3..9
public let THIRTYDAYS: UInt = 30 // 10..30
public let EMPTYSTRING = "" // avoid automatic
translation of empty "" textLiterals in Text()
-public let NONBREAKING = "\u{00A0}"
+public let NONBREAKING: Character = "\u{00A0}"
public let CONFIRM_BANK = "circle.fill" // badge in PendingRow,
TransactionRow and TransactionSummary
public let NEEDS_KYC = "star.fill" // badge in PendingRow,
TransactionRow and TransactionSummary
public let PENDING_INCOMING = "plus.diamond"
diff --git a/taler-swift/Sources/taler-swift/Amount.swift
b/taler-swift/Sources/taler-swift/Amount.swift
index d7c9a4f..e38a1d8 100644
--- a/taler-swift/Sources/taler-swift/Amount.swift
+++ b/taler-swift/Sources/taler-swift/Amount.swift
@@ -4,6 +4,8 @@
*/
import Foundation
+fileprivate let NONBREAKING: Character = "\u{00A0}"
+
public func SuperScriptDigit(_ number: UInt32) -> String {
switch number {
case 0: return String("\u{2070}")
@@ -183,11 +185,15 @@ public final class Amount: Codable, Hashable, @unchecked
Sendable, CustomStringC
}
/// The string representation of the amount, formatted as
"`integer`.`fraction` `currency`" (with non-breaking space).
- public var readableDescription: String {
- let NONBREAKING = "\u{00A0}"
- return valueStr + NONBREAKING + currency
+ public var readableDescriptionNBS: String {
+ return valueStr + String(NONBREAKING) + currency
}
+ /// The string representation of the amount, formatted as
"`integer`.`fraction` `currency`" (with space (not non-breaking space)).
+ public var readableDescription: String {
+ return valueStr + " " + currency
+ }
+
/// Whether the value is valid. An amount is valid if and only if the
currency is not empty and the value is less than the maximum allowed value.
var valid: Bool {
if currency.range(of: Amount.currencyRegex, options:
.regularExpression) == nil {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] branch master updated (0877055 -> 49c8f03), gnunet, 2024/07/13
- [taler-taler-ios] 06/32: Confirm->Authorize, gnunet, 2024/07/13
- [taler-taler-ios] 01/32: nbs,
gnunet <=
- [taler-taler-ios] 04/32: useISO, gnunet, 2024/07/13
- [taler-taler-ios] 02/32: fix string replace, gnunet, 2024/07/13
- [taler-taler-ios] 07/32: wireFee, gnunet, 2024/07/13
- [taler-taler-ios] 08/32: new withdrawal procedure (amountIsEditable), gnunet, 2024/07/13
- [taler-taler-ios] 03/32: iso instead of symbol, fix formatting of currency strings, gnunet, 2024/07/13
- [taler-taler-ios] 05/32: move QR scanner into MainView, gnunet, 2024/07/13
- [taler-taler-ios] 15/32: minimalistic: no currency name, gnunet, 2024/07/13
- [taler-taler-ios] 18/32: cleanup, gnunet, 2024/07/13
- [taler-taler-ios] 28/32: Icons in transactions, gnunet, 2024/07/13
- [taler-taler-ios] 30/32: IconBadge improvements, gnunet, 2024/07/13