Fix isLoading live data
This commit is contained in:
@@ -13,8 +13,8 @@ class CountedBooleanLiveData : MutableLiveData<Boolean>(false) {
|
||||
counter--
|
||||
}
|
||||
val newValue = counter > 0
|
||||
if (newValue != value) {
|
||||
super.setValue(value)
|
||||
if (newValue != this.value) {
|
||||
super.setValue(newValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -137,6 +137,9 @@ class RemoteListViewModel(
|
||||
e.printStackTrace()
|
||||
}
|
||||
listError.value = e
|
||||
if (!mangaList.value.isNullOrEmpty()) {
|
||||
onError.postCall(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user