mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 20:13:36 +00:00
Fixed a bug in AlbumBrowseActivity that was causing unnecessary
requeries against the backend.
This commit is contained in:
parent
03e134aab9
commit
3705c278d3
@ -79,15 +79,16 @@ class AlbumBrowseActivity : BaseActivity(), Filterable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun setFilter(filter: String) {
|
override fun setFilter(filter: String) {
|
||||||
lastFilter = filter
|
if (filter != lastFilter) {
|
||||||
filterDebouncer.call(filter)
|
lastFilter = filter
|
||||||
|
filterDebouncer.call(filter)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initObservables() {
|
private fun initObservables() {
|
||||||
disposables.add(data.provider.observeState().subscribeBy(
|
disposables.add(data.provider.observeState().subscribeBy(
|
||||||
onNext = { state ->
|
onNext = { state ->
|
||||||
if (state.first == IDataProvider.State.Connected) {
|
if (state.first == IDataProvider.State.Connected) {
|
||||||
filterDebouncer.call()
|
|
||||||
requery()
|
requery()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user