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