Merge pull request #6927 from noantiq/develop

FTUE: Make entering a custom Homeserver address faster by focusing the input
This commit is contained in:
Adam Brown 2022-08-26 10:43:13 +01:00 committed by GitHub
commit da2eddd857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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) {