Trim fields in assistant

This commit is contained in:
Sylvain Berfini 2024-02-28 16:48:02 +01:00
parent 9a1ca386ca
commit 40610fd98f
2 changed files with 2 additions and 2 deletions

View file

@ -206,6 +206,6 @@ class AccountLoginViewModel @UiThread constructor() : ViewModel() {
@UiThread
private fun isLoginButtonEnabled(): Boolean {
return sipIdentity.value.orEmpty().isNotEmpty() && password.value.orEmpty().isNotEmpty()
return sipIdentity.value.orEmpty().trim().isNotEmpty() && password.value.orEmpty().isNotEmpty()
}
}

View file

@ -58,7 +58,7 @@ class LandingViewModel @UiThread constructor() : ViewModel() {
@UiThread
fun login() {
coreContext.postOnCoreThread {
var identity = sipIdentity.value.orEmpty()
var identity = sipIdentity.value.orEmpty().trim()
if (!identity.startsWith("sip:")) {
identity = "sip:$identity"
}