This had a bunch of issues around split pages not showing up properly so things
end up appearing to be missing while reading.
It'd be more worthwhile redoing the reader viewers than trying to get this to work
properly. It'd be better to just enable the split pages on download instead.
Closes#8433
These are basically 1-to-1 replacements for the existing RxJava APIs.
This will make the initial migration off of RxJava simpler. We'll
revisit the actual call flows in followup versions of the API.
We use the application ID now to ensure uniqueness if the same folder is selected
between different app versions/forks. This will make more sense once storage
settings are unified to a single location.
Also changes the file extension while we're at it so people stop accidentally
ungzipping it.
Implemented as an intermediate step in the existing Global Search share intent workflow.
If any source manages to resolve the URI (e.g., a URL, a slug, etc.), the resolved SManga entry
is directly opened. If nothing gets resolved, continue to a Global Search.
* Add private extension install method
Private extensions are put inside private data directory of the running app, so
this kind of extensions can only be used by the running app and not shared with
other apps.
One limitation of private extension is the lack of deeplink handlers (if there's
any) since the extension APK is not installed to the system.
When both kinds of extensions are installed with a same package name, shared
extension (the one installed to the system) will be used unless the version
codes are different. In that case the one with higher version code will be used.
* update
Fix bug of not fetch update if manual library refresh, no auto
If somehow manga missed check period, we would not give new next update cycle and it would forever left behind
* Add support to kotlin.time APIs in the rate limit interceptor.
* Add a missing line break in the doc.
* Move the specific host to the same file.
* Add kotlin.time rule to Proguard and remove specific host rule.
* Mark the old version as deprecated and address review.
* Remove unused import.
* Remove yet another unused import.
* Add Predict Interval Test
* Get mangas next update and interval in library update
* Get next update and interval in backup restore
* Display and set intervals, nextUpdate in Manga Info
* Move logic function to MangeScreen and InfoHeader
Update per suggestion
---------
Co-authored-by: arkon <arkon@users.noreply.github.com>
* refactor: backup and restore to support cross device sync.
* chore: Updated string resources
* refactor: change function name.
* refactor: Use URI SyncHolder.kt not needed anymore.
Pinned only setting is removed in favor of the UI in the global search screen itself, which defaults to pinned only.
This needs more UX improvements, but I'm not really sure what it should be like right now.
* add pinned and available filter chips to global search
* split filter predicate into seperate function
* change the global search available filter to has Results
* reordering of imports
* feat: added migrations.
* feat: create triggers, account for new installs.
* feat: update mappers to include the new field.
* feat: update backupManga and backupChapter.
Include the new fields to be backed up as well.
* feat: add sql query to fetch all manga with `last_favorited_at` field.
* feat: version bump.
* chore: revert and refactor.
* chore: forgot to lower case the field name.
* chore: added getAllManga query as well renamed `fetchMangaWithLastFavorite` to `getMangasWithFavoriteTimestamp`
* chore: oops that's not meant to be there.
* feat: back fill and set last_modified_at to not null.
* chore: remove redundant triggers.
* fix: build error, accidentally removed insert.
* fix: build error, accidentally removed insert.
* refactor: review pointer, make fields not null.
Fixes#9564
Avoids the issue of clearing the cache when the app is backgrounded despite being in the reader.
We could do a job on idle, but we'd still need to be careful around whether the reader is active,
so this is just simpler considering it's a separate activity.
* Serialize whole chapter numbers without decimal point and add library categories to genre
* added Tachiyomi specific ComicInfo Category field
* lint
* implemented requested changes
* Dialog for service tracker removal added, anilist query prepared
* added API delete requests for Mal and Kitsu
* implement and fix tracker delete for anilist, shikimori, mangaupdates
* implement and test mal delete request
* Update to dialog text to reflect current tracker
* finish kitsu api request and block bangumi tracker removal
* Change delete flag into interface, localise strings, clean up logs
* Add shikimori delete compatibility for already existing entries
* update track delete dialog prompt to include checkbox, update strings
* Update i18n/src/main/res/values/strings.xml
Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>
* Update i18n/src/main/res/values/strings.xml
---------
Co-authored-by: unknown <zaghdane@fireflow.de>
Co-authored-by: arkon <arkon@users.noreply.github.com>
Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>
* Refactor updateSuccessState
- Convert to inline function
- Use when for type safety if we add other MangaScreenState types
* Replace equivalent expressions with updateSuccessState
* Replace safe cast in MangaScreen
There seems to be little value in this feature, and juggling flag masks is annoying.
Per-category sorting is still a thing, but could be refactored away from the flag in the feature.
* Replace RxJava in extension installer
Replace common downloadsRelay with Map of individual StateFlows
* Drop RxRelay dependency
* Simplify updateAllExtensions
* Simplify addDownloadState/removeDownloadState
Use immutable Map functions instead of converting to MutableMap
* Add Grace Period value and settings
* Add functions to calculate nextUpdate
* update per review
* Move more into SetMangaUpdateInterval, keep wrapper
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.
* 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.