mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-05 23:35:04 +01:00
4635e58405
Inline statusJob into loadJob, using supervisorScope to load the page and track status changes in parallel. - supervisorScope does not complete until both the child loadPage coroutine and statusFlow.collectLatest have completed. - Cancelling supervisorScope cancels the child loadPage coroutine and statusFlow.collectLatest. - Use supervisorScope instead of coroutineScope to let status collection continue if loadPage fails. Inline progressJob into loadJob, using collectLatest's cancellation to avoid cancelling the progressFlow collection explicitly. - collectLatest cancels the previous action block when the flow emits a new value. This means the DOWNLOAD_IMAGE progressFlow.collectLatest gets automatically cancelled when statusFlow emits a new state. Convert launchLoadJob to suspend function, move job launch to caller, and rename as loadPageAndProcessStatus. |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
build.gradle.kts | ||
proguard-android-optimize.txt | ||
proguard-rules.pro | ||
shortcuts.xml |