focus input when changing server address

This commit is contained in:
Timuçin Boldt 2022-08-24 13:54:54 +02:00
parent 2b5920e451
commit b2212a7e2b
No known key found for this signature in database
GPG Key ID: FF0DE24863EB3618
2 changed files with 5 additions and 0 deletions

1
changelog.d/6926.misc Normal file
View File

@ -0,0 +1 @@
Focus input field when editing homeserver address to speed up login and registration.

View File

@ -28,6 +28,7 @@ import im.vector.app.core.extensions.content
import im.vector.app.core.extensions.editText
import im.vector.app.core.extensions.realignPercentagesToParent
import im.vector.app.core.extensions.setOnImeDoneListener
import im.vector.app.core.extensions.showKeyboard
import im.vector.app.core.extensions.toReducedUrl
import im.vector.app.core.utils.ensureProtocol
import im.vector.app.core.utils.ensureTrailingSlash
@ -91,6 +92,9 @@ class FtueAuthCombinedServerSelectionFragment :
val userUrlInput = state.selectedHomeserver.userFacingUrl?.toReducedUrlKeepingSchemaIfInsecure() ?: viewModel.getDefaultHomeserverUrl()
views.chooseServerInput.editText().setText(userUrlInput)
}
views.chooseServerInput.editText().selectAll()
views.chooseServerInput.editText().showKeyboard(true)
}
override fun onError(throwable: Throwable) {