komikku/app/src/main/java/eu/kanade/tachiyomi
Two-Ai 288fe0d888 Simplify PageHolder load Job (#9086)
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.

(cherry picked from commit 4635e58405eedce0b49fc69f7ccb190a7c600da9)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPageHolder.kt
2023-02-26 21:37:26 -05:00
..
crash Move more things around 2023-02-09 18:08:07 -05:00
data Don't apply Wi-Fi network restriction for manual library update jobs 2023-02-26 21:09:22 -05:00
extension Remove background extensions updates check 2023-02-26 21:08:36 -05:00
source Move some interactors to domain module 2023-02-09 18:15:16 -05:00
ui Simplify PageHolder load Job (#9086) 2023-02-26 21:37:26 -05:00
util Move more things around 2023-02-09 18:08:07 -05:00
widget Move more things around 2023-02-09 18:08:07 -05:00
App.kt Move more things around 2023-02-09 18:08:07 -05:00
AppInfo.kt Minor fixes 2022-08-06 18:25:28 -04:00
AppModule.kt Move more things around 2023-02-09 18:08:07 -05:00
Migrations.kt Remove background extensions updates check 2023-02-26 21:08:36 -05:00