Fix isLoading live data

This commit is contained in:
Koitharu
2022-04-19 12:50:30 +03:00
parent 3c739eed8e
commit 83eb0d9f23
2 changed files with 5 additions and 2 deletions

View File

@@ -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)
}
}
}

View File

@@ -137,6 +137,9 @@ class RemoteListViewModel(
e.printStackTrace()
}
listError.value = e
if (!mangaList.value.isNullOrEmpty()) {
onError.postCall(e)
}
}
}
}