Disable autocorrection on profile name
This commit is contained in:
parent
deac70359f
commit
84790080be
|
@ -401,6 +401,11 @@ extension View {
|
|||
// MARK: Validation
|
||||
|
||||
extension View {
|
||||
func themeProfileName() -> some View {
|
||||
autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
}
|
||||
|
||||
func themeURL(_ urlString: String?) -> some View {
|
||||
themeValidating(urlString, validator: Validators.url)
|
||||
.keyboardType(.asciiCapable)
|
||||
|
|
|
@ -44,6 +44,7 @@ enum AddProfileView {
|
|||
footer: themeErrorMessage(errorMessage)
|
||||
) {
|
||||
TextField(L10n.Global.Placeholders.profileName, text: $profileName, onCommit: onCommit)
|
||||
.themeProfileName()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ extension ProfileView {
|
|||
header: Text(L10n.Profile.Alerts.Rename.title)
|
||||
) {
|
||||
TextField(L10n.Global.Placeholders.profileName, text: $newName, onCommit: commitRenaming)
|
||||
.disableAutocorrection(true)
|
||||
.themeProfileName()
|
||||
.onAppear(perform: loadCurrentName)
|
||||
}
|
||||
}.themeSecondaryView()
|
||||
|
|
Loading…
Reference in New Issue