checking the input field content for emptyness rather than its child count, fixes flaky initial value setting

This commit is contained in:
Adam Brown 2022-04-04 16:25:00 +01:00
parent 8b2e2a16e2
commit c022a38dd4

View file

@ -57,7 +57,7 @@ class FtueAuthCombinedServerSelectionFragment @Inject constructor() : AbstractFt
} }
override fun updateWithState(state: OnboardingViewState) { override fun updateWithState(state: OnboardingViewState) {
if (views.chooseServerInput.isEmpty()) { if (views.chooseServerInput.content().isEmpty()) {
val userUrlInput = state.selectedHomeserver.sourceUrl?.toReducedUrlKeepingSchemaIfInsecure() val userUrlInput = state.selectedHomeserver.sourceUrl?.toReducedUrlKeepingSchemaIfInsecure()
views.chooseServerInput.editText().setText(userUrlInput) views.chooseServerInput.editText().setText(userUrlInput)
} }