Fix isLoading live data

pull/149/head
Koitharu 4 years ago
parent 3c739eed8e
commit 83eb0d9f23
No known key found for this signature in database
GPG Key ID: 8E861F8CE6E7CE27

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

Loading…
Cancel
Save