[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 11/30: cleanup
From: |
gnunet |
Subject: |
[taler-taler-ios] 11/30: cleanup |
Date: |
Sun, 19 Nov 2023 23:53:35 +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 0a211407f8dded776981b2b38d96f29bdfef55e1
Author: Marc Stibane <marc@taler.net>
AuthorDate: Sat Nov 18 16:52:10 2023 +0100
cleanup
---
TalerWallet1/Views/Settings/SettingsItem.swift | 10 ++++-----
TalerWallet1/Views/Settings/SettingsView.swift | 28 +++++++++++++++-----------
2 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/TalerWallet1/Views/Settings/SettingsItem.swift
b/TalerWallet1/Views/Settings/SettingsItem.swift
index 61220e7..4c4bc72 100644
--- a/TalerWallet1/Views/Settings/SettingsItem.swift
+++ b/TalerWallet1/Views/Settings/SettingsItem.swift
@@ -83,11 +83,11 @@ struct SettingsFont: View {
let value: Int
let action: (Int) -> Void
- @State private var selected = 0
+ @State private var selectedFont = 0
let fonts = [String(localized: "Standard iOS Font"),
"Atkinson-Hyperlegible", "Nunito"]
var body: some View {
- Picker(title, selection: $selected, content: {
+ Picker(title, selection: $selectedFont, content: {
ForEach(0..<fonts.count, id: \.self, content: { index in
Text(fonts[index]).tag(index)
})
@@ -95,10 +95,10 @@ struct SettingsFont: View {
.accessibilityFont(.title2)
.pickerStyle(.menu)
.onAppear() {
- withAnimation { selected = value }
+ withAnimation { selectedFont = value }
}
- .onChange(of: selected) { selected in
- action(selected)
+ .onChange(of: selectedFont) { selectedF in
+ action(selectedF)
}
}
}
diff --git a/TalerWallet1/Views/Settings/SettingsView.swift
b/TalerWallet1/Views/Settings/SettingsView.swift
index f2c92c5..5451179 100644
--- a/TalerWallet1/Views/Settings/SettingsView.swift
+++ b/TalerWallet1/Views/Settings/SettingsView.swift
@@ -107,12 +107,15 @@ struct SettingsView: View {
if controller.hapticCapability.supportsHaptics {
SettingsToggle(name: String(localized: "Haptics"), value:
$useHaptics, id1: "haptics",
description: hideDescriptions ? nil :
String(localized: "Vibration Feedback"))
+ .id("playHaptics")
}
SettingsSpeaker(name: String(localized: "Play Payment
Sounds"), value: $playSounds,
description: hideDescriptions ? nil :
String(localized: "When a transaction finished"))
.id("playSounds")
SettingsFont(title: String(localized: "Font:"), value:
talerFont, action: redraw)
+ .id("font")
SettingsStyle(title: String(localized: "Liststyle:"),
myListStyle: $myListStyle)
+ .id("liststyle")
SettingsToggle(name: String(localized: "Minimalistic"), value:
$iconOnly, id1: "minimal",
description: hideDescriptions ? nil :
String(localized: "Omit text where possible")) {
hideDescriptions = iconOnly //withAnimation {
hideDescriptions = iconOnly }
@@ -123,10 +126,6 @@ struct SettingsView: View {
withAnimation { showDevelopItems = developerMode }
}
if showDevelopItems { // show or hide the following items
- SettingsToggle(name: String("Set 2 seconds delay"),
- value: $developDelay.onChange({ delay in
- walletCore.developDelay = delay}),
id1: "delay",
- description: hideDescriptions ? nil :
String("After each wallet-core action"))
SettingsItem(name: String("Withdraw \(DEMOCURRENCY)"),
id1: "demo1with",
description: hideDescriptions ? nil :
String("Get money for testing")) {
let title = "Withdraw"
@@ -143,7 +142,7 @@ struct SettingsView: View {
}
.buttonStyle(.bordered)
.disabled(withDrawDisabled)
- }.id("demoWithdraw")
+ }.id("demo1withdraw")
SettingsItem(name: String("Withdraw \(TESTCURRENCY)"),
id1: "test1with",
description: hideDescriptions ? nil :
String("Get money for testing")) {
let title = "Withdraw"
@@ -160,7 +159,12 @@ struct SettingsView: View {
}
.buttonStyle(.bordered)
.disabled(withDrawDisabled)
- }.id("testWithdraw")
+ }.id("test1withdraw")
+ SettingsToggle(name: String("Set 2 seconds delay"),
+ value: $developDelay.onChange({ delay in
+ walletCore.developDelay = delay}), id1: "delay",
+ description: hideDescriptions ? nil :
String("After each wallet-core action"))
+ .id("delay")
SettingsItem(name: String("Run Integration Test"),
id1: "demo1test",
description: hideDescriptions ? nil :
String("Perform basic test transactions")) {
let title = "Demo 1"
@@ -177,7 +181,7 @@ struct SettingsView: View {
}
.buttonStyle(.bordered)
.disabled(checkDisabled)
- }
+ }.id("demo1runTest")
SettingsItem(name: String("Run Integration Test"),
id1: "test1test",
description: hideDescriptions ? nil : "Perform
basic test transactions") {
let title = "Test 1"
@@ -194,7 +198,7 @@ struct SettingsView: View {
}
.buttonStyle(.bordered)
.disabled(checkDisabled)
- }
+ }.id("test1runTest")
SettingsItem(name: String("Run Integration Test V2"),
id1: "demo2test",
description: hideDescriptions ? nil :
String("Perform more test transactions")) {
let title = "Demo 2"
@@ -211,7 +215,7 @@ struct SettingsView: View {
}
.buttonStyle(.bordered)
.disabled(checkDisabled)
- }
+ }.id("demo2runTest")
SettingsItem(name: String("Run Integration Test V2"),
id1: "test2test",
description: hideDescriptions ? nil :
String("Perform more test transactions")) {
let title = "Test 2"
@@ -228,7 +232,7 @@ struct SettingsView: View {
}
.buttonStyle(.bordered)
.disabled(checkDisabled)
- }
+ }.id("test2runTest")
SettingsItem(name: String("Save Logfile"), id1: "save",
description: hideDescriptions ? nil :
String("Help debugging wallet-core")) {
Button("Save") {
@@ -237,7 +241,7 @@ struct SettingsView: View {
}
.buttonStyle(.bordered)
.disabled(true)
- }
+ }.id("saveLog")
SettingsItem(name: String("Reset Wallet"), id1:
"reset",
description: hideDescriptions ? nil :
String("Throw away all your money")) {
Button("Reset") {
@@ -245,7 +249,7 @@ struct SettingsView: View {
}
.buttonStyle(.bordered)
.disabled(didReset)
- }
+ }.id("resetWallet")
}
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] 18/30: cleanup, (continued)
- [taler-taler-ios] 18/30: cleanup, gnunet, 2023/11/19
- [taler-taler-ios] 07/30: KYC, gnunet, 2023/11/19
- [taler-taler-ios] 03/30: Dismiss keyboard, gnunet, 2023/11/19
- [taler-taler-ios] 23/30: unify P2P subject, gnunet, 2023/11/19
- [taler-taler-ios] 21/30: fix shortcuts, gnunet, 2023/11/19
- [taler-taler-ios] 26/30: badge for button, gnunet, 2023/11/19
- [taler-taler-ios] 15/30: ScrollVStack, gnunet, 2023/11/19
- [taler-taler-ios] 25/30: cleanup, gnunet, 2023/11/19
- [taler-taler-ios] 24/30: cleanup P2P, gnunet, 2023/11/19
- [taler-taler-ios] 17/30: accessibilityAddTraits, gnunet, 2023/11/19
- [taler-taler-ios] 11/30: cleanup,
gnunet <=
- [taler-taler-ios] 29/30: cleanup notifications, gnunet, 2023/11/19
- [taler-taler-ios] 30/30: Bump version to 0.9.3 (27), gnunet, 2023/11/19
- [taler-taler-ios] 27/30: Remove PendingOps, gnunet, 2023/11/19
- [taler-taler-ios] 12/30: leadingCurrencySymbol, gnunet, 2023/11/19
- [taler-taler-ios] 13/30: cleanup, gnunet, 2023/11/19
- [taler-taler-ios] 14/30: needsKYC badge, gnunet, 2023/11/19
- [taler-taler-ios] 10/30: Remove PendingOps, gnunet, 2023/11/19
- [taler-taler-ios] 09/30: Bugfix: set currency in buttonAction, gnunet, 2023/11/19
- [taler-taler-ios] 20/30: ViewThatFits instead of own computations, iconBadge, gnunet, 2023/11/19
- [taler-taler-ios] 16/30: ShortcutButton, gnunet, 2023/11/19