Fix characters erased from the Search field when the result are coming (#545)
This commit is contained in:
parent
3739e50d46
commit
b3d649a4d9
|
@ -11,7 +11,7 @@ Other changes:
|
||||||
-
|
-
|
||||||
|
|
||||||
Bugfix:
|
Bugfix:
|
||||||
-
|
- Fix characters erased from the Search field when the result are coming (#545)
|
||||||
|
|
||||||
Translations:
|
Translations:
|
||||||
-
|
-
|
||||||
|
|
|
@ -143,11 +143,16 @@ class PublicRoomsFragment : VectorBaseFragment(), PublicRoomsController.Callback
|
||||||
viewModel.loadMore()
|
viewModel.loadMore()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var initialValueSet = false
|
||||||
|
|
||||||
override fun invalidate() = withState(viewModel) { state ->
|
override fun invalidate() = withState(viewModel) { state ->
|
||||||
|
if (!initialValueSet) {
|
||||||
|
initialValueSet = true
|
||||||
if (publicRoomsFilter.query.toString() != state.currentFilter) {
|
if (publicRoomsFilter.query.toString() != state.currentFilter) {
|
||||||
// For initial filter
|
// For initial filter
|
||||||
publicRoomsFilter.setQuery(state.currentFilter, false)
|
publicRoomsFilter.setQuery(state.currentFilter, false)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Populate list with Epoxy
|
// Populate list with Epoxy
|
||||||
publicRoomsController.setData(state)
|
publicRoomsController.setData(state)
|
||||||
|
|
Loading…
Reference in New Issue