[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 09/19: Accessibility String for Payment Sounds
From: |
gnunet |
Subject: |
[taler-taler-ios] 09/19: Accessibility String for Payment Sounds |
Date: |
Sat, 02 Sep 2023 22:01: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 845937233505f3824b8abbdec4b2d73ecc2761d1
Author: Marc Stibane <marc@taler.net>
AuthorDate: Thu Aug 31 20:57:06 2023 +0200
Accessibility String for Payment Sounds
---
TalerWallet1/Views/Settings/SettingsItem.swift | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/TalerWallet1/Views/Settings/SettingsItem.swift
b/TalerWallet1/Views/Settings/SettingsItem.swift
index df26904..a34f2c4 100644
--- a/TalerWallet1/Views/Settings/SettingsItem.swift
+++ b/TalerWallet1/Views/Settings/SettingsItem.swift
@@ -62,24 +62,30 @@ struct SettingsSpeaker: View {
var description: String?
var action: (_ value: Int) -> Void = {value in }
+ func imageName(_ value: Int) -> (String, String) {
+ return (value == 0) ? ("speaker.slash", String(localized:"off",
comment: "Accessibility String for Payment Sounds Off"))
+ : (value == 1) ? ("speaker.fill", String(localized:"Taler
Sounds", comment: "Accessibility String for Payment Sounds"))
+ : ("speaker", String(localized:"Apple Sounds",
comment: "Accessibility String for Payment Sounds"))
+ }
var body: some View {
VStack {
- let image = (value == 0) ? "speaker.slash"
- : (value == 1) ? "speaker.fill"
- : "speaker"
+ let image = imageName(value)
HStack {
Text(name)
.font(.title2)
Text(" ")
.font(.largeTitle)
Spacer()
- Image(systemName: image)
+ Image(systemName: image.0)
.font(.largeTitle)
+ .accessibilityLabel(image.1)
.onTapGesture {
if value > 0 {
value = -1
+ Controller.shared.playSound(1)
} else {
value = value + 1
+ Controller.shared.playSound(value)
}
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 01/19: Patch for CCCamp, removed extra, bump version to 0.9.3 (18), (continued)
- [taler-taler-ios] 01/19: Patch for CCCamp, removed extra, bump version to 0.9.3 (18), gnunet, 2023/09/02
- [taler-taler-ios] 03/19: Use sqlite3, gnunet, 2023/09/02
- [taler-taler-ios] 04/19: Rename, gnunet, 2023/09/02
- [taler-taler-ios] 02/19: Changed "Invoice" to "Request" (private mode - "Invoice" will be used in business mode post 1.0), roundedBorder for input fields, gnunet, 2023/09/02
- [taler-taler-ios] 08/19: IntegrationTest on test, gnunet, 2023/09/02
- [taler-taler-ios] 13/19: ScopedCurrencyInfo, SuperScriptDigit, gnunet, 2023/09/02
- [taler-taler-ios] 05/19: Comment, gnunet, 2023/09/02
- [taler-taler-ios] 18/19: Nunito Font, gnunet, 2023/09/02
- [taler-taler-ios] 16/19: Rename, fix, gnunet, 2023/09/02
- [taler-taler-ios] 14/19: CurrencyFormatter, gnunet, 2023/09/02
- [taler-taler-ios] 09/19: Accessibility String for Payment Sounds,
gnunet <=
- [taler-taler-ios] 12/19: CachePath for data not to be backed up, gnunet, 2023/09/02
- [taler-taler-ios] 11/19: Settings: Font: AtkinsonHyperlegible, gnunet, 2023/09/02
- [taler-taler-ios] 19/19: Font Settings, gnunet, 2023/09/02
- [taler-taler-ios] 10/19: Comment, gnunet, 2023/09/02
- [taler-taler-ios] 06/19: Rename, gnunet, 2023/09/02
- [taler-taler-ios] 15/19: group, gnunet, 2023/09/02
- [taler-taler-ios] 07/19: secret-token:secret, gnunet, 2023/09/02
- [taler-taler-ios] 17/19: GNU Taler, Taler Wallet, gnunet, 2023/09/02