Fixed a bug in AlbumBrowseActivity that was causing unnecessary

requeries against the backend.
This commit is contained in:
casey langen 2018-01-03 23:45:17 -08:00
parent 03e134aab9
commit 3705c278d3

View File

@ -79,15 +79,16 @@ class AlbumBrowseActivity : BaseActivity(), Filterable {
}
override fun setFilter(filter: String) {
if (filter != lastFilter) {
lastFilter = filter
filterDebouncer.call(filter)
}
}
private fun initObservables() {
disposables.add(data.provider.observeState().subscribeBy(
onNext = { state ->
if (state.first == IDataProvider.State.Connected) {
filterDebouncer.call()
requery()
}
else {