mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 15:38:28 +02:00
Prevent login using keyboard when homeserver is loading.
This commit is contained in:
@@ -127,7 +127,7 @@ struct AuthenticationLoginScreen: View {
|
||||
Text(VectorL10n.next)
|
||||
}
|
||||
.buttonStyle(PrimaryActionButtonStyle())
|
||||
.disabled(!viewModel.viewState.hasValidCredentials || viewModel.viewState.isLoading)
|
||||
.disabled(!viewModel.viewState.canSubmit)
|
||||
.accessibilityIdentifier("nextButton")
|
||||
}
|
||||
}
|
||||
@@ -166,9 +166,9 @@ struct AuthenticationLoginScreen: View {
|
||||
isPasswordFocused = false
|
||||
}
|
||||
|
||||
/// Sends the `next` view action so long as valid credentials have been input.
|
||||
/// Sends the `next` view action so long as the form is ready to submit.
|
||||
func submit() {
|
||||
guard viewModel.viewState.hasValidCredentials else { return }
|
||||
guard viewModel.viewState.canSubmit else { return }
|
||||
viewModel.send(viewAction: .next)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user