Closes#9442 because I just removed the rounding entirely...
(cherry picked from commit 929a881943bd0a08b2209ee478be1fcd6539de7b)
# Conflicts:
# app/src/main/java/eu/kanade/presentation/manga/components/MangaChapterListItem.kt
The Dialog is handling it anyway, so this doesn't really do anything useful.
We might need to add this back if Dialog actually handles edge-to-edge properly.
(cherry picked from commit e3b27209246c60e2de7033976573681352fee7f9)
* Rename removeFromQueueByPredicate to removeFromQueueIf
Follow-up to PR comment in #9511
* Make Download hashCode stable
Mutating pages would previously change the Download hashCode, which
breaks HashMap lookups.
* Convert Donwloader subscription to coroutine
Replace downloadsRelay with activeDownloadsFlow. Instead of managing
a PublishRelay independent from the queue, derive a Flow of active
downloads directly from the queue StateFlow. (This will allow
updating the queue without pausing the downloader, to be done in a
follow-up PR.)
When a download completes successfully, the downloads is removed from
queueState. This updates activeDownloadsFlow and causes the
downloaderJob start the download job for the next active download.
When a download fails, the download is left in the queue, so
queueState is not modified. To make activeDownloadsFlow update
without a change to queueState, use transformLatest and use the
Download statusFlows to suspend until a download reaches the ERROR
state.
To avoid stopping and starting downloads every time
activeDownloadsFlow emits a new value, maintain a map of current
download Jobs and only start/stop jobs in the difference between
downloadJobs and activeDownloads. To make sure all child download
jobs are cancelled when the top-level downloader job is cancelled,
use supervisorScope.
* Remove obsolete main thread references in Downloader
Thread safety of the queue state used to be guaranteed by running all
queue mutation on the main thread, but this has not been true for
some time. Since the queue state is now backed by a StateFlow,
queueState can be safely updated by any thread.
(cherry picked from commit 3ae1e37c40fcfa43798377d2d9b8af58ec4498db)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt
This reverts commit ce81b76150006b9b23ad5424d49c3de36fb8c090.
Fixes crashes when opening menus. Cascade doesn't have an update
to fix this yet.
(cherry picked from commit b4bb8556751353c06531b55f3b052217254314c0)
Turns out that changing the pagerSnapDistance
is enough to achieve the same result.
(cherry picked from commit 96defd6b054101c540dc62907e43f4aa5db1ef6c)
Related to #8270
(cherry picked from commit bcd90be5254fbb3bbf0878a321d89620beb71707)
# Conflicts:
# app/src/main/java/eu/kanade/presentation/more/settings/screen/debug/WorkerInfoScreen.kt
* Implemented local cover encryption and made coil capable of reading encrypted cover archives
* add check that the file is not an image before determining that it is a zip file
Issues:
- Apache implementation relies on methods unavailable on lower Android API levels
- Using input stream implementation doesn't seem to read some files properly, but using
ZipFile implementation still requires reading the entire thing into memory
(cherry picked from commit 6f59c6c6bb12f1ef123abd418001c7a86d43ef7a)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ZipPageLoader.kt