[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 22/25: Announce
From: |
gnunet |
Subject: |
[taler-taler-ios] 22/25: Announce |
Date: |
Mon, 06 Nov 2023 20:40:29 +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 a26ecb96bacc36952265bc40fd532e1535cdb427
Author: Marc Stibane <marc@taler.net>
AuthorDate: Mon Nov 6 20:01:39 2023 +0100
Announce
---
TalerWallet1/Controllers/DebugViewC.swift | 12 ++++++++++++
TalerWallet1/Views/Exchange/ExchangeListView.swift | 4 +++-
TalerWallet1/Views/HelperViews/View+fitsSideBySide.swift | 9 +++++++++
3 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/TalerWallet1/Controllers/DebugViewC.swift
b/TalerWallet1/Controllers/DebugViewC.swift
index 9680f8f..50cbdca 100644
--- a/TalerWallet1/Controllers/DebugViewC.swift
+++ b/TalerWallet1/Controllers/DebugViewC.swift
@@ -127,6 +127,10 @@ struct DebugViewV: View {
.foregroundColor(.red)
.font(.system(size: 11)) // no accessibilityFont
.monospacedDigit()
+ .id("viewID")
+ .accessibilityLabel(Text("View.ID.", comment:
"AccessibilityLabel"))
+ .accessibilityValue(viewIDString)
+ .accessibilityHint("Shows which view you currently are on.")
Spacer()
}
.edgesIgnoringSafeArea(.top)
@@ -146,13 +150,21 @@ class DebugViewC: ObservableObject {
@Published var viewID: Int = 0
@Published var sheetID: Int = 0
+ func announce(this: String) {
+ if UIAccessibility.isVoiceOverRunning {
+ UIAccessibility.post(notification: .screenChanged, argument: this)
+ }
+ }
+
@MainActor func setViewID(_ newID: Int, stack: CallStack) -> Void {
if developerMode {
if viewID == 0 {
logger.log("switching ON, \(newID, privacy: .public)")
viewID = newID // publish ON
+ announce(this: "Current view is: \(newID).")
} else if viewID != newID {
logger.log("switching from \(self.viewID, privacy: .public) to
\(newID, privacy: .public)")
+ announce(this: "View switched from \(self.viewID) to
\(newID).")
viewID = newID // publish new
viewID
} else {
logger.log("\(newID, privacy: .public) stays")
diff --git a/TalerWallet1/Views/Exchange/ExchangeListView.swift
b/TalerWallet1/Views/Exchange/ExchangeListView.swift
index a809168..cc1d987 100644
--- a/TalerWallet1/Views/Exchange/ExchangeListView.swift
+++ b/TalerWallet1/Views/Exchange/ExchangeListView.swift
@@ -26,6 +26,7 @@ struct ExchangeListView: View {
do {
try await model.addExchange(url: exchange)
symLog.log("added: \(exchange)")
+ announce(this: "added: \(exchange)")
} catch { // TODO: error handling - couldn't add exchangeURL
symLog.log("error: \(error)")
}
@@ -50,9 +51,10 @@ struct ExchangeListView: View {
.navigationBarItems(leading: hamburger, trailing: plusButton)
.alert(addTitleStr, isPresented: $showAlert) {
TextField("Exchange address", text: $newExchange)
+// .textFieldStyle(.roundedBorder) Yikes: when adding
style the alert will stop showing the textfield! Don't do this.
Button(addButtonStr) {
addExchange(newExchange)
- }.buttonStyle(.borderedProminent)
+ }
Button("Cancel", role: .cancel) { }
} message: {
Text("Please enter the exchange URL")
diff --git a/TalerWallet1/Views/HelperViews/View+fitsSideBySide.swift
b/TalerWallet1/Views/HelperViews/View+fitsSideBySide.swift
index a76011c..fa4ca83 100644
--- a/TalerWallet1/Views/HelperViews/View+fitsSideBySide.swift
+++ b/TalerWallet1/Views/HelperViews/View+fitsSideBySide.swift
@@ -5,6 +5,15 @@
import SwiftUI
import UIKit
+extension View {
+ @MainActor
+ public func announce(this: String) {
+ if UIAccessibility.isVoiceOverRunning {
+ UIAccessibility.post(notification: .screenChanged, argument: this)
+ }
+ }
+}
+
extension View {
/// if sameSize then this searches for the longest title
/// returns true if any of the strings in 'titles' wouldn't fit in a view
1/'numViews' of the size of 'width', with 'spacing'
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 25/25: Bump version to 0.9.3 (24), (continued)
- [taler-taler-ios] 25/25: Bump version to 0.9.3 (24), gnunet, 2023/11/06
- [taler-taler-ios] 15/25: cleanup sortedTransactions, gnunet, 2023/11/06
- [taler-taler-ios] 07/25: IncompleteRowV, gnunet, 2023/11/06
- [taler-taler-ios] 09/25: Logger, gnunet, 2023/11/06
- [taler-taler-ios] 19/25: SendDone: Prevent double execution, gnunet, 2023/11/06
- [taler-taler-ios] 20/25: Debugging, gnunet, 2023/11/06
- [taler-taler-ios] 12/25: KYC - wip, gnunet, 2023/11/06
- [taler-taler-ios] 08/25: Accessibility, gnunet, 2023/11/06
- [taler-taler-ios] 17/25: ThreeAmountsV cleanup, gnunet, 2023/11/06
- [taler-taler-ios] 11/25: cleanup, gnunet, 2023/11/06
- [taler-taler-ios] 22/25: Announce,
gnunet <=