mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Don't focus the user status text field during tests. (#6076)
This commit is contained in:
+6
-1
@@ -55,7 +55,7 @@ struct SettingsScreenUserStatusRow: View {
|
||||
TextField(L10n.screenSettingsUserStatusCustomHint, text: $customText)
|
||||
.textFieldStyle(.compound(.raised))
|
||||
.focused($isCustomFieldFocused)
|
||||
.onAppear { isCustomFieldFocused = true }
|
||||
.onAppear(perform: focusCustomField)
|
||||
.accessibilityLabel(L10n.screenSettingsUserStatusCustomHint)
|
||||
.padding(.vertical, 3)
|
||||
|
||||
@@ -101,6 +101,11 @@ struct SettingsScreenUserStatusRow: View {
|
||||
}
|
||||
}
|
||||
|
||||
private func focusCustomField() {
|
||||
guard !ProcessInfo.isRunningTests else { return }
|
||||
isCustomFieldFocused = true
|
||||
}
|
||||
|
||||
private func saveCustomStatus() {
|
||||
guard case let .customStatusInput(emoji) = mode else { return }
|
||||
action(.set(.init(text: customText, emoji: emoji)))
|
||||
|
||||
Reference in New Issue
Block a user