mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
Limit the custom status input to 30 characters. (#6139)
This commit is contained in:
+5
@@ -56,6 +56,11 @@ struct SettingsScreenUserStatusRow: View {
|
|||||||
.textFieldStyle(.compound(.raised))
|
.textFieldStyle(.compound(.raised))
|
||||||
.focused($isCustomFieldFocused)
|
.focused($isCustomFieldFocused)
|
||||||
.onAppear(perform: focusCustomField)
|
.onAppear(perform: focusCustomField)
|
||||||
|
.onChange(of: customText) { _, newValue in
|
||||||
|
if newValue.count > 30 {
|
||||||
|
customText = String(newValue.prefix(30))
|
||||||
|
}
|
||||||
|
}
|
||||||
.accessibilityLabel(L10n.screenSettingsUserStatusCustomHint)
|
.accessibilityLabel(L10n.screenSettingsUserStatusCustomHint)
|
||||||
.padding(.vertical, 3)
|
.padding(.vertical, 3)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user