Commit Graph
200 Commits
Author SHA1 Message Date
w 65d7110e1e Remove libvips based imagedecoder and add progressive rendering (#4023) 2026-09-29 03:11:45 +06:00
MajorTanyaandMitchell Syer ec614bb4c3 Use Apollo GraphQL for Trackers with GraphQL APIs (#3827)
* Add Apollo for GraphQL interactions

* Migrate AniList to use Apollo

* Migrate Shikimori to use Apollo

Not all Shikimori requests can be served by their GraphQL API (notably
they do not offer any mutations), so those remain as-is.

* Migrate Suwayomi to use Apollo

Includes leveraging some slightly newer Suwayomi features,
specifically the Double/Float filter fixes first pre-released in
2.1.1985 on 2025-10-26 and first fully released in 2.1.2100 on
2026-05-08.

Considering the tachiyomix 1.6 extension lib changes were added in
Suwayomi 2.3.2223 on 2026-06-30, I think it is fair to depend on such
sorta-recent behaviour.

* Fix temp migration names and leftovers

* Create ApolloResponse.dataOrElse extension

Because Apollo doesn't throw exceptions and instead just provides them
as response attributes, the current ApolloResponse.awaitSuccess() is
useless and will be removed shortly.

This new extension function should wrap the basic handling of an
ApolloResponse object neatly.

Co-authored-by: Mitchell Syer <6090655+Syer10@users.noreply.github.com>

* Use dataOrElse in AnilistApi.kt

* Use dataOrElse in ShikimoriApi.kt

* Use dataOrElse in SuwayomiApi.kt

* Delete obsolete ApolloCall.awaitSuccess

* Migrate Kitsu to use Apollo

Kitsu has some unfortunate edges in its GraphQL API (such as returning
nonstandard bodies which don't play well with Apollo) but this should
be an equivalent implementation.

* Extract a MangaFragment for AniList

This simplifies the queries and the converters (which can now delegate
to the MangaFragment.toTrackSearch() method internally and adjust the
track as needed).

Also move the toALUser converter to AnilistUtils.kt to keep all
converters together.

Added a scalar-mapper for AL's CountryCode type.

* Minor consistency cleanup of the queries

* Store list entry ID not title ID for Shikimori

* Extract common MangaFragment for Shikimori

Also map the ISO8601Date to a Kotlin String in the service config.

* Map Kitsu's ISO8601DateTime to kotlin.time.Instant

Utilises Apollo's own adapter-core library which provides the mapper.

Requires opting in to ExperimentalTime until the library resolves the
outdated annotation.

Co-authored-by: Mitchell Syer <6090655+Syer10@users.noreply.github.com>

* Replace Kitsu TODO comment

So much for STOPSHIP preventing me shipping this...

* Bump Apollo version to 5.1.0

* Bump apollo-adapters-core to 0.8.0

Freshly released just earlier.
This resolves having to opt in to ExperimentalTime.

* Make new utils internal to align with #3908

* Fix leftover issues from merged #3828

This PR restructured the AniList and Kitsu user objects.

* Bump apollo to 5.2.0

* Remove unused attributes from queries

* Allow custom exception handler in dataOrElse

Enables callers to manually handle specific non-200 responses.

Callers MUST close the `ApolloHttpException.body` attached to the
passed exception to avoid resource and socket leaks.

Defaults to current behaviour of (re)throwing the status code with our
HttpException.

Utilized in KitsuApi.kt to specially handle Kitsu sending a 500 error
response when deleting library IDs not actually in a user's library
and falling back to the "throw as HttpException" if it's any other
error response.

* Rethrow networking/IO exceptions

This helps to avoid masking networking problems as "This isn't in your
list" problems.

Currently, the app shows "Failed to connect to ..." when the remote
server is unreachable (e.g. downtime, DNS block, etc) because that's
the message provided by the ConnectException thrown by Android's
network stack.

This change restores that behaviour, approximately.

Not the most elegant solution but it _should_ avoid false-positive
toasts.

---------

Co-authored-by: Mitchell Syer <6090655+Syer10@users.noreply.github.com>
2026-09-28 10:34:26 +06:00
AntsyLich 306befb214 Restrict raw database access to the data module
app no longer touches the database directly. Backup restore's queries move into a new RestoreRepository in :data, which restores a batch of entries all or nothing, stopping between entries if cancelled, as before. The remaining direct calls (excluded scanlators, clear database, backup creation, store and category restore) go through their repositories, and the database bindings move from AppBindings into :data.
2026-09-27 22:30:51 +06:00
w 7418f4e7bc Bump webgpuviewer (#3949)
* Continuous background color

* Use ImageDecoder instead of Kim

* Only get tag when in dual mode

* Update libs.versions.toml

* Make progress circle smaller and animate progress

* Fix long strip showing the menu at ends
2026-09-14 03:38:00 +06:00
MajorTanya baad5c59bb Clean up some missed unused imports (#3876) 2026-08-30 23:43:36 +06:00
tigeryu8900 ac249e3668 Exit early in CloudflareInterceptor when cloudflare challenge is interactive (#3842) 2026-08-23 10:50:31 +00:00
AntsyLich b2015d1ef3 Migrate to Metro DI (#3608)
Assisted-by: Claude:claude-opus-5
2026-08-16 18:47:48 +00:00
w 00fb597ae9 Drop legacy decoder (#3786) 2026-08-16 15:48:58 +00:00
AntsyLich b1efee47f5 Replace StateViewModel with explicit backing fields (#3763)
Assisted-by: Claude:claude-opus-5
2026-08-14 19:53:06 +00:00
w 5c3ae37d52 Add high quality WebGPU renderer (#3388) 2026-08-14 23:01:00 +06:00
AntsyLich 55be95dd5d Improve WebView spoofing (#3678)
- Spoof `Sec-CH-UA` client hints to match the user agent
- Fix `X-Requested-With` spoofing leaking to unrelated callers
- Update default user agent to Chrome 149
2026-08-02 20:05:21 +06:00
MajorTanya 6d69903a56 Replace java.time APIs with kotlin(x).(date)time (#3001)
* Replace java.time APIs with kotlin(x).(date)time

kotlinx-datetime explicitly says in its README that it does not cover
i18n, so we have to stick with using their toJavaX converters wherever
we localise dates and times.

Yes, some of these replacements are... questionable. But I wanted to
try and maximise the replacement for now.

* Bump kotlinx-datetime to 0.8.0

* More kotlin.time/kotlinx-datetime replacements

* Remove redundant init block & make attributes val

* Replace new use of java.time.Instant
2026-08-02 16:58:25 +06:00
NGB-Was-Taken 47d7c0f2ea Optimize imports across all modules (#3635)
* Run optimize imports across all modules since spotless doesn't catch unused imports

* Remove import by adding qualifier in KDoc
2026-07-23 22:46:58 +06:00
Mohannad 6981185f4b Fix incorrect progress when resuming resumable image downloads (#3616) 2026-07-21 17:46:57 +06:00
AntsyLich c3b99aea07 Migrate to AndroidX ViewModel from Voyager ScreenModel (#3594) 2026-07-15 21:19:11 +06:00
AntsyLich 44780e74b5 Add vertical chapter navigator for paged reader with height adjustment option (#3531) 2026-07-09 08:11:56 +00:00
d8c3440d37 Support resumable image downloads if supported by source (#3167)
Co-authored-by: MajorTanya <39014446+MajorTanya@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2026-07-01 00:20:43 +06:00
AntsyLich c397d657d1 Remove BrotliInterceptor from default client (#3458) 2026-06-23 19:40:02 +06:00
AntsyLich 80541831bb Revert "Use app scoped CoroutineScope (#3403)"
This reverts commit 509eee5dfb.

Fixes #3429
2026-06-18 17:40:01 +06:00
AntsyLich 5896d2c939 Fix compatibility with older backups
Fixes #3413
2026-06-16 03:18:12 +06:00
AntsyLich 94cab02c1e Adapt model implementation for TachiyomiX 1.6 (#3412) 2026-06-15 17:32:39 +00:00
MajorTanya aa6742bf3e Suppress more tachiyomix-related deprecations (#3409) 2026-06-14 20:47:11 +06:00
AntsyLich 430b13bb81 Adapt network implementation for TachiyomiX 1.6 (#3248) 2026-06-14 02:10:55 +06:00
AntsyLich a6f0cec083 Use . toDrawable extension function in ImageUtil 2026-06-13 23:57:35 +06:00
AntsyLich 6ae79d255d Address various redundant constructs 2026-06-13 23:57:35 +06:00
AntsyLich 509eee5dfb Use app scoped CoroutineScope (#3403) 2026-06-12 17:14:29 +06:00
AntsyLich 50b0ccb928 Add dedicated "Support Us" screen (#3200) 2026-04-09 19:56:24 +00:00
Leodyver SemillaandAntsyLich cfc69d8d0b Fix app trying to split long strip when not needed (#3121)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2026-04-08 20:27:44 +00:00
AntsyLich 209805359e Merge tag 'v0.19.7' 2026-03-25 23:58:00 +06:00
AntsyLich b40f1d3975 Fix app crash on startup on some Android TV
Why do you guys even exist
2026-03-23 21:12:30 +06:00
MajorTanya bc32308327 Address CancellableContinuation.resume deprecation (#3115)
According to the source docs, this has been a warning since
kotlinx.coroutines 1.9.0.
2026-03-21 20:17:35 +00:00
AntsyLich 4af8f1eab0 Cleanup and rework build logic (#3113) 2026-03-22 01:34:45 +06:00
AntsyLich e930f38608 Merge and cleanup version catalogs (#3103) 2026-03-20 21:15:40 +06:00
AntsyLich 87665736a9 Replace preference getter functions with properties (#3091) 2026-03-20 14:57:01 +06:00
AntsyLich f6b2684323 Add installation id for feature flags (#3052) 2026-03-10 23:53:11 +06:00
MajorTanya b543bc089a Clean up some build warnings (#2929)
* Replace deprecated rememberPlainTooltipPositionProvider

* Remove superfluous when branch

This when is marked as exhaustive.

* Replace deprecated LibrariesContainer call

AboutLibraries now wants us to produce the libraries ourselves.

* Replace deprecated ClipboardManager with Clipboard

Clipboard uses suspend functions, hence the coroutine scope addition.

* Use multi-dollar strs to simplify GraphQL queries

These have been available since Kotlin 2.1.

* Remove various redundant casts & conversions

- WebViewScreenContent: loadingState is in the LoadingState.Loading
  branch, no need to cast at all
- Bangumi: username is not modified, make val
- Kavita: token is already a String
- PagerViewerAdapter: insertPageLastPage is already null-checked
- PagerViewerAdapter: use reified filterIsInstance
- ReaderViewModel: chapter IDs are already Longs
- CloudflareInterceptor: webview is smart-cast to non-null here

* Replace deprecated MenuAnchorType

Literally just a typealias for ExposedDropdownMenuAnchorType anyway.

* OptimizeNonSkippingGroups is enabled by default

* Suppress shadowing warning

This is explicitly intentional according to the KDocs.

* Migrate Context Receivers to Context Parameters

Requires changing the compiler arg, but that is part of the migration:

https://blog.jetbrains.com/kotlin/2025/04/update-on-context-parameters

Apparently, the only visible change is that names are required now.
"_" can be used for anonymous context parameters.

* Fix expression bodies with explicit return

Naming conflict resolved by aliasing.

From 2.4/2.5 onward, these will only be allowed with explicit return
types, or have to be turned into a block body. I opted for the latter
since the function is reasonably dense already.

see: https://youtrack.jetbrains.com/issue/KTLC-288

* Suppress deprecation of non-AutoMirrored icons

We use these arrows for navigation in the Upcoming screen.
I strongly doubt the AutoMirrored versions would make sense for our
use-case.

* Explicitly opt-in to new annotation default rules

affects the following annotated value-parameters:
- Preference.SliderPreference.steps (`@IntRange`)
- ReaderViewModel.State.brightnessOverlayValue (`@IntRange`)
- ReadingMode.iconRes (`@DrawableRes`)
- MigrationListScreenModel.Dialog.Progress.progress (`@FloatRange`)

see: https://youtrack.jetbrains.com/issue/KT-73255
see: https://github.com/Kotlin/KEEP/blob/change-defaulting-rule/proposals/annotation-target-in-properties.md

Warning message was the following:

    This annotation is currently applied to the value parameter only, but in the future it will also be applied to field.
    - To opt in to applying to both value parameter and field, add '-Xannotation-default-target=param-property' to your compiler arguments.
    - To keep applying to the value parameter only, use the '@param:' annotation target.
2026-02-05 11:29:21 +06:00
AntsyLich 93b355a9ef Update donation link [skip ci] 2026-01-12 22:41:10 +06:00
Mend RenovateandAntsyLich 13552c5ffa Update dependency com.pinterest.ktlint:ktlint-cli to v1.8.0 (#2708)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-11-23 07:55:54 +00:00
Trevor Paley 6ab87c7931 Added proper multi window support in WebView instead of treating everything as a redirect (#2584) 2025-11-02 06:23:01 +00:00
AntsyLich f9793d3323 Bump app version code and default user agent 2025-11-01 01:47:20 +06:00
58b25d697f Improve handling of downloads for chapters with same metadata and optionally for OSes that don't support Unicode in filename (#2305)
Co-authored-by: jkim <jhskim@hotmail.com>
Co-authored-by: fatotak <111342761+fatotak@users.noreply.github.com>
Co-authored-by: MajorTanya <39014446+MajorTanya@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-10-08 05:07:09 +06:00
AntsyLich 9bf3f15fff Fix local source EPUB files not loading (#2369) 2025-08-07 09:05:15 +06:00
MajorTanya 33e0121a2a [skip ci] Fix superfluous string concat (#2339) 2025-08-03 05:26:12 +06:00
AntsyLich 358adb8cd1 Add donate link in more tab 2025-08-03 02:17:59 +06:00
AntsyLich e62cd0e816 Optimize and cleanup library code (#2329) 2025-08-02 03:04:23 +00:00
AwkwardPeak7andAntsyLich 2df3382148 Ensure app waits for Cloudflare challenge to complete before continuing (#2200)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-06-13 23:24:13 +06:00
Mend RenovateandAntsyLich 591e9c1356 Update dependency org.junit.jupiter:junit-jupiter to v5.13.1 (#1754)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-06-08 01:34:02 +06:00
AntsyLich 2b126f1ff5 Cleanup migrate manga dialog and related code (#2156) 2025-05-31 15:03:39 +00:00
AntsyLich 2e180005a0 Add migration config screen to select and prioritize target sources (#2144) 2025-05-28 15:04:44 +00:00
AntsyLich 8b7f355988 Switch default user agent to Android Chrome (#2048) 2025-04-26 19:29:33 +06:00