fix(recents): Only set list on queue state change when it's not empty

This commit is contained in:
Ahmad Ansori Palembani 2024-12-24 08:07:10 +07:00
parent f3cac7cac8
commit 640feb69ac
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -113,9 +113,9 @@ class RecentsPresenter(
}
presenterScope.launchIO {
downloadManager.queueState.collectLatest {
setDownloadedChapters(recentItems, it)
if (recentItems.isNotEmpty()) setDownloadedChapters(recentItems, it)
withUIContext {
view?.showLists(recentItems, true)
if (recentItems.isNotEmpty()) view?.showLists(recentItems, true)
view?.updateDownloadStatus(!downloadManager.isPaused())
}
}