Fix download status not updated properly after starting batch download (#7561)
(cherry picked from commit 473dc688f0bbb9732e3d75d137bc7025418d9bcf)
This commit is contained in:
parent
c69f53a8f4
commit
8bd7f95afc
@ -826,7 +826,7 @@ class MangaPresenter(
|
|||||||
downloadManager.queue.getStatusAsFlow()
|
downloadManager.queue.getStatusAsFlow()
|
||||||
.filter { /* SY --> */ if (isMergedSource) it.manga.id in mergedIds else /* SY <-- */ it.manga.id == successState?.manga?.id }
|
.filter { /* SY --> */ if (isMergedSource) it.manga.id in mergedIds else /* SY <-- */ it.manga.id == successState?.manga?.id }
|
||||||
.catch { error -> logcat(LogPriority.ERROR, error) }
|
.catch { error -> logcat(LogPriority.ERROR, error) }
|
||||||
.collectLatest {
|
.collect {
|
||||||
withUIContext {
|
withUIContext {
|
||||||
updateDownloadState(it)
|
updateDownloadState(it)
|
||||||
}
|
}
|
||||||
@ -838,7 +838,7 @@ class MangaPresenter(
|
|||||||
downloadManager.queue.getProgressAsFlow()
|
downloadManager.queue.getProgressAsFlow()
|
||||||
.filter { /* SY --> */ if (isMergedSource) it.manga.id in mergedIds else /* SY <-- */ it.manga.id == successState?.manga?.id }
|
.filter { /* SY --> */ if (isMergedSource) it.manga.id in mergedIds else /* SY <-- */ it.manga.id == successState?.manga?.id }
|
||||||
.catch { error -> logcat(LogPriority.ERROR, error) }
|
.catch { error -> logcat(LogPriority.ERROR, error) }
|
||||||
.collectLatest {
|
.collect {
|
||||||
withUIContext {
|
withUIContext {
|
||||||
updateDownloadState(it)
|
updateDownloadState(it)
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ class UpdatesPresenter(
|
|||||||
observeDownloadsStatusJob = presenterScope.launchIO {
|
observeDownloadsStatusJob = presenterScope.launchIO {
|
||||||
downloadManager.queue.getStatusAsFlow()
|
downloadManager.queue.getStatusAsFlow()
|
||||||
.catch { error -> logcat(LogPriority.ERROR, error) }
|
.catch { error -> logcat(LogPriority.ERROR, error) }
|
||||||
.collectLatest {
|
.collect {
|
||||||
withUIContext {
|
withUIContext {
|
||||||
updateDownloadState(it)
|
updateDownloadState(it)
|
||||||
}
|
}
|
||||||
@ -170,7 +170,7 @@ class UpdatesPresenter(
|
|||||||
observeDownloadsPageJob = presenterScope.launchIO {
|
observeDownloadsPageJob = presenterScope.launchIO {
|
||||||
downloadManager.queue.getProgressAsFlow()
|
downloadManager.queue.getProgressAsFlow()
|
||||||
.catch { error -> logcat(LogPriority.ERROR, error) }
|
.catch { error -> logcat(LogPriority.ERROR, error) }
|
||||||
.collectLatest {
|
.collect {
|
||||||
withUIContext {
|
withUIContext {
|
||||||
updateDownloadState(it)
|
updateDownloadState(it)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user