Compare commits

...
4323 Commits
Author SHA1 Message Date
yenru0 f66a463393 Release 1.15.0 2026-10-08 17:48:29 +09:00
yenru0 33fd89041c Merge remote-tracking branch 'origin/main' 2026-10-08 17:45:37 +09:00
Dude so hot 40271d744b Fixup deser type 2026-10-08 16:36:38 +08:00
yenru0 e6eba042b9 Rewrite README for standalone fork 2026-10-08 17:29:09 +09:00
yenru0 aeb9b47228 Raise default API request timeout to 30s 2026-10-08 17:28:42 +09:00
yenru0 8b2ea9a418 Disable update check by default
The updater compares against upstream CI builds, which is meaningless
for this fork. Manual check still works.
2026-10-08 17:28:42 +09:00
yenru0 97bca3eecc Adopt standalone applicationId yenru0.yrkaierx.ehviewer 2026-10-08 17:28:42 +09:00
yenru0 d7c64f540b Gate Cronet engine behind enable_quic (default off)
Cronet bypasses the OkHttp DNS/SSL stack and would nullify the
anti-DPI hooks. enable_quic is the effective engine switch.
2026-10-08 17:28:23 +09:00
yenru0 793ba815f7 Restore built-in hosts, domain fronting and anti-DPI SNI evasion
- built-in hosts for exhentai/github (EhHostsConfig.kt)
- Cloudflare CDN suffix fallback for blocked domains (EhDns.kt)
- SNI spoofing to front host for domain-fronted TLS (EhSSLSocketFactory.kt)
2026-10-08 17:28:23 +09:00
Dude so hot d901326640 Support automatically download ci 2026-10-08 16:19:03 +08:00
Dude so hot de2321ce8f Fix repo url
Will add ci download later
2026-10-08 15:19:27 +08:00
Dude so hot 39398365e5 ChapterNavigator use RollingNumber, no dynamic size 2026-10-08 03:57:28 +08:00
Dude so hot baf8333b70 Refactor for upstream Slider api changes 2026-10-08 03:44:12 +08:00
Dude so hot 5c406ac8b0 Fix Slider api migration 2026-10-08 01:51:03 +08:00
Dude so hot f07ff61069 Move to collection literals 2026-10-08 01:05:02 +08:00
Dude so hot 2163238f48 Use aboutlibraries default style
It's refined enough.
2026-10-08 00:42:05 +08:00
Dude so hot 1f4b93bddd Upgrade rust toolchain 2026-10-08 00:03:58 +08:00
Dude so hot ab2c60824a Upgrade Kotlin deps 2026-10-07 23:49:40 +08:00
tarsinandDude so hot dbe455350d Forgejo CI (#1)
Co-authored-by: Dude so hot <djohn@fbi.gov>
Reviewed-on: https://codeberg.org/EhViewer/EhViewer/pulls/1
2026-10-07 16:48:55 +02:00
Dude so hot 78cb123af1 Enable LinkBuffer Composer 2026-08-22 19:25:58 +08:00
Dude so hot 5cd2496f7f Update rust toolchain 2026-08-22 19:21:05 +08:00
Dude so hot 06d4abd916 Notify Marshmallow deprecation in readme
For material3-ripple update
2026-08-22 18:27:39 +08:00
renovate[bot]andDude so hot 881ad21ea2 Update deps & Fix some deprecations (#3004)
* Update deps & Fix some deprecations

* fixup!

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2026-08-22 18:07:56 +08:00
FooIbar 257bfe843e Add missing nbsp and times entities 2026-07-27 11:27:21 +08:00
FooIbar 49eb3bc234 Separate thumbnail and gallery image caches
Prevent thumbnail cache from being evicted by gallery cache.
2026-06-08 17:04:49 +08:00
FooIbar 3006e25f3d Disable -Werror until Kotlin 2.4 support in IDE 2026-06-07 23:37:00 +08:00
FooIbar 79fbe9cbd0 Remove obsolete workaround 2026-06-07 22:42:29 +08:00
FooIbar 36b0eeef5a Kotlin 2.4 2026-06-07 22:31:24 +08:00
FooIbar eeeeb3ca0d Java 25 2026-06-07 20:25:22 +08:00
FooIbar 345dbc2b86 Target SDK 37 2026-06-07 00:09:06 +08:00
renovate[bot] cca4adc6a3 Lock file maintenance (#2982)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-16 06:53:58 +00:00
renovate[bot]andFooIbar 8decbed291 Update dependency rust-nightly to v2026-05-15 (#2977)
* Update dependency rust-nightly to v2026-05-15

* Fix clippy

* Fix fmt

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2026-05-16 06:39:56 +00:00
renovate[bot] 960ac5d2fe Update spotless to v8.5.1 (#2981)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-16 01:00:15 +00:00
renovate[bot] 20aef7f77c Update Rust crate quick-xml to 0.40 (#2980)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-16 00:59:31 +00:00
renovate[bot] 96d1ba780b Update kotlinx-coroutines monorepo to v1.11.0 (#2978)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-15 20:42:33 +00:00
renovate[bot] 8383821324 Update ktor monorepo to v3.5.0 (#2979)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-15 20:41:31 +00:00
renovate[bot] f46a5e4652 Update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.8.0 (#2976)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-15 16:54:20 +00:00
renovate[bot] d8d2e8299d Update compose.multiplatform to v1.11.0 (#2975)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-15 08:49:58 +00:00
renovate[bot] 284af1e6fb Update aboutlibraries to v14.2.0 (#2974)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-15 08:49:39 +00:00
renovate[bot] c7576a3941 Update Gradle to v9.5.1 (#2973)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-15 07:09:45 +00:00
renovate[bot] c216bc3b82 Update dependency com.google.devtools.ksp to v2.3.8 (#2972)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-15 07:08:22 +00:00
renovate[bot] 2ac3b179c0 Update dependency androidx.paging:paging-compose to v3.5.0 (#2970)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-07 01:09:37 +00:00
renovate[bot] aa2269fd9f Update moko.resources to v0.26.4 (#2968)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-06 21:18:12 +00:00
renovate[bot] 793a17afea Update dependency androidx.compose:compose-bom-alpha to v2026.05.00 (#2969)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-06 21:17:06 +00:00
renovate[bot] dab6dcc04d Update AGP to v9.2.1 (#2966)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-06 20:21:07 +00:00
renovate[bot] be398a6ab6 Update benchmark to v1.5.0-alpha06 (#2967)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-06 20:19:12 +00:00
renovate[bot] 80cffe479f Update aboutlibraries to v14.1.0 (#2963)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-01 18:20:30 +00:00
FooIbar 30c5fe38c4 Update Rust crate rxing to 0.9 2026-05-01 16:54:45 +08:00
renovate[bot] 87b538d703 Lock file maintenance (#2961)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-01 03:18:31 +00:00
renovate[bot] affe4ffbf1 Update Gradle to v9.5.0 (#2960)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-28 14:19:42 +00:00
renovate[bot] 3d74869187 Update kotlin monorepo to v2.3.21 (#2958)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-23 09:45:59 +00:00
renovate[bot] 58d90ff49c Update dependency com.google.devtools.ksp to v2.3.7 (#2957)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-23 02:49:28 +00:00
renovate[bot] 07217f1481 Update dependency androidx.biometric:biometric-compose to v1.4.0-alpha07 (#2955)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-22 20:47:42 +00:00
renovate[bot] cf87df35a6 Update dependency androidx.compose:compose-bom-alpha to v2026.04.01 (#2956)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-22 20:47:41 +00:00
renovate[bot] c69cb76ecd Update ktor monorepo to v3.4.3 (#2954)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-22 16:06:29 +00:00
renovate[bot] 0ad0cc771f Update AGP to v9.2.0 (#2953)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-21 16:11:48 +00:00
renovate[bot] ca8c6883f9 Update dependency sh.calvin.reorderable:reorderable to v3.1.0 (#2952)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-20 23:21:16 +00:00
renovate[bot] 812d9d9860 Lock file maintenance (#2950)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-15 01:42:22 +00:00
renovate[bot] f2673ddd9a Update AGP to v9.1.1 (#2949)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-13 17:52:22 +00:00
renovate[bot] a6f789f446 Update dependency libarchive to v3.8.7 (#2948)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-13 13:41:23 +00:00
renovate[bot] bba6ea4b3c Update softprops/action-gh-release action to v3 (#2947)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-12 05:52:14 +00:00
renovate[bot] ae6c664f03 Update aboutlibraries to v14.0.1 (#2946)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-09 21:37:31 +00:00
renovate[bot]andrenovate[bot] 2b3755a09c Update dependency androidx.compose:compose-bom-alpha to v2026.04.00 (#2943)
* Update dependency androidx.compose:compose-bom-alpha to v2026.04.00

* Fix deprecation

* Update compileSdk version to 37

* Suppress deprecation warning for DnsResolver usage

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <99822064+revonateB0T@users.noreply.github.com>
2026-04-09 19:25:23 +00:00
renovate[bot] efde6e9f3d Update kotlinx.serialization to v1.11.0 (#2945)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-09 19:02:40 +00:00
renovate[bot] cff64839bb Update moko.resources to v0.26.3 (#2944)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-09 09:32:12 +00:00
renovate[bot] d199b58f89 Update moko.resources to v0.26.2 (#2942)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-08 10:36:44 +00:00
renovate[bot] 8005f9be56 Update aboutlibraries to v14.0.0 (#2941)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-06 17:31:35 +00:00
renovate[bot] c13186da78 Update dependency me.saket.telephoto:zoomable to v0.19.0 (#2940)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-02 09:10:33 +00:00
renovate[bot] f407d38421 Update dependency rust-nightly to v2026-04-01 (#2939)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-01 07:57:32 +00:00
renovate[bot] 19af89d58a Lock file maintenance (#2937)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-01 00:57:04 +00:00
renovate[bot] b7b2d07d60 Update dependency liblzma to v5.8.3 (#2936)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-31 21:40:30 +00:00
renovate[bot] e8bba2a2e5 Update ktor monorepo to v3.4.2 (#2933)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-27 15:40:15 +00:00
renovate[bot]andFooIbar f8e01265d4 Update dependency androidx.biometric:biometric-compose to v1.4.0-alpha06 (#2929)
* Update dependency androidx.biometric:biometric-compose to v1.4.0-alpha06

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2026-03-27 10:45:47 +00:00
renovate[bot] e0c5763a47 Update dependency androidx.compose:compose-bom-alpha to v2026.03.01 (#2932)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-26 18:58:29 +00:00
renovate[bot] fe3fd59083 Update dependency androidx.browser:browser to v1.10.0 (#2931)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-25 21:29:06 +00:00
renovate[bot] 09693f91c7 Update dependency androidx.work:work-runtime to v2.11.2 (#2930)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-25 21:28:34 +00:00
renovate[bot] b69500a441 Update benchmark to v1.5.0-alpha05 (#2928)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-25 18:16:34 +00:00
renovate[bot] f344a9a0a5 Update gradle/actions action to v6 (#2926)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-23 21:23:20 +00:00
renovate[bot] ef62454c00 Update compose.multiplatform to v1.10.3 (#2924)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-19 21:00:47 +00:00
renovate[bot] fe2cd1b4f4 Update Gradle to v9.4.1 (#2923)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-19 13:16:10 +00:00
renovate[bot] 19b9fa3581 Update dependency com.diffplug.spotless to v8.4.0 (#2922)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-18 18:17:05 +00:00
renovate[bot] 431a8565ee Update dependency io.arrow-kt:arrow-stack to v2.2.2.1 (#2921)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-18 13:05:56 +00:00
renovate[bot] 3880f757a5 Update aboutlibraries to v14.0.0-b03 (#2920)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-17 17:20:15 +00:00
FooIbar acfc81056b Fix error handling when getting original image URL 2026-03-18 01:10:45 +08:00
FooIbar 5f1200a9b3 Silence a warning 2026-03-17 21:24:21 +08:00
renovate[bot] f370ae64ad Update kotlin monorepo to v2.3.20 (#2917)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-16 09:59:23 +00:00
renovate[bot] 509c818ed0 Update moko.resources to v0.26.1 (#2915)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-15 08:49:11 +00:00
renovate[bot] 124d1ff638 Lock file maintenance (#2914)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-15 01:12:57 +00:00
renovate[bot] 0348eba0fd Update dependency androidx.activity:activity-compose to v1.13.0 (#2908)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-12 19:08:40 +00:00
renovate[bot] 1d27292bf1 Update dependency androidx.datastore:datastore-preferences to v1.2.1 (#2912)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-12 19:08:02 +00:00
renovate[bot]andFooIbar 1619f6cce6 Update dependency androidx.core:core-ktx to v1.18.0 (#2910)
* Update dependency androidx.core:core-ktx to v1.18.0

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2026-03-12 15:22:59 +00:00
renovate[bot] 489538baaa Update dependency androidx.compose:compose-bom-alpha to v2026.03.00 (#2909)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-12 14:02:22 +00:00
renovate[bot] 8794b7cc4d Update dependency com.squareup.okio:okio to v3.17.0 (#2911)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-12 09:49:08 +00:00
renovate[bot] ebd114d10e Update dependency androidx.test.uiautomator:uiautomator to v2.4.0-beta02 (#2907)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-12 00:54:01 +00:00
renovate[bot] f17dd93f27 Update benchmark to v1.5.0-alpha04 (#2905)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-11 20:47:42 +00:00
renovate[bot] 899c2e14c8 Update dependency androidx.paging:paging-compose to v3.4.2 (#2906)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-11 20:47:17 +00:00
renovate[bot] ae50280fb1 Update dependency me.zhanghai.compose.preference:preference to v2.2.0 (#2904)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-11 09:17:34 +00:00
FooIbar a2bd809fbc Remove upstreamed patch 2026-03-11 11:02:58 +08:00
renovate[bot] 963f129bcf Update dependency libarchive to v3.8.6 (#2902)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-10 12:11:48 +00:00
renovate[bot] 37c0148d0b Update compose.multiplatform to v1.10.2 (#2900)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-10 09:55:19 +00:00
renovate[bot]andFooIbar 1fa485e31f Lock file maintenance (#2892)
* Lock file maintenance

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2026-03-10 09:39:45 +00:00
renovate[bot] dceea3b2ff Update Gradle to v9.4.0 (#2898)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-04 14:18:17 +00:00
renovate[bot] bab7770857 Update dependency io.arrow-kt:arrow-stack to v2.2.2 (#2897)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-04 02:45:16 +00:00
renovate[bot] af9251db0c Update AGP to v9.1.0 (#2896)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-03 16:53:31 +00:00
renovate[bot] 010b990f8d Update ktor monorepo to v3.4.1 (#2895)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-03 13:07:23 +00:00
renovate[bot] 0e61e4b00a Update spotless to v8.3.0 (#2894)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-03 00:54:00 +00:00
renovate[bot] 66e43924bd Update dependency androidx.compose:compose-bom-alpha to v2026.02.01 (#2891)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-28 01:59:59 +00:00
renovate[bot] 3437bb88a2 Update actions/upload-artifact action to v7 (#2890)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-26 18:59:16 +00:00
renovate[bot]andFooIbar f6e0733080 Update dependency io.coil-kt.coil3:coil-bom to v3.4.0 (#2888)
* Update dependency io.coil-kt.coil3:coil-bom to v3.4.0

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2026-02-25 06:55:27 +00:00
renovate[bot] add2676292 Update dependency org.jetbrains.kotlinx:kotlinx-io-core to v0.9.0 (#2886)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-20 21:48:42 +00:00
renovate[bot] 95839dbb60 Update dependency com.google.devtools.ksp to v2.3.6 (#2885)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-17 22:42:45 +00:00
renovate[bot]andFooIbar 6dbc2b2e67 Update dependency rust-nightly to v2026-02-15 (#2883)
* Update dependency rust-nightly to v2026-02-15

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2026-02-15 08:10:35 +00:00
renovate[bot] fc89ca007e Lock file maintenance (#2882)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-15 00:42:58 +00:00
renovate[bot] a75fba27cd Update AGP to v9.0.1 (#2881)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-14 07:44:21 +00:00
renovate[bot] c2f1233360 Update dependency androidx.compose:compose-bom-alpha to v2026.02.00 (#2879)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-12 01:49:48 +00:00
renovate[bot] 4e3cadc778 Update compose.multiplatform to v1.10.1 (#2874)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-11 21:36:21 +00:00
renovate[bot] 73f544c14e Update dependency androidx.paging:paging-compose to v3.4.1 (#2877)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-11 21:35:38 +00:00
renovate[bot] 025a947bb0 Update dependency androidx.test.uiautomator:uiautomator to v2.4.0-beta01 (#2878)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-11 21:35:18 +00:00
renovate[bot] 8927074cf1 Update benchmark to v1.5.0-alpha03 (#2875)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-11 18:55:27 +00:00
renovate[bot] da6ffe7304 Update dependency androidx.activity:activity-compose to v1.12.4 (#2876)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-11 18:53:26 +00:00
renovate[bot]andFooIbar 956a3ac1fd Update dependency nettle to v4 (#2872)
* Update dependency nettle to v4

* Fix incompatibility with Nettle 4.x

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2026-02-06 15:04:04 +00:00
FooIbar f6b43cb7e3 Revert "Update download URL for Nettle"
This reverts commit dd526d33

Reason for revert: ftpmirror.gnu.org has poor availability.
2026-02-06 17:26:01 +08:00
renovate[bot] 47f3406271 Update kotlin monorepo to v2.3.10 (#2871)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-05 09:03:38 +00:00
FooIbar 4ac4d3da01 Migrate to AGP KMP 2026-02-04 20:35:04 +08:00
renovate[bot] ea9ed2dc67 Update dependency com.materialkolor:material-kolor to v4.1.1 (#2869)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-04 01:39:53 +00:00
renovate[bot] 10ad0b6449 Update moko.resources to v0.26.0 (#2868)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-03 13:58:06 +00:00
renovate[bot] 8b02116dda Update kotlin monorepo to v2.3.10-RC2 (#2867)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-02 12:53:00 +00:00
FooIbar 1578da3b02 Enable Neon in Rust for Android ARMv7 targets 2026-02-01 11:04:18 +08:00
renovate[bot] c77451cae9 Lock file maintenance (#2865)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-01 02:29:17 +00:00
renovate[bot] 41b503918b Update dependency androidx.activity:activity-compose to v1.12.3 (#2864)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-30 02:03:51 +00:00
renovate[bot] 5f40d8d474 Update Gradle to v9.3.1 (#2863)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-29 18:14:44 +00:00
FooIbar 3109a6258b Remove snapshot workaround for Compose 2026-01-29 12:55:42 +08:00
renovate[bot] cacf578615 Update dependency androidx.work:work-runtime to v2.11.1 (#2860)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-29 04:39:09 +00:00
renovate[bot] bb42a84b44 Update dependency androidx.paging:paging-compose to v3.4.0 (#2861)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-29 04:38:37 +00:00
FooIbar d6519d4819 Fix hang when downloading updates from CI channel 2026-01-29 12:29:01 +08:00
renovate[bot] df5db83337 Update dependency androidx.compose:compose-bom-alpha to v2026.01.01 (#2859)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-29 02:15:06 +00:00
renovate[bot] af4b751425 Update benchmark to v1.5.0-alpha02 (#2858)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-29 02:14:31 +00:00
renovate[bot] 58209b0420 Update dependency com.google.devtools.ksp to v2.3.5 (#2857)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-28 19:03:50 +00:00
renovate[bot] d4c39fd72f Update spotless to v8.2.1 (#2855)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-28 02:23:04 +00:00
FooIbar 24505cb77c Fix missing quotes in uploader name 2026-01-27 21:23:04 +08:00
FooIbar 80225bfe6c Do not rotate determinate progress indicator (#2850)
* Do not rotate determinate progress indicator

It's hard to determine the progress with rotating wavy indicator.

* Inline progress indicator to reduce recomposition

* Fix transition between progress indicator

* Cleanup
2026-01-23 13:41:09 +08:00
renovate[bot] 14b24d6c58 Update spotless to v8.2.0 (#2851)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-22 21:44:13 +00:00
renovate[bot] 3c10d3fe00 Update ktor monorepo to v3.4.0 (#2849)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-22 13:45:22 +00:00
renovate[bot] fd6a1fd1ec Update kotlinx.serialization to v1.10.0 (#2848)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-21 17:31:48 +00:00
FooIbar 325578b989 Update kotlin to 2.3.10-RC for compose mapping fix 2026-01-21 22:14:30 +08:00
FooIbar 705e39a50d Update compileSdk to 36.1 2026-01-21 22:08:31 +08:00
FooIbar 5ac3f4cd44 Update benchmark to v1.5.0-alpha01 2026-01-21 21:31:27 +08:00
renovate[bot]andFooIbar 80c3c697d4 Update dependency androidx.compose:compose-bom-alpha to v2026 (#2838)
* Update dependency androidx.compose:compose-bom-alpha to v2026

* Update to snapshot to fix haptic feedback

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2026-01-21 12:12:34 +00:00
renovate[bot] 8cc597836e Update dependency Corrosion to v0.6.1 (#2842)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-17 21:07:53 +00:00
renovate[bot] 9a214c939b Update Gradle to v9.3.0 (#2841)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-16 14:03:10 +00:00
FooIbar 11a3201e54 Don't upload partitioned mapping (mapping.prt)
It's for Android Studio logcat retrace.
2026-01-16 12:33:21 +08:00
FooIbar 5156bd7747 AGP 9 2026-01-16 12:33:21 +08:00
FooIbar e62738519c Revert "Update dependency androidx.compose:compose-bom-alpha to v2026 (#2835)"
This reverts commit d87de0d3e2.
2026-01-16 00:56:19 +08:00
renovate[bot]andFooIbar d87de0d3e2 Update dependency androidx.compose:compose-bom-alpha to v2026 (#2835)
* Update dependency androidx.compose:compose-bom-alpha to v2026

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2026-01-15 13:42:42 +00:00
renovate[bot]andFooIbar 2aa2c25cdd Update compose.multiplatform to v1.10.0 (#2833)
* Update compose.multiplatform to v1.10.0

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2026-01-15 13:23:59 +00:00
renovate[bot] 123a7cd8e3 Lock file maintenance (#2836)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-15 02:43:33 +00:00
renovate[bot] 72a46acb46 Update dependency com.materialkolor:material-kolor to v4.1.0 (#2834)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-13 18:43:12 +00:00
renovate[bot] 50815c6e91 Update Rust crate quick-xml to 0.39 (#2831)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-11 21:44:14 +00:00
renovate[bot] 2c6f98b582 Update dependency me.zhanghai.compose.preference:preference to v2.1.1 (#2829)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-11 05:17:02 +00:00
renovate[bot] 240bc5d0ae Update dependency libarchive to v3.8.5 (#2826)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-05 16:14:53 +00:00
FooIbar e4306a7303 Fix delay on the first notification 2026-01-02 22:54:48 +08:00
FooIbar 15179a82e3 Fix sad panda check 2026-01-01 18:33:51 +08:00
renovate[bot] 1e3b2bebb3 Update dependency rust-nightly to v2026 (#2821)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-01 09:33:48 +00:00
renovate[bot] 2c32cafd38 Update Rust crate reqwest to 0.13 (#2819)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-30 18:10:05 +00:00
FooIbar ddd11477f7 Lower image target size to reduce moiré patterns
This partially reverts commit 63164dc70a.
2025-12-27 10:38:04 +08:00
renovate[bot] f3b2d8495a Update dependency io.github.petertrr:kotlin-multiplatform-diff to v1.3.0 (#2816)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-26 21:33:10 +00:00
renovate[bot] a56dd32425 Update plugin composeCompilerReportGenerator to v1.5.0 (#2813)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-22 08:42:56 +00:00
FooIbar 873b5e8540 Migrate to biometric-compose 2025-12-20 13:32:06 +08:00
renovate[bot] 34719b599e Update aboutlibraries to v13.2.1 (#2810)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-19 15:40:22 +00:00
FooIbar a3a3a7b46d Simplify release process 2025-12-18 20:10:02 +08:00
renovate[bot] 1a46f75693 Update dependency androidx.webkit:webkit to v1.15.0 (#2805)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-18 03:19:28 +00:00
renovate[bot] 90b4d7777e Update dependency androidx.compose:compose-bom-alpha to v2025.12.01 (#2803)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-17 23:48:45 +00:00
renovate[bot] c363f4df51 Update dependency liblzma to v5.8.2 (#2804)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-17 23:48:26 +00:00
renovate[bot] 4dc0981b34 Update dependency androidx.biometric:biometric to v1.4.0-alpha05 (#2802)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-17 18:35:14 +00:00
renovate[bot] e2772bde04 Update dependency androidx.activity:activity-compose to v1.12.2 (#2801)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-17 18:35:03 +00:00
FooIbar f1666d7a64 Prepare for next iteration 2025-12-17 22:12:34 +08:00
FooIbar 0195f1c9b8 Prepare for release 1.14.6
Releases / build (push) Has been cancelled
2025-12-17 22:12:05 +08:00
renovate[bot] 18d2d992a4 Update dependency io.arrow-kt:arrow-stack to v2.2.1.1 (#2800)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-17 13:44:04 +00:00
FooIbar 5582353c44 Enable group key based Compose stack traces 2025-12-17 15:08:04 +08:00
renovate[bot] 464568f29f Update dependency com.google.devtools.ksp to v2.3.4 (#2798)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-16 20:09:01 +00:00
renovate[bot]andFooIbar 213a9d56d2 Update kotlin monorepo to v2.3.0 (#2797)
* Update kotlin monorepo to v2.3.0

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-12-16 11:15:39 +00:00
FooIbar f672462bcd Use WebView version for UA to bypass Cloudflare 2025-12-16 00:29:36 +08:00
renovate[bot] 9a0b0d2c65 Lock file maintenance (#2795)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-15 02:04:38 +00:00
renovate[bot] fcaf4e3182 Update actions/upload-artifact action to v6 (#2792)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 20:59:34 +00:00
renovate[bot] ea40fa9b05 Update dessant/lock-threads action to v6 (#2791)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 16:39:18 +00:00
renovate[bot] 2e3436dbe7 Update actions/cache action to v5 (#2790)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 04:02:53 +00:00
renovate[bot] bd759dedea Update AGP to v8.13.2 (#2788)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-11 09:09:24 +00:00
FooIbar bac78ce018 Improve category text contrast 2025-12-05 21:41:29 +08:00
FooIbar dd95d7aaa2 Reapply "Use the upstream PaddingValues.plus"
This reverts commit e8b5fd0425.
2025-12-04 21:13:57 +08:00
renovate[bot] d1bb5b1d87 Cleanup snapshot workaround (#2782)
* Update settings.gradle.kts

* Update libs.versions.toml
2025-12-04 11:22:31 +08:00
renovate[bot] 67a3252b05 Update dependency androidx.compose:compose-bom-alpha to v2025.12.00 (#2781)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-03 21:02:24 +00:00
renovate[bot] 2df08f022f Update dependency androidx.test.uiautomator:uiautomator to v2.4.0-alpha07 (#2780)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-03 21:01:00 +00:00
renovate[bot] 65673a0ed9 Update dependency androidx.compose.foundation:foundation to v1.10.0 (#2779)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-03 18:24:57 +00:00
renovate[bot] aef20e2e04 Update dependency androidx.activity:activity-compose to v1.12.1 (#2778)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-03 18:23:46 +00:00
FooIbar 3bbfc8ac3a Use different icon for finished download items 2025-12-03 11:05:21 +08:00
renovate[bot] 02e85a8c4d Update dependency chrome to v143 (#2776)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-02 21:57:07 +00:00
FooIbar 8cc531ccec Fix database export 2025-12-02 10:00:48 +08:00
FooIbar 30fc750e17 Show tag content on long click to avoid misclicks 2025-12-02 10:00:32 +08:00
AdiEcho 0ff40d3d38 Add show reading progress function (#2768)
* Add reading progress

* Optimize reading progress state collection and display logic

* Optimize reading progress state collection and add page display to downloads

* Enhance download progress display and settings

* Optimize state collection for read progress, revert arrangement

* Revert arrangement changement
2025-12-02 01:01:25 +08:00
renovate[bot] 9fa80db783 Update dependency libarchive to v3.8.4 (#2773)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-01 15:12:35 +00:00
renovate[bot] 357503b403 Lock file maintenance (#2770)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-01 01:06:56 +00:00
FooIbar 10f7b2a7a9 KMP EhCookieStore 2025-11-29 15:08:32 +08:00
FooIbar 99696b11db Migrate to SQLite Driver APIs 2025-11-29 15:08:24 +08:00
FooIbar 71291b8800 Fix download state on archive failure 2025-11-27 20:48:52 +08:00
renovate[bot] 3532dbdcd6 Update dependency io.ktor:ktor-client-okhttp to v3.3.3 (#2765)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-26 15:32:05 +00:00
renovate[bot] 589ba8432c Update dependency org.jetbrains.kotlinx:kotlinx-io-core to v0.8.2 (#2764)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-24 21:09:00 +00:00
renovate[bot] 273196bf5d Update dependency Corrosion to v0.6 (#2763)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-23 13:53:02 +00:00
renovate[bot] a5fadeee3c Update dependency org.jetbrains.kotlinx:kotlinx-io-core to v0.8.1 (#2762)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-21 22:49:16 +00:00
FooIbar 3f784ec1de Refine FFI error handling 2025-11-21 09:18:11 +08:00
renovate[bot] f7a70cdfc3 Update dependency androidx.datastore:datastore-preferences to v1.2.0 (#2760)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-21 01:02:00 +00:00
renovate[bot] 030100280f Update dependency com.materialkolor:material-kolor to v4.0.5 (#2759)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-20 22:38:28 +00:00
renovate[bot] 0d76ee43fd Update dependency com.google.devtools.ksp to v2.3.3 (#2758)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-20 22:38:07 +00:00
renovate[bot] 11a215f070 Update actions/checkout action to v6 (#2757)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-20 17:12:09 +00:00
FooIbar a6e61e07fc Update Compose snaoshot (#2756) 2025-11-21 00:00:29 +08:00
renovate[bot] da94d298ce Update dependency androidx.activity:activity-compose to v1.12.0 (#2753)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-20 02:05:04 +00:00
renovate[bot] 9e74db0f02 Update dependency androidx.compose:compose-bom-alpha to v2025.11.01 (#2754)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-20 02:04:47 +00:00
renovate[bot] 0d63c2fa3c Update androidx.room to v2.8.4 (#2752)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-19 21:01:03 +00:00
renovate[bot] bf44fde58e Update androidx.lifecycle to v2.10.0 (#2751)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-19 21:00:42 +00:00
renovate[bot] 4bc119138f Update moko.resources to v0.25.2 (#2750)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-19 17:57:46 +00:00
renovate[bot] c7f5b86843 Update spotless to v8.1.0 (#2749)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-19 01:37:36 +00:00
renovate[bot] 2aa815dce1 Update dependency com.squareup.okhttp3:okhttp-bom to v5.3.2 (#2748)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-19 01:36:52 +00:00
FooIbar cf7f18351d Simplify build script for Nettle 2025-11-18 23:45:22 +08:00
FooIbar 5ed27963d7 Block HyperOS 1 & 2 for Cronet 2025-11-18 23:45:11 +08:00
renovate[bot] 85e539f0ba Update Gradle to v9.2.1 (#2745)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-18 08:17:05 +00:00
renovate[bot] 15ecb0e3f4 Update dependency libarchive to v3.8.3 (#2744)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-17 23:56:04 +00:00
renovate[bot] db5055da6e Update dependency com.squareup.okio:okio to v3.16.4 (#2743)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-17 23:55:24 +00:00
FooIbar 09e201f3f2 Fix CFLAGS changes not propagating to nettle build 2025-11-17 14:55:07 +08:00
renovate[bot] 6f34083880 Update dependency com.squareup.okhttp3:okhttp-bom to v5.3.1 (#2740)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-16 18:10:47 +00:00
FooIbar 4e0c42c955 Use -ffile-prefix-map to improve reproducibility 2025-11-16 21:49:17 +08:00
FooIbar 935b7dec0c Reduce binary size and improve reproducibility 2025-11-16 15:34:49 +08:00
FooIbar d0b0651c7d Revert "Enable trim-paths to improve reproducibility"
This reverts commit e131a416e8.
2025-11-16 15:34:49 +08:00
FooIbar e131a416e8 Enable trim-paths to improve reproducibility 2025-11-15 23:47:01 +08:00
FooIbar dd526d33bd Update download URL for Nettle
The GitLab mirror has been archived.
2025-11-15 18:15:37 +08:00
renovate[bot]andFooIbar 4611a77e04 Update dependency com.pinterest.ktlint:ktlint-cli to v1.8.0 (#2729)
* Update dependency com.pinterest.ktlint:ktlint-cli to v1.8.0

* Fix spotless

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-11-15 08:13:23 +00:00
renovate[bot] 806560cf59 Update dependency rust-nightly to v2025-11-15 (#2733)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-15 07:01:25 +00:00
renovate[bot] fd3f6eb124 Lock file maintenance (#2732)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-15 01:03:09 +00:00
renovate[bot] 8e14c6e57b Update dependency com.squareup.okio:okio to v3.16.3 (#2731)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-15 01:02:04 +00:00
FooIbar 20a4f4ab25 Remove trailing spaces and periods from filenames 2025-11-12 23:14:58 +08:00
renovate[bot] d4c64f6e66 Update dependency com.materialkolor:material-kolor to v4.0.4 (#2726)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-12 01:49:24 +00:00
renovate[bot] cfb2f15a1e Update AGP to v8.13.1 (#2724)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-10 18:53:27 +00:00
renovate[bot] 927a738f46 Update dependency com.google.devtools.ksp to v2.3.2 (#2722)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-06 23:07:08 +00:00
renovate[bot] 19482dbd77 Update dependency org.jetbrains.compose to v1.9.3 (#2721)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-06 18:20:14 +00:00
FooIbar 43b7fb611a Migrate CMP dependencies to version catalog
Gradle plugin dependency aliases are deprecated.
2025-11-06 18:20:11 +08:00
renovate[bot] c39338efb7 Update dependency androidx.compose:compose-bom-alpha to v2025.11.00 (#2719)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-06 02:23:30 +00:00
renovate[bot] dbd952eebb Update dependency androidx.core:core-splashscreen to v1.2.0 (#2718)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-06 02:23:04 +00:00
renovate[bot] 192039408c Update androidx.lifecycle to v2.10.0-rc01 (#2716)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-05 21:24:26 +00:00
renovate[bot] e38376d4b0 Update dependency androidx.activity:activity-compose to v1.12.0-rc01 (#2717)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-05 21:23:25 +00:00
renovate[bot] a4062cf4d1 Update dependency io.ktor:ktor-client-okhttp to v3.3.2 (#2715)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-05 10:15:16 +00:00
FooIbar 3c47d36525 Use snapshot Compose for the popup positioning fix 2025-11-05 18:14:37 +08:00
renovate[bot] 00090944d5 Update dependency com.google.devtools.ksp to v2.3.1 (#2712)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-04 06:50:00 +00:00
renovate[bot] d2cafbb2a3 Update dependency io.arrow-kt:arrow-stack to v2.2.0 (#2710)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-01 16:57:32 +00:00
renovate[bot] 9847b95582 Lock file maintenance (#2709)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-01 01:54:57 +00:00
renovate[bot] 986412932b Update dependency com.squareup.okhttp3:okhttp-bom to v5.3.0 (#2707)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-31 00:21:38 +00:00
renovate[bot] f13831cb74 Update dependency com.materialkolor:material-kolor to v4.0.3 (#2706)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-30 20:16:27 +00:00
renovate[bot] 5ed1203558 Update Gradle to v9.2.0 (#2705)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-30 00:58:23 +00:00
renovate[bot] acf1fe43bf Update dependency org.jetbrains.compose.material3.adaptive:adaptive to v1.2.0 (#2704)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-30 00:53:24 +00:00
renovate[bot] 4761ef7416 Update dependency org.jetbrains.compose to v1.9.2 (#2703)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-29 14:05:04 +00:00
renovate[bot] 70aaf38f94 Update xmlutil to v0.91.3 (#2701)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-28 22:53:18 +00:00
renovate[bot] a92aaf19c9 Update dependency chrome to v142 (#2702)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-28 22:52:56 +00:00
renovate[bot] a5b408d316 Update dependency io.github.petertrr:kotlin-multiplatform-diff to v1.2.0 (#2699)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 18:52:48 +00:00
renovate[bot] f96a2e63d1 Update actions/upload-artifact action to v5 (#2698)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-24 23:17:26 +00:00
renovate[bot] a0a9da68da Update dependency com.materialkolor:material-kolor to v4.0.2 (#2697)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-23 23:12:52 +00:00
FooIbar a83be94d1f Fix dropdown menu anchor calculation in dialog 2025-10-23 22:31:47 +08:00
FooIbar cc5dfbfa41 Update screenshots 2025-10-23 19:36:27 +08:00
renovate[bot] 57b79b0b06 Update kotlin monorepo to v2.2.21 (#2694)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-23 09:49:38 +00:00
renovate[bot] 569130087f Update dependency androidx.work:work-runtime to v2.11.0 (#2693)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-23 03:36:38 +00:00
renovate[bot] 1a7b36b488 Update dependency androidx.compose:compose-bom-alpha to v2025.10.01 (#2691)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-23 03:36:18 +00:00
renovate[bot] e8b5fd0425 Revert "Use the upstream PaddingValues.plus"
This reverts commit 656d372612.
2025-10-23 11:25:39 +08:00
renovate[bot] 626d5e7a8c Update dependency androidx.activity:activity-compose to v1.12.0-beta01 (#2690)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-22 22:38:35 +00:00
renovate[bot] 4d94e84c13 Update androidx.room to v2.8.3 (#2689)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-22 19:08:50 +00:00
renovate[bot] 863ec659ff Update androidx.lifecycle to v2.10.0-beta01 (#2688)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-22 19:07:45 +00:00
renovate[bot] 071fdfc0a3 Update dependency com.google.devtools.ksp to v2.3.0 (#2685)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-22 10:18:07 +00:00
FooIbar a137e9715a Refactor search bar text handling
* Fix search bar text not cleared after searching in popular / toplist
* Fix search bar text not cleared when quick search keyword is empty
2025-10-22 18:05:02 +08:00
renovate[bot] c28d1d34ff Update dependency com.materialkolor:material-kolor to v4 (#2683)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-20 20:49:43 +00:00
FooIbar 1230022d17 Reset FAB state when gallery list changes 2025-10-20 21:11:47 +08:00
FooIbar 9a9f2a8d70 Prepare for next iteration 2025-10-19 21:19:02 +08:00
FooIbar f51da1a948 Prepare for release 1.14.5 2025-10-19 21:18:11 +08:00
FooIbar c1ac592855 [Reader] Show gallery title & fix status bar color 2025-10-19 12:41:17 +08:00
FooIbar 371103908b Fix flickering loops in reader
Opt out activity recreation for size-based config changes as they are
handled by Compose.
2025-10-16 19:19:40 +08:00
FooIbar a2a029bb28 Fix unnecessary recompositions
`BaseGalleryInfo` is used as part of remember keys.
2025-10-16 19:19:40 +08:00
renovate[bot] 9266fba415 Update dependency libarchive to v3.8.2 (#2678)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-16 00:58:36 +00:00
FooIbar 0963e2f564 Fix reader settings crash with custom orientation 2025-10-15 18:11:29 +08:00
renovate[bot] 72a5906a9b Lock file maintenance (#2676)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-15 02:13:59 +00:00
renovate[bot] 4dbd54c495 Update dependency com.squareup.okio:okio to v3.16.2 (#2675)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-14 20:06:47 +00:00
renovate[bot] 6219acb15c Update dependency org.jetbrains.compose to v1.9.1 (#2672)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-14 13:53:25 +00:00
renovate[bot] c4179bef5d Update aboutlibraries to v13.1.0 (#2670)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-13 20:52:02 +00:00
renovate[bot] 117a1eaab8 Fix -Ofast deprecation 2025-10-13 17:31:15 +08:00
FooIbar 78e31e4fb9 Remove indent from compiler flags 2025-10-13 00:14:07 +08:00
FooIbar 3da86fd745 Prepare for next iteration 2025-10-12 21:32:38 +08:00
FooIbar e0c710ff5f Prepare for release 1.14.4 2025-10-12 21:32:02 +08:00
FooIbar 2946459f1d Prepare changelog for 1.14.4 (#2665)
[no ci]
2025-10-12 21:30:55 +08:00
renovate[bot] 5b5f328e06 Lock file maintenance (#2667)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-12 13:22:31 +00:00
FooIbar b496e18e7a Revert "Use to the new panic-immediate-abort cargo feature"
This reverts commit cf10e2ff6d.

Reason for revert: Incompatible with renovate
2025-10-12 21:08:34 +08:00
renovate[bot] 4abb2ab0ce Update compose.destinations to v2.3.0 (#2664)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-12 09:40:33 +00:00
FooIbar 16edaacf37 Temporarily disable backupBeforeUpdate by default 2025-10-12 12:59:35 +08:00
FooIbar b69aea9d14 Update AndroidX WorkManager to 2.11.0-rc01 2025-10-12 12:07:02 +08:00
FooIbar 656d372612 Use the upstream PaddingValues.plus 2025-10-12 12:04:30 +08:00
FooIbar 09a2ebcc61 Workaround crash when 0-sized TextField is focused
It only affects API < 28
https://developer.android.com/about/versions/pie/android-9.0-changes-28#focus
2025-10-11 10:21:44 +08:00
renovate[bot]andFooIbar b74d0e9006 Update dependency com.mikepenz.aboutlibraries.plugin to v13 (#2658)
* Update dependency com.mikepenz.aboutlibraries.plugin to v13

* Fix build

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-10-10 14:10:30 +00:00
renovate[bot] a7c81130cd Update dependency com.squareup.okhttp3:okhttp-bom to v5.2.1 (#2657)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-10 04:46:04 +00:00
renovate[bot] c0b75cdbe9 Update dependency com.squareup.okio:okio to v3.16.1 (#2656)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-10 00:49:53 +00:00
FooIbar 2c15c74697 Fix visibility calculation with zoomable content 2025-10-09 21:52:39 +08:00
FooIbar ba9308bfbc Underline solid tags when opted in 2025-10-09 21:28:39 +08:00
renovate[bot] 21050b49d4 Update dependency androidx.compose:compose-bom-alpha to v2025.10.00 (#2651)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-08 21:46:22 +00:00
renovate[bot] 842da49b08 Update androidx.lifecycle to v2.10.0-alpha05 (#2649)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-08 19:28:37 +00:00
renovate[bot] 44fb2b70a5 Update androidx.room to v2.8.2 (#2650)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-08 19:28:12 +00:00
renovate[bot] 9ef95f56cf Update dependency io.ktor:ktor-client-okhttp to v3.3.1 (#2648)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-08 10:56:43 +00:00
renovate[bot] b5b08404bd Update dependency NDK to v29 (#2647)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-08 05:04:11 +00:00
renovate[bot] 17abca7f7d Update dependency com.google.devtools.ksp to v2.2.20-2.0.4 (#2646)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-08 05:02:34 +00:00
renovate[bot] c8d4782b2a Update dependency com.squareup.okhttp3:okhttp-bom to v5.2.0 (#2645)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 17:53:41 +00:00
FooIbar e0af610c2c Clean up rust build-std flags 2025-10-06 22:36:17 +08:00
FooIbar ddc645c323 Speed up sorting download list by page count 2025-10-06 09:42:32 +08:00
FooIbar 779dd1f8fd Reduce DownloadManager initialization time 2025-10-06 09:42:32 +08:00
FooIbar cf10e2ff6d Use to the new panic-immediate-abort cargo feature 2025-10-05 19:38:52 +08:00
renovate[bot] 55d1094e55 Update dependency me.saket.telephoto:zoomable to v0.18.0 (#2642)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-04 20:57:52 +00:00
FooIbar 8248ac6e2f Update rust-nightly to 2025-10-03
This reverts commit 085e0938cb.
2025-10-03 12:09:57 +08:00
renovate[bot] 4b2ac8ae5e Update moko.resources to v0.25.1 (#2639)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-02 17:18:38 +00:00
FooIbar 085e0938cb Downgrade rust-nightly to 2025-09-23
2025-09-24 and later have a +25% (141KB) binary size regression

This reverts commit 9a2c0d7121.
2025-10-02 15:40:17 +08:00
renovate[bot]andFooIbar 9a2c0d7121 Update dependency rust-nightly to v2025-10-01 (#2635)
* Update dependency rust-nightly to v2025-10-01

* Fix build

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-10-01 16:11:15 +00:00
renovate[bot] aa8834b941 Update gradle/actions action to v5 (#2636)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-01 13:24:49 +00:00
FooIbar d6b524bc47 Use RTL mode by default for non-webtoon galleries 2025-10-01 21:08:28 +08:00
FooIbar 1ca960995f Use webtoon mode by default for webtoon galleries 2025-10-01 21:08:28 +08:00
renovate[bot] 31be34f551 Update dependency chrome to v141 (#2633)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-30 21:59:26 +00:00
FooIbar e0d1c42391 Extract common model and database code 2025-09-30 12:04:50 +08:00
FooIbar 1b9c3050aa Fix race condition in concurrent append/prepend 2025-09-28 13:31:21 +08:00
FooIbar 5ba0afdd24 Switch tl repository to avoid renovate updating it 2025-09-26 20:16:28 +08:00
FooIbar a8eb4ce47a Extract common utils (#2620)
* Extract common utils

* Fix lint
2025-09-25 17:49:06 +08:00
renovate[bot] feba6dfeb0 Update spotless to v8 (#2626)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-25 01:27:59 +00:00
renovate[bot] 061f4a0ed0 Update dependency androidx.work:work-runtime to v2.10.5 (#2625)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-25 01:25:06 +00:00
renovate[bot] f7c273a4f3 Update dependency androidx.activity:activity-compose to v1.12.0-alpha09 (#2623)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-24 20:56:04 +00:00
renovate[bot] 096dae3cd0 Update dependency androidx.compose:compose-bom-alpha to v2025.09.01 (#2624)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-24 20:55:24 +00:00
renovate[bot] eebf51f4a6 Update androidx.lifecycle to v2.10.0-alpha04 (#2621)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-24 18:50:38 +00:00
renovate[bot] 000ae02d47 Update androidx.room to v2.8.1 (#2622)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-24 18:50:21 +00:00
FooIbar 84c1ee3e88 Clean up CoroutineScope extensions 2025-09-24 13:15:30 +08:00
FooIbar 0fea2076d9 Fix a main thread disk read 2025-09-24 13:15:30 +08:00
FooIbar b7a90b171f Omit default parameters of getGalleryDetailUrl 2025-09-24 13:15:30 +08:00
FooIbar 7a68f331b0 Refactor haptic feedback type selection 2025-09-24 13:15:30 +08:00
renovate[bot] 9e7abd5a85 Update Gradle to v9.1.0 (#2618)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-18 14:43:54 +00:00
FooIbar 9bc3f1137e Fix ghost touch areas for links in comments 2025-09-17 22:28:32 +08:00
FooIbar 0c7e3ac8b4 Fix gallery availability check 2025-09-17 17:16:09 +08:00
renovate[bot] 715f863167 Update dependency org.jetbrains.compose to v1.9.0 (#2613)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-16 15:44:37 +00:00
e062301d42 Disallow overzoom out (#2156)
Co-authored-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-09-15 15:22:02 +08:00
renovate[bot]andFooIbar 77396558d7 Update dependency me.saket.telephoto:zoomable to v0.17.0 (#2611)
* Update dependency me.saket.telephoto:zoomable to v0.17.0

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-09-15 05:40:17 +00:00
renovate[bot]andFooIbar d11c16c549 [no ci] Migrate renovate config (#2612)
* Migrate config renovate.json

* Keep comment

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-09-15 13:10:22 +08:00
FooIbar 6a90ac40be [no ci] Update lock file biweekly 2025-09-15 11:53:08 +08:00
FooIbar 25cc1d77b1 Stop downloads and notify the user on fatal errors 2025-09-15 11:31:30 +08:00
renovate[bot] fd489d93bb Lock file maintenance (#2610)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-15 02:15:20 +00:00
FooIbar e80487e379 Work around filename length limit on some devices 2025-09-14 11:30:58 +08:00
renovate[bot] 3b4c2981ac Update dependency com.google.devtools.ksp to v2.2.20-2.0.3 (#2606)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-13 03:24:24 +00:00
FooIbar 348d45f2f5 Treat search warnings as errors 2025-09-12 21:16:16 +08:00
renovate[bot] 4db96c7bdb Update dependency io.ktor:ktor-client-okhttp to v3.3.0 (#2603)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-11 13:03:06 +00:00
renovate[bot]andFooIbar b1617c6996 Update dependency androidx.compose:compose-bom-alpha to v2025.09.00 (#2602)
* Update dependency androidx.compose:compose-bom-alpha to v2025.09.00

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-09-11 05:59:34 +00:00
renovate[bot] c078166e8d Update androidx.room to v2.8.0 (#2601)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-11 00:32:19 +00:00
renovate[bot] 092936eda5 Update dependency androidx.work:work-runtime to v2.10.4 (#2599)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-10 21:51:50 +00:00
renovate[bot] 257a999300 Update dependency com.google.devtools.ksp to v2.2.20-2.0.2 (#2600)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-10 21:51:08 +00:00
renovate[bot] df6a5040a5 Update dependency androidx.activity:activity-compose to v1.12.0-alpha08 (#2598)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-10 17:48:40 +00:00
renovate[bot] 3085ca2eeb Update benchmark to v1.4.1 (#2597)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-10 17:48:17 +00:00
renovate[bot] fa4005cf9a Update kotlin monorepo to v2.2.20 (#2596)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-10 10:18:21 +00:00
FooIbar c4cd375c04 Allow disabling page turning with volume keys 2025-09-09 22:04:41 +08:00
FooIbar 19d9bb198f Work around ANR on DownloadManager initialization 2025-09-05 00:29:28 +08:00
LuK1337 7016190ce5 Use LocalContentColor.current for tag text
Fixes text visibility on Android 16 QPR1.
2025-09-04 22:02:21 +08:00
renovate[bot] 8020ffa666 Update dependency com.google.devtools.ksp to v2.2.20-RC2-2.0.2 (#2590)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-04 04:25:38 +00:00
FooIbar bc9914ffa6 Add missing changelog entry
[no ci]
2025-09-03 11:54:41 +08:00
renovate[bot] 4ded4ff470 Update dependency chrome to v140 (#2589)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-02 21:30:42 +00:00
renovate[bot] 7742299651 Update AGP to v8.13.0 (#2587)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-02 17:42:45 +00:00
FooIbar 0b348a59d2 Prepare for next iteration 2025-09-01 20:42:28 +08:00
FooIbar e51d54e346 Prepare changelog for 1.14.3 2025-09-01 20:42:02 +08:00
renovate[bot] e06b1f0177 Lock file maintenance (#2586)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-01 12:25:48 +00:00
renovate[bot] 178a870608 Update kotlin monorepo to v2.2.20-RC2 (#2585)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-01 12:23:11 +00:00
FooIbar a7d3d7c651 Prepare changelog for 1.14.3 2025-09-01 20:13:28 +08:00
renovate[bot] c13024f1c7 Update AGP to v8.12.2 (#2583)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-30 16:14:02 +00:00
FooIbar c53c0ef727 Fix similar galleries by artist tag 2025-08-31 00:02:06 +08:00
FooIbar cd93fe2646 Revert "Work around crash when dismissing filter settings"
This reverts commit afe638fb90.
2025-08-28 11:12:21 +08:00
renovate[bot] 7b506058a4 Update dependency androidx.compose:compose-bom-alpha to v2025.08.01 (#2580)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-28 00:52:26 +00:00
renovate[bot] f658f74f35 Update androidx.lifecycle to v2.10.0-alpha03 (#2578)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-27 20:41:58 +00:00
renovate[bot] eae5efa69d Update dependency androidx.activity:activity-compose to v1.12.0-alpha07 (#2579)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-27 20:41:22 +00:00
FooIbar 4e6051085e Simplify repository content filtering 2025-08-26 20:01:02 +08:00
FooIbar f174ccfc04 Migrate to the new context menu APIs 2025-08-26 10:02:21 +08:00
FooIbar e1252d0554 Support searching download labels with label: 2025-08-25 21:58:18 +08:00
FooIbar afe638fb90 Work around crash when dismissing filter settings 2025-08-25 18:12:39 +08:00
renovate[bot] 17699ce889 Lock file maintenance (#2572)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 01:58:40 +00:00
renovate[bot] 4afa06b7b9 Update actions/setup-java action to v5 (#2568)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-21 06:39:56 +00:00
FooIbar 2d02815aba Extract common UI components part 1/n 2025-08-20 14:45:18 +08:00
renovate[bot] ae1824c6a2 Update dependency com.google.devtools.ksp to v2.2.20-RC-2.0.2 (#2567)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-20 03:40:50 +00:00
renovate[bot] d63cc39478 Update kotlin monorepo to v2.2.20-RC (#2565)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-19 08:38:25 +00:00
FooIbar 51d6775429 Remove unnecessary JNI lib and main thread check
The actual disk I/O will perform in the scope of DataStore.
2025-08-19 12:07:34 +08:00
renovate[bot] 35d92f1386 Update dependency sh.calvin.reorderable:reorderable to v3 (#2562)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 22:27:32 +00:00
renovate[bot] ba0ef6dccc Update AGP to v8.12.1 (#2561)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 17:34:26 +00:00
renovate[bot] 2a325e6700 Lock file maintenance (#2559)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 01:05:47 +00:00
FooIbar 4e7566f06d Fix aboutlibraries.json being out-of-date 2025-08-17 17:06:35 +08:00
FooIbar d95bf4b71d Prepare for next iteration 2025-08-16 22:24:23 +08:00
FooIbar 43ddf6ccc4 Prepare for release 1.14.2 2025-08-16 22:23:45 +08:00
FooIbar b55da640e1 Prepare changelog for 1.14.2 2025-08-16 22:19:58 +08:00
FooIbar 90534c3c9f Remove confusing connect timeout configuration 2025-08-16 22:19:58 +08:00
FooIbar 88c9e5e902 Support new tag namespace: "location:"
Treat it as "other:".
2025-08-16 17:21:53 +08:00
FooIbar ac41117a78 [no ci] Tweak Rust toolchain update schedule 2025-08-15 17:51:31 +08:00
renovate[bot] 2418c5f625 Update dependency rust-nightly to v2025-08-15 (#2554)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-15 08:33:52 +00:00
FooIbar 52156aa9ff [no ci] Let renovate update NDK 2025-08-15 16:23:17 +08:00
renovate[bot]andFooIbar 6010fb69a4 Update dependency rust-nightly to v2025-08-14 (#2553)
* Update dependency rust-nightly to v2025-08-14

* Fix build

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-08-15 04:59:20 +00:00
FooIbar d5abbb3584 Stop speed tracker immediately if download is done
Subsequent disk I/O will make the reported download speed inaccurate.
2025-08-14 19:25:03 +08:00
FooIbar 8c27504ee2 Update Rust nightly toolchain every ~6 weeks
Follow the stable release cycle.

[no ci]
2025-08-14 15:48:47 +08:00
FooIbar 8a20525da3 Remove obsolete workaround 2025-08-14 11:14:33 +08:00
renovate[bot] c7b8326b52 Update dependency androidx.core:core-ktx to v1.17.0 (#2550)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-14 00:53:52 +00:00
renovate[bot] ee8b80651e Update dependency androidx.compose:compose-bom-alpha to v2025.08.00 (#2549)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-14 00:53:37 +00:00
renovate[bot] 589676c52a Update dependency androidx.test.uiautomator:uiautomator to v2.4.0-alpha06 (#2548)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-13 22:54:04 +00:00
FooIbar 83085d5f9a Allow disabling download speed check 2025-08-13 20:37:43 +08:00
FooIbar a1a204d0d5 Refactor settings observation 2025-08-13 00:42:20 +08:00
FooIbar 9a43c36758 KMP DataStorePreferences 2025-08-12 10:40:45 +08:00
renovate[bot] e017efe35f Update actions/checkout action to v5 (#2542)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-11 13:57:50 +00:00
renovate[bot] 1645c17ab7 Lock file maintenance (#2541)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-11 02:33:12 +00:00
FooIbar 075b800932 Exclude CMP resources dependency 2025-08-08 17:19:50 +08:00
FooIbar 56f9138db4 Misc updates 2025-08-08 17:19:50 +08:00
FooIbar 20c1b7acdb Migrate to moko-resources 2025-08-07 10:40:21 +08:00
FooIbar a10022d797 Move plural string resources to their own files 2025-08-07 10:40:21 +08:00
renovate[bot] aafbbbec38 Update dependency chrome to v139 (#2538)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-05 21:43:41 +00:00
FooIbar 028a994070 Hack for type-safe accessors in convention plugins 2025-08-05 22:58:52 +08:00
renovate[bot] 581125db62 Lock file maintenance (#2535)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-04 03:00:33 +00:00
FooIbar 295770002a Extract common build logic to convention plugins 2025-08-03 10:39:03 +08:00
renovate[bot] 1a66d84bd0 Update dependency gradle to v9 (#2532)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-01 01:45:06 +00:00
renovate[bot] cd3f51b66d Update AGP to v8.12.0 (#2531)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-31 18:04:05 +00:00
renovate[bot] 6d8ac4c3da Update dependency com.google.devtools.ksp to v2.2.20-Beta2-2.0.2 (#2530)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-31 18:01:43 +00:00
FooIbar 156382eaad Prepare for next iteration 2025-07-31 18:35:19 +08:00
FooIbar 2c155fe599 Prepare for release 1.14.1 2025-07-31 18:34:50 +08:00
renovate[bot] 323de69ba0 Update dependency androidx.test.ext:junit to v1.3.0 (#2527)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-31 01:52:48 +00:00
renovate[bot] 0cdc6be34f Update dependency androidx.browser:browser to v1.9.0 (#2526)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-31 01:52:18 +00:00
FooIbar 36c1703763 Renew GitHub token and prepare for a point release 2025-07-31 09:43:10 +08:00
renovate[bot] ee3d2f681c Update dependency androidx.work:work-runtime to v2.10.3 (#2525)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-30 23:05:17 +00:00
renovate[bot] 11ce900868 Update dependency androidx.compose:compose-bom-alpha to v2025.07.01 (#2523)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-30 19:59:25 +00:00
renovate[bot] b936dd2533 Update benchmark to v1.4.0 (#2522)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-30 19:58:11 +00:00
renovate[bot] fab8cd0c1f Update dependency com.squareup.okio:okio-bom to v3.16.0 (#2520)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-30 00:35:57 +00:00
renovate[bot] ec3a962ec8 Update dependency com.squareup.logcat:logcat to v0.4 (#2519)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-29 13:56:37 +00:00
FooIbar 348813109b Clean up context parameters 2025-07-29 21:46:57 +08:00
renovate[bot] 59598094df Update kotlin monorepo to v2.2.20-Beta2 (#2517)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-29 10:18:22 +00:00
renovate[bot] 8b6ae59eda Update dependency io.ktor:ktor-client-okhttp to v3.2.3 (#2516)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-29 10:17:55 +00:00
FooIbar b3d8653882 Speed up dependency downloading 2025-07-29 18:17:42 +08:00
renovate[bot] 719d1ebbb8 Update xmlutil to v0.91.2 (#2514)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-29 00:21:18 +00:00
FooIbar a23f902e9a Revert "[no ci] Allow blank issue"
This reverts commit 24e36b6283.
2025-07-28 20:25:31 +08:00
renovate[bot] 79559635e1 Lock file maintenance (#2512)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-28 03:06:58 +00:00
FooIbar c57a4e4132 Kotlin 2.2.20-Beta1 and remove custom impl 2025-07-26 23:55:25 +08:00
renovate[bot] c6f7d9d869 Update dependency com.squareup.logcat:logcat to v0.3 (#2509)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-25 08:47:54 +00:00
renovate[bot] 9fcddd06e4 Update dependency com.materialkolor:material-kolor to v3.0.1 (#2508)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-24 20:54:47 +00:00
FooIbar 3526a2b0e9 [no ci] Add comment about KSP version check 2025-07-24 22:58:06 +08:00
FooIbar 56187aa4dc Prepare for next iteration
(cherry picked from commit 2d02eda9e3)
2025-07-23 23:25:15 +08:00
FooIbar 9e698f382d Release 1.14.0 2025-07-23 22:39:34 +08:00
FooIbar d2583a6d96 Add a workflow to test baseline profile generation 2025-07-23 22:37:44 +08:00
FooIbar 250e4fddd9 Refine build scripts 2025-07-23 22:37:44 +08:00
FooIbar 2f274d969e Fix release 2025-07-23 22:37:44 +08:00
FooIbar 2d02eda9e3 Prepare for next iteration 2025-07-23 17:40:43 +08:00
FooIbar f26a9518e0 Prepare for release 1.14.0 2025-07-23 17:40:02 +08:00
FooIbar 2b92bcf0a9 Prepare changelog for 1.14.0 2025-07-23 17:27:59 +08:00
renovate[bot] 0ce6296318 Update dependency io.coil-kt.coil3:coil-bom to v3.3.0 (#2504)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-22 08:39:02 +00:00
renovate[bot]andFooIbar 2c90ceb5ca Update dependency com.pinterest.ktlint:ktlint-cli to v1.7.1 (#2503)
* Update dependency com.pinterest.ktlint:ktlint-cli to v1.7.1

* Fix spotless

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-07-22 06:23:35 +00:00
renovate[bot] 2fde327195 Update plugin spotless to v7.2.1 (#2502)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-22 01:57:37 +00:00
renovate[bot] 3aee440f67 Lock file maintenance (#2501)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-21 03:07:36 +00:00
renovate[bot] 290c1777b3 Update plugin spotless to v7.2.0 (#2500)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-20 21:20:25 +00:00
FooIbar e0c8b64c65 Release URI permission when changing download location 2025-07-21 00:12:14 +08:00
FooIbar 810d339b4e Fix downloading notification stuck when nothing to download 2025-07-21 00:12:14 +08:00
FooIbar 53ce1e6934 Fix crash when clearing notification while app is in background 2025-07-21 00:12:14 +08:00
FooIbar ae4d3b2d65 Use fixed width for archive download button 2025-07-19 21:48:35 +08:00
renovate[bot] 1cdd51de21 Update dependency me.zhanghai.compose.preference:preference to v2.1.0 (#2497)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-19 13:22:40 +00:00
FooIbar 9cf4702f69 Migrate to Compose Preference (#2496) 2025-07-19 21:13:29 +08:00
FooIbar cb5455c990 Fix corrupted tag database file not updating 2025-07-17 19:21:05 +08:00
FooIbar db86fef717 Fix history entry not fully dismissed on swipe 2025-07-17 19:21:05 +08:00
FooIbar 8bffeb52a7 Remove explicit dependency on graphics-path 2025-07-17 09:45:10 +08:00
FooIbar 9d2bbd164b Migrate common buttons to M3 Expressive 2025-07-17 09:13:59 +08:00
FooIbar a045766c7a Migrate icon buttons to M3 Expressive 2025-07-17 09:13:59 +08:00
FooIbar 34cff8c8cb Extract NavigationIcon 2025-07-17 09:03:55 +08:00
FooIbar 03ec2af92e Remove redundant PreferenceHeader overload 2025-07-17 09:03:55 +08:00
FooIbar c2a8e27875 Clean up SnackbarHostState usage 2025-07-17 09:03:55 +08:00
FooIbar 3fae5129d8 Revert "Update dependency androidx.compose.material3:material3-android to v1.…"
This reverts commit 17e39f94cc.
2025-07-17 09:03:35 +08:00
renovate[bot] 8311f7baaa Update dependency androidx.compose:compose-bom-alpha to v2025.07.00 (#2491)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-16 23:02:36 +00:00
renovate[bot] 17e39f94cc Update dependency androidx.compose.material3:material3-android to v1.4.0-alpha18 (#2490)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-16 17:54:31 +00:00
renovate[bot] cd1e10c17c Update androidx.lifecycle to v2.9.2 (#2489)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-16 17:54:12 +00:00
renovate[bot] 5defb428ff Update dependency libwebp to v1.6.0 (#2486)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-16 11:50:43 +00:00
FooIbar 79a066e68a Use GitHub repository for renovate to update 2025-07-16 19:42:09 +08:00
FooIbar 3e34bdf7fc Draw scrim behind status bar to improve a11y
Changes toolbar color to the default as surfaceContainerHighest doesn't
look well in light theme.
2025-07-16 10:11:59 +08:00
FooIbar bdf31231f0 Update NDK to r28c 2025-07-15 20:59:32 +08:00
FooIbar 17de611a22 Actually fix the UAF
The archive may be closed before the decoding job finishes.

This reverts commit 4b25fb8363.
2025-07-15 10:09:08 +08:00
renovate[bot] 4744191242 Update dependency io.ktor:ktor-client-okhttp to v3.2.2 (#2480)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 13:15:32 +00:00
renovate[bot] c81be6734a Lock file maintenance (#2478)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 02:57:20 +00:00
FooIbar 663fedb81b Improve tag suggestion hit rate 2025-07-13 21:00:53 +08:00
renovate[bot] 200d29dc1e Update Rust crate rxing to 0.8 (#2476)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-12 18:43:45 +00:00
renovate[bot] 41f6948f13 Update AGP to v8.11.1 (#2474)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-10 22:41:37 +00:00
FooIbar 24e36b6283 [no ci] Allow blank issue 2025-07-09 20:29:09 +08:00
renovate[bot] 1b1df14937 Update dependency com.materialkolor:material-kolor to v3 (#2472)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-08 21:04:00 +00:00
FooIbar 895f75a3c5 Fix navigation drawer overlapping side sheet 2025-07-08 21:58:34 +08:00
FooIbar e428a8be57 Sync SwipeToDismissBox with upstream 2025-07-08 21:58:34 +08:00
renovate[bot] a438d2dd88 Update plugin spotless to v7.1.0 (#2470)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-08 03:18:51 +00:00
renovate[bot] f2107edaa3 Update dependency com.squareup.okhttp3:okhttp-bom to v5.1.0 (#2469)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 22:53:53 +00:00
renovate[bot] 644f93a46d Update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.7.1 (#2468)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 22:52:51 +00:00
renovate[bot] dc52e0534e Lock file maintenance (#2466)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-07 00:37:56 +00:00
FooIbar 15e63eb86c Fix text overflow
`maxLines = 1` should always be used with `softWrap = false` or
`overflow = Ellipsis`
2025-07-06 13:25:33 +08:00
FooIbar 842e59e893 Remove deprecated SaveBodyPlugin 2025-07-05 18:51:06 +08:00
FooIbar 2b7d6745ea Simplify native build 2025-07-05 11:27:56 +08:00
renovate[bot] 3c41063a38 Update dependency gradle to v8.14.3 (#2463)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-04 16:24:28 +00:00
renovate[bot] da8e84acad Update dependency io.ktor:ktor-client-okhttp to v3.2.1 (#2461)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-03 22:34:46 +00:00
renovate[bot] 0b7658eb9b Update dependency com.squareup.okhttp3:okhttp-bom to v5.0.0 (#2460)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-03 17:33:08 +00:00
renovate[bot]andFooIbar 2d7bda3407 Update dependency androidx.compose:compose-bom-alpha to v2025.06.02 (#2457)
* Update dependency androidx.compose:compose-bom-alpha to v2025.06.02

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-07-03 02:53:34 +00:00
renovate[bot] a7d11d70d4 Update dependency androidx.core:core-splashscreen to v1.2.0-rc01 (#2458)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-02 22:19:47 +00:00
FooIbar 4b25fb8363 Fix a potential UAF
`dispose` may get called while decoding.
2025-07-03 00:09:12 +08:00
FooIbar b1aca0578c Build a single shared library 2025-07-02 23:58:31 +08:00
renovate[bot] 78d3021616 Update dependency com.squareup.okio:okio-jvm to v3.15.0 (#2454)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-02 03:13:56 +00:00
renovate[bot] 14a7a64af2 Update aboutlibraries to v12.2.4 (#2453)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-01 20:37:45 +00:00
FooIbar 6156b30a36 Remove experimental animated WebP decoder option 2025-06-30 17:09:28 +08:00
renovate[bot]andFooIbar 231afd3e71 Update dependency com.squareup.okhttp3:okhttp-bom to v5.0.0-alpha.17 (#2451)
* Update dependency com.squareup.okhttp3:okhttp-bom to v5.0.0-alpha.17

* Vendor AsyncDns stuff as they're removed in OkHttp

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-06-30 09:06:19 +00:00
renovate[bot] 14803997ba Lock file maintenance (#2452)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-30 03:20:05 +00:00
FooIbar 9a99597d4e Pause animated WebP when it becomes invisible 2025-06-29 21:01:41 +08:00
renovate[bot] 7079c3814b Update Rust crate quick-xml to 0.38 (#2448)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-28 21:18:45 +00:00
renovate[bot] 35a95e2b9b Update dependency com.squareup.okio:okio-jvm to v3.14.0 (#2447)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-28 17:39:21 +00:00
FooIbar 99d63c2396 Revert "Update dependency me.saket.telephoto:zoomable to v0.16.0 (#2336)"
This reverts commit fe371f1d66.
2025-06-28 22:41:37 +08:00
FooIbar 62383ed31b Address kotlinx-datetime 0.7.x deprecation 2025-06-28 17:20:24 +08:00
FooIbar a10f9f2ce8 Refine and enable AnimatedWebPDrawable by default (#2442) 2025-06-28 16:10:29 +08:00
renovate[bot] 924d3c4ea3 Update kotlinx.serialization to v1.9.0 (#2443)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-27 16:37:09 +00:00
renovate[bot] be83b53941 Update dependency nettle to nettle_3.10.2_release_20250626 (#2441)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-26 23:18:48 +00:00
renovate[bot] 63657d5286 Update dependency com.google.devtools.ksp to v2.2.0-2.0.2 (#2440)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-25 23:19:00 +00:00
FooIbar 9bd670cfd3 Revert "Update dependency androidx.compose:compose-bom-alpha to v2025.06.01 (…"
This reverts commit 2753804652.
2025-06-26 01:04:13 +08:00
renovate[bot]andFooIbar 2753804652 Update dependency androidx.compose:compose-bom-alpha to v2025.06.01 (#2434)
* Update dependency androidx.compose:compose-bom-alpha to v2025.06.01

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-06-25 02:41:56 +00:00
renovate[bot] 971c75e754 Update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.7.0 (#2433) 2025-06-25 02:41:20 +00:00
renovate[bot] bbe29cbd72 Update dependency chrome to v138 (#2436)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-24 22:32:39 +00:00
renovate[bot] f91deda5ba Update AGP to v8.11.0 (#2435)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-24 20:04:27 +00:00
FooIbar bd11a7fcc2 AnimatedWebPDecoder POC (#2426) 2025-06-24 23:58:52 +08:00
renovate[bot] 6edc8f06f3 Update kotlin monorepo to v2.2.0 (#2432)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-23 12:38:38 +00:00
renovate[bot] 7e3d170c83 Lock file maintenance (#2431)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-23 02:06:07 +00:00
renovate[bot] cde3ea0c95 Update dependency androidx.work:work-runtime to v2.10.2 (#2430)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-19 23:15:37 +00:00
renovate[bot] 5a34fb3443 Update dependency androidx.test.uiautomator:uiautomator to v2.4.0-alpha05 (#2429)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-19 03:35:54 +00:00
renovate[bot] c000617928 Update dependency androidx.room:room-compiler to v2.7.2 (#2428)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-18 23:56:49 +00:00
renovate[bot] 01e4747483 Update benchmark to v1.4.0-rc01 (#2427)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-18 23:56:22 +00:00
FooIbar 77eb761fc3 Fix torrent url 2025-06-18 16:56:56 +08:00
renovate[bot] 64c95c1bc5 Update dependency com.google.devtools.ksp to v2.2.0-RC3-2.0.2 (#2423)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-16 20:02:09 +00:00
renovate[bot] 5e5f9ae4bc Update kotlin monorepo to v2.2.0-RC3 (#2422)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-16 11:39:11 +00:00
FooIbar 015059321a Fix comment vote status parsing 2025-06-16 11:26:08 +08:00
renovate[bot] cc6ae217a4 Lock file maintenance (#2421)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-16 02:46:24 +00:00
FooIbar a1c730caac Fix PullToRefresh when content doesn't fill screen 2025-06-16 10:35:36 +08:00
FooIbar 365f6936a3 Stop image animation on off-screen pages 2025-06-16 10:35:13 +08:00
renovate[bot] a6f2034377 Update aboutlibraries to v12.2.3 (#2416)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-15 09:46:30 +00:00
FooIbar 95631ef468 Remove jsoup usage and clean up 2025-06-14 19:21:35 +08:00
renovate[bot] 5dc02c0bd5 Update dependency com.squareup.okio:okio-jvm to v3.13.0 (#2413)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-13 14:34:24 +00:00
FooIbar ea43837e62 Migrate GalleryDetailParser to Rust Part 4/N 2025-06-13 22:25:47 +08:00
FooIbar 4c359e50f8 Migrate GalleryDetailParser to Rust Part 3/N 2025-06-13 22:25:47 +08:00
FooIbar 1feca411b6 Migrate GalleryDetailParser to Rust Part 2/N 2025-06-12 00:33:33 +08:00
FooIbar 4dfcf96897 Clean up rust code
* Make `img` and `parser` public to get rid of dead code warnings
* Remove redundant `no_mangle` and `allow(non_snake_case)` as `jni_fn`
already adds them
2025-06-11 17:40:08 +08:00
renovate[bot] 90568f2216 Lock file maintenance (#2407)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-11 06:31:05 +00:00
FooIbar 4440763f44 Rust 2024 2025-06-11 13:40:05 +08:00
Re*Index. (ot_inc) 5b80fee02e Update Japanese 2025-06-11 09:23:13 +08:00
FooIbar e21a0eca5c Optimize rust binary size (#2403)
* -10.3% vs nightly-2024-08-30 with backtrace
* +2.8% vs nightly-2024-08-30 without backtrace
2025-06-11 09:22:36 +08:00
renovate[bot] 83a1096c08 Update dependency com.google.devtools.ksp to v2.2.0-RC2-2.0.2 (#2405)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 23:23:44 +00:00
renovate[bot] 59f1e7f471 Update aboutlibraries to v12.2.2 (#2404)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-10 23:23:09 +00:00
FooIbar 12374fb573 Migrate GalleryDetailParser to Rust Part 1/N 2025-06-10 11:39:42 +08:00
renovate[bot] 734bffd279 Lock file maintenance (#2400)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-09 00:48:45 +00:00
renovate[bot] 478d6c9035 Update dependency sh.calvin.reorderable:reorderable to v2.5.1 (#2399)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-08 21:44:56 +00:00
renovate[bot] a6048c84bd Update dependency sh.calvin.reorderable:reorderable to v2.5.0 (#2398)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-07 07:00:06 +00:00
renovate[bot] c0ab14e241 Update dependency com.google.devtools.ksp to v2.2.0-RC2-2.0.1 (#2394)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-06 07:59:42 +00:00
renovate[bot] 23332bf4a6 Update dependency com.squareup.logcat:logcat to v0.2.3 (#2395)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-06 07:59:26 +00:00
renovate[bot]andDude so hot a55293448e Convert awaitSelectTime to use TimePickerDialog (#2393)
* Convert awaitSelectTime to use TimePickerDialog

* fixup! Convert awaitSelectTime to use TimePickerDialog

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2025-06-06 15:53:11 +08:00
FooIbar f809d724a0 Reapply "Store pToken in GalleryPreview and refine parser" (#2390)
This reverts commit 5b8d3a2824.

Reason for revert: Reland with fix

Also clear invalid pToken
2025-06-05 22:36:57 +08:00
renovate[bot] 32e2e91013 Update dependency gradle to v8.14.2 (#2392)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-05 14:03:29 +00:00
renovate[bot] 5b8d3a2824 Revert "Store pToken in GalleryPreview and refine parser" (#2390) 2025-06-05 07:17:26 +00:00
renovate[bot] d4b152e7c0 Update dependency androidx.compose:compose-bom-alpha to v2025.06.00 (#2388)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-05 01:58:41 +00:00
renovate[bot] c62c84ae4d Update dependency com.squareup.logcat:logcat to v0.2.2 (#2387)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-05 01:58:06 +00:00
renovate[bot] 9e1869edde Update dependency androidx.test.uiautomator:uiautomator to v2.4.0-alpha04 (#2386)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-04 21:12:45 +00:00
renovate[bot] 1a164ff8f1 Update dependency androidx.lifecycle:lifecycle-process to v2.9.1 (#2385)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-04 21:12:28 +00:00
renovate[bot] 6b3a4aec16 Update benchmark to v1.4.0-beta02 (#2383)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-04 18:36:38 +00:00
renovate[bot] 150a687f15 Update dependency androidx.appcompat:appcompat to v1.7.1 (#2384)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-04 18:36:08 +00:00
FooIbar fc1d514475 Store pToken in GalleryPreview and refine parser
We no longer save previews in bundle.
2025-06-04 23:04:30 +08:00
renovate[bot] 5528bef09a Update kotlin monorepo to v2.2.0-RC2 (#2382)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-04 14:06:19 +00:00
FooIbar 4013740429 Enable simd feature for tl
Since we use nightly anyway.
2025-06-04 21:57:05 +08:00
FooIbar 000a932ff1 Migrate profile parser to rust 2025-06-03 23:58:52 +08:00
FooIbar 60cd7728e6 Migrate archive parser to rust 2025-06-02 22:52:40 +08:00
renovate[bot] 4f37088e20 Lock file maintenance (#2377)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-02 00:30:31 +00:00
renovate[bot] d7dc6487d0 Update dependency libarchive to v3.8.1 (#2376)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-01 21:41:37 +00:00
renovate[bot] 61c9dcbd1d Update dependency io.github.petertrr:kotlin-multiplatform-diff to v1.1.0 (#2374)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-01 13:59:15 +00:00
FooIbar 8f0404242d Remove ConstraintLayout usage 2025-06-01 16:03:29 +08:00
FooIbar 286af0e5bf Do not package OkHttp public suffix list
We handle cookies in ktor.
2025-05-31 15:24:34 +08:00
renovate[bot]andFooIbar 6c49904bf8 Update aboutlibraries to v12.2.0 (#2370)
* Update dependency com.mikepenz.aboutlibraries.plugin to v12.2.0

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-05-31 04:55:01 +00:00
renovate[bot] 509ee08e8e Update dependency com.squareup.okhttp3:okhttp-bom to v5.0.0-alpha.16 (#2369)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-29 18:20:34 +00:00
renovate[bot] fdae6f52cc Update dependency com.squareup.okhttp3:okhttp-bom to v5.0.0-alpha.15 (#2368)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-29 16:04:01 +00:00
renovate[bot] 52ef7cd956 Update AGP to v8.10.1 (#2367)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-28 22:54:12 +00:00
renovate[bot] d8bd81a0b6 Update plugin spotless to v7.0.4 (#2365)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-28 03:06:30 +00:00
renovate[bot] c2e33c7f50 Update dependency com.squareup.okio:okio-jvm to v3.12.0 (#2366)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-28 03:06:07 +00:00
renovate[bot] a9498a1b92 Update dependency chrome to v137 (#2364)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-27 20:44:45 +00:00
FooIbar f74b8373e3 Fix predictive back crash after launch page change
https://issuetracker.google.com/384186542
2025-05-27 22:34:41 +08:00
FooIbar 809f628bc0 Fix stop all shortcut with no active downloads
The downloading notification would keep showing.
2025-05-26 23:38:46 +08:00
FooIbar 54a2b28219 Auto backup improvements
- Fix backup data size quota exceed
- Backup cookies and preferences on Android 9+ (require E2EE)
2025-05-26 21:20:47 +08:00
FooIbar 0719c53e86 Restore accidently removed @Serializable on Limits 2025-05-26 15:23:29 +08:00
renovate[bot] e9f3deaec0 Lock file maintenance (#2359)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-26 02:38:06 +00:00
FooIbar 8207be5940 Reapply "Migrate from Parcelize to kotlinx.serialization" (#2357)
* Reapply "Migrate from Parcelize to kotlinx.serialization" (#2356)

This reverts commit c2e53cc8b9.

* Fix stale states captured by lambdas in ViewModels
2025-05-25 22:27:16 +08:00
FooIbar c2e53cc8b9 Revert "Migrate from Parcelize to kotlinx.serialization" (#2356)
This reverts commit 857b1d9b57.

Reason for revert: https://github.com/FooIbar/EhViewer/issues/2355
2025-05-23 16:21:11 +00:00
FooIbar 251b99f76d Fix snackbar blocking progress dialog dismissal 2025-05-23 23:21:01 +08:00
Dude so hot c4c86104b5 Revert "MetaState trigger refresh implicitly (#2350)"
This reverts commit 277deace47.
Revert reason: `ListUrlBuilder` doesn't have a qualified `equals` semantics

# Conflicts:
#	app/src/main/kotlin/com/hippo/ehviewer/client/data/FavListUrlBuilder.kt
#	app/src/main/kotlin/com/hippo/ehviewer/ui/screen/GalleryListScreen.kt
2025-05-23 20:20:47 +08:00
FooIbar 857b1d9b57 Migrate from Parcelize to kotlinx.serialization
Also remove some unnecessary Parcelables.
2025-05-23 18:22:10 +08:00
renovate[bot] 277deace47 MetaState trigger refresh implicitly (#2350) 2025-05-23 17:09:08 +08:00
renovate[bot] 30c659110f Migrate to context parameters 2025-05-23 04:57:48 +00:00
renovate[bot] a8b6adfba2 Update dependency gradle to v8.14.1 (#2349)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-22 14:27:56 +00:00
FooIbar 1548e16fbe Avoid drawing invisible slider ticks and cleanup (#2346) 2025-05-22 10:03:14 +08:00
FooIbar 0e34baf1bf Enable composition stack traces in debug builds 2025-05-21 20:48:45 +08:00
renovate[bot] 2c461b5ccf Update dependency androidx.datastore:datastore to v1.1.7 (#2315)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-21 02:03:56 +00:00
renovate[bot] 2adbeddde3 Update dependency androidx.test.uiautomator:uiautomator to v2.4.0-alpha03 (#2344)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-20 22:31:59 +00:00
renovate[bot] e0a79fcc63 Update dependency androidx.compose:compose-bom-alpha to v2025.05.01 (#2342)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-20 18:04:47 +00:00
renovate[bot] 5e07813a57 Update dependency androidx.biometric:biometric to v1.4.0-alpha04 (#2341)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-20 18:04:15 +00:00
FooIbar 400d478bca Update build scripts for Kotlin 2.2
- Don't generate compatibility bridges and `DefaultImpls` classes
- Remove when guards compiler option as it became stable
- Address deprecation of `kotlinOptions`
2025-05-21 00:58:26 +08:00
renovate[bot]andrenovate[bot] 786ea2ca37 Update dependency libarchive to v3.8.0 (#2338)
* Update dependency libarchive to v3.8.0

* Update 0002-Fix-zip_time-performance.patch

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <99822064+revonateB0T@users.noreply.github.com>
2025-05-20 15:52:52 +00:00
Dude so hot ba169d35a4 Kotlin 2.2.0-RC 2025-05-20 23:22:23 +08:00
FooIbar f2dbb31951 Reader app bars improvements (#2337)
* Flatten reader app bars layout

* Fix reader app bars contract on grey background

* Fix unexpected reader app bars visibility changes
2025-05-20 20:01:24 +08:00
renovate[bot] fe371f1d66 Update dependency me.saket.telephoto:zoomable to v0.16.0 (#2336)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-20 07:31:22 +00:00
renovate[bot]andFooIbar 1b8ae87b08 Update dependency com.pinterest.ktlint:ktlint-cli to v1.6.0 (#2335)
* Update dependency com.pinterest.ktlint:ktlint-cli to v1.6.0

* Fix spotless

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-05-20 05:27:44 +00:00
renovate[bot] fece5f64ce Update dependency com.squareup.logcat:logcat to v0.2.1 (#2334)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-19 21:01:00 +00:00
FooIbar bcedbd85ef Image loading optimizations
- Fix potential memory cache miss
- Reduce `SizeResolver` allocations
- Make data source type more accurate
2025-05-19 21:36:27 +08:00
renovate[bot]andFooIbar dc4ea5e96d Update dependency com.squareup.logcat:logcat to v0.2 (#2331)
* Update dependency com.squareup.logcat:logcat to v0.2

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-05-19 04:02:24 +00:00
renovate[bot] 7e0e01295f Lock file maintenance (#2332)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-19 02:42:29 +00:00
FooIbar 88268a22a9 Migrate to M3 Expressive medium flexible app bar 2025-05-18 23:51:49 +08:00
FooIbar 428a1cb0d2 Fix download progress indicator recomposition 2025-05-18 19:11:23 +08:00
FooIbar b3dda2a1ff Migrate to M3 Expressive docked toolbar 2025-05-17 23:10:17 +08:00
FooIbar 74f9330c38 Migrate to M3 Expressive progress indicators 2025-05-17 23:10:17 +08:00
FooIbar ebf99eda55 Migrate to M3 Expressive loading indicator 2025-05-17 23:10:17 +08:00
FooIbar 7d05e5382a Use LazyLayoutCacheWindow API for prefetching (#2325)
* Use `LazyLayoutCacheWindow` API for prefetching

With the old strategy, prefetched images may be evicted from cache.

* Make decoding process non-cancellable
2025-05-17 23:10:05 +08:00
FooIbar e559520df3 Minor cleanup 2025-05-17 14:39:36 +08:00
renovate[bot] a9b300d357 Update dependency io.arrow-kt:arrow-stack to v2.1.2 (#2326)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-16 14:55:38 +00:00
renovate[bot] f58f930446 Update xmlutil to v0.91.1 (#2324)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-15 20:17:07 +00:00
FooIbar f10bf6d714 Add back desktop site option to bypass Cloudflare (#2323) 2025-05-15 21:49:21 +08:00
FooIbar 6898300c30 Fix quick search import 2025-05-14 21:42:46 +08:00
FooIbar 85bc6fdd28 Show favorite status in grid view 2025-05-14 18:49:13 +08:00
renovate[bot] 4cdf5a8ba6 Update dependency com.google.devtools.ksp to v2.1.21-2.0.1 (#2320)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-13 23:28:34 +00:00
renovate[bot] 8ca220e98a Update kotlin monorepo to v2.1.21 (#2318)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-13 13:10:29 +00:00
renovate[bot] ec2d37b295 Update dependency io.coil-kt.coil3:coil-bom to v3.2.0 (#2317)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-13 07:15:26 +00:00
renovate[bot] 3b2118331b Lock file maintenance (#2316)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-12 02:28:01 +00:00
renovate[bot] ed89e504b0 Update dependency androidx.compose:compose-bom-alpha to v2025.05.00 2025-05-08 08:57:53 +08:00
renovate[bot] 30eec80177 Revert "Update dependency androidx.datastore:datastore to v1.1.6 (#2311)"
This reverts commit 07f730aba6.
2025-05-08 08:39:34 +08:00
renovate[bot] 07f730aba6 Update dependency androidx.datastore:datastore to v1.1.6 (#2311)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-07 23:06:32 +00:00
renovate[bot] 3bfd282614 Update dependency androidx.test.uiautomator:uiautomator to v2.4.0-alpha02 (#2312)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-07 23:06:13 +00:00
renovate[bot] d031954976 Update androidx.lifecycle to v2.9.0 (#2309)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-07 20:03:27 +00:00
renovate[bot] 86f9b9d0f7 Update benchmark to v1.4.0-beta01 (#2310)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-07 20:02:42 +00:00
renovate[bot] 3b1f98d675 Update aboutlibraries to v12.1.2 (#2308)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-07 12:32:00 +00:00
renovate[bot] 66e37c8f6b Update AGP to v8.10.0 (#2307)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-06 20:14:29 +00:00
renovate[bot] 3fc6adb2b7 Update aboutlibraries to v12.1.1 (#2306)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-06 20:10:53 +00:00
renovate[bot] 1c971c161f Update dependency io.ktor:ktor-client-okhttp to v3.1.3 (#2305)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 12:35:34 +00:00
renovate[bot] 8883d048a7 Lock file maintenance (#2304)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-05 02:27:47 +00:00
renovate[bot] 66dbbb1eee Update compose.destinations to v2.2.0 (#2303)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-03 14:28:14 +00:00
renovate[bot] cb7bbeba99 Update compose.destinations to v2.1.1 (#2302)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-01 15:38:02 +00:00
renovate[bot] 7bf8de139f Update aboutlibraries to v12.1.0 (#2301)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-01 07:56:40 +00:00
renovate[bot] b7ffc255f5 Update dependency com.google.devtools.ksp to v2.1.20-2.0.1 (#2300)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-01 01:45:22 +00:00
renovate[bot] 06aa4c60c8 Update dependency chrome to v136 (#2299)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-29 19:49:06 +00:00
renovate[bot] 07e4db9240 Update dependency io.arrow-kt:arrow-stack to v2.1.1 (#2298)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-29 15:06:38 +00:00
renovate[bot] c0144809c6 Update dependency org.jsoup:jsoup to v1.20.1 (#2297)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-29 06:41:59 +00:00
renovate[bot] ffeadc9e44 Update dependency com.google.accompanist:accompanist-drawablepainter to v0.37.3 (#2296)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 12:50:41 +00:00
renovate[bot] a15ed69624 Lock file maintenance (#2295)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 02:03:03 +00:00
renovate[bot] b0fd40444f Update aboutlibraries to v12.1.0-rc04 (#2294)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-27 19:12:27 +00:00
Dude so hot 8cddc0d974 Fix DownloadScreen thumb flickering on select state changed 2025-04-27 16:31:49 +08:00
renovate[bot] 08b76b643d Update aboutlibraries to v12.1.0-rc03 (#2291)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-26 18:52:25 +00:00
renovate[bot] 13c623b788 Update aboutlibraries to v12.1.0-rc02 (#2286) 2025-04-26 13:04:04 +00:00
renovate[bot] b77bd6b3f9 Update dependency gradle to v8.14 (#2290)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-25 12:14:05 +00:00
FooIbar d3dec6981a Update aboutlibraries to v12.1.0-rc01 2025-04-25 20:10:26 +08:00
renovate[bot] 5dd617be69 Update dependency Corrosion to v0.5.2 (#2288)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-25 03:03:58 +00:00
FooIbar 1b093469bf Update NDK to r28b 2025-04-24 23:14:18 +08:00
FooIbar 7286c81885 Address deprecations 2025-04-24 23:06:28 +08:00
FooIbar 4ef7707736 Address warnings 2025-04-24 23:06:28 +08:00
renovate[bot] c06a9f915d Update dependency androidx.compose:compose-bom-alpha to v2025.04.01 (#2283)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-24 03:08:28 +00:00
renovate[bot] fe2907974a Update dependency androidx.work:work-runtime to v2.10.1 (#2282)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-24 03:08:09 +00:00
renovate[bot] 3e79617fc9 Update dependency androidx.core:core-splashscreen to v1.2.0-beta02 (#2280)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-23 23:23:19 +00:00
renovate[bot] 52e2fe6fed Update androidx.room to v2.7.1 (#2279)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-23 20:12:58 +00:00
renovate[bot] 8e4265a5f8 Update androidx.lifecycle to v2.9.0-rc01 (#2278)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-23 20:12:19 +00:00
renovate[bot] 623de00376 Update AGP to v8.9.2 (#2276)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-21 19:53:25 +00:00
renovate[bot] 6320900d7c Lock file maintenance (#2274)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-21 03:50:56 +00:00
FooIbar ab1ff284ca [no ci] Fix renovate config 2025-04-19 00:10:49 +08:00
renovate[bot]andFooIbar 37ad3d0882 Update dependency com.mikepenz.aboutlibraries.plugin to v12.0.0 (#2269)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-04-18 16:04:54 +00:00
renovate[bot] c94123da06 Update aboutlibraries to v12.0.0 (#2268)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-18 15:50:02 +00:00
FooIbar 7eef1727a2 Revert "Update aboutlibraries to v12.0.0-b03 (#2264)"
This reverts commit aefca644e8.
2025-04-17 20:37:29 +08:00
FooIbar 6f692db069 Clean up renovate config
KSP2 is no longer a compiler plugin so the Kotlin version doesn't matter
2025-04-17 20:36:09 +08:00
renovate[bot] aefca644e8 Update aboutlibraries to v12.0.0-b03 (#2264)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-17 12:29:06 +00:00
FooIbar 99ff71b7e1 Update aboutlibraries to v12.0.0-b03 2025-04-17 20:21:00 +08:00
FooIbar 430ee19dd3 Allow users to disable QUIC support 2025-04-15 21:20:06 +08:00
renovate[bot] d9dbafb51b Lock file maintenance (#2260)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-14 02:57:32 +00:00
FooIbar d78b3a7fa0 Revert "Update dependency androidx.compose:compose-bom-alpha to v2025.04.00 (…"
This reverts commit d753c36195.
2025-04-10 15:36:20 +08:00
renovate[bot] 424dc6dd49 Update dependency com.squareup.okio:okio-jvm to v3.11.0 (#2256)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-10 07:05:21 +00:00
renovate[bot] 1f4347a316 Update dependency androidx.core:core-ktx to v1.16.0 (#2255)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-10 07:05:04 +00:00
renovate[bot] acd9f2ae1c Update benchmark to v1.4.0-alpha11 (#2253)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-10 04:02:17 +00:00
renovate[bot] d753c36195 Update dependency androidx.compose:compose-bom-alpha to v2025.04.00 (#2254)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-10 04:01:51 +00:00
renovate[bot] 7dd0deb931 Update androidx.room to v2.7.0 (#2251)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 22:39:22 +00:00
renovate[bot] ba1126db0e Update androidx.lifecycle to v2.9.0-beta01 (#2250)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 22:38:47 +00:00
renovate[bot] 359a417692 Drop obsolete argument 2025-04-09 13:36:40 +08:00
renovate[bot] 42ac0055c2 Update dependency com.google.devtools.ksp to v2.1.20-2.0.0 (#2248)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-09 03:34:53 +00:00
renovate[bot] c0dd03e3f7 Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-android to v1.10.2 (#2247)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-08 12:17:46 +00:00
renovate[bot] 6b1bda629f Update plugin spotless to v7.0.3 (#2246)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-08 03:35:18 +00:00
renovate[bot] 0b43daf507 Lock file maintenance (#2245)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-07 01:50:31 +00:00
renovate[bot] 894038280e Update plugin composeCompilerReportGenerator to v1.4.2 (#2244)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-06 13:38:49 +00:00
renovate[bot] 2704ab9afb Update dependency liblzma to v5.8.1 (#2241)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-03 15:41:55 +00:00
FooIbar 8d604848da Revert "Update dependency androidx.compose:compose-bom-alpha to v2025.03.01 (#2222)"
This reverts commit ef2cfec1a2.

Reason for revert: https://issuetracker.google.com/408118041
2025-04-03 23:41:36 +08:00
renovate[bot] 6f6f123880 Update dependency chrome to v135 (#2239)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-01 22:17:50 +00:00
renovate[bot] 620b037a17 Update xmlutil to v0.91.0 (#2237)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-01 16:43:56 +00:00
renovate[bot] a653454e7d Update kotlinx.serialization to v1.8.1 (#2236)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-01 16:43:29 +00:00
renovate[bot] 38a8c9eb34 Lock file maintenance (#2235)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-31 03:47:06 +00:00
renovate[bot] 8cdf16a272 Update dependency libarchive to v3.7.9 (#2234)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-30 22:28:13 +00:00
renovate[bot] 24333a24ae Lock file maintenance (#2231)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-29 14:37:55 +00:00
FooIbar e83c542886 Update androidx.biometric to v1.4.0-alpha03 2025-03-28 19:30:03 +08:00
FooIbar c61824b362 Update xmlutil to 0.91.0-RC1 2025-03-28 17:07:40 +08:00
renovate[bot] 591f918412 Update dependency io.ktor:ktor-client-okhttp to v3.1.2 (#2226)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-27 12:10:24 +00:00
renovate[bot] ab1335102a Update dependency com.google.devtools.ksp to v2.1.20-1.0.32 (#2225)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-27 06:49:34 +00:00
renovate[bot] 41cdc33432 Update dependency androidx.datastore:datastore to v1.1.4 (#2224)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-27 06:49:09 +00:00
renovate[bot] ef2cfec1a2 Update dependency androidx.compose:compose-bom-alpha to v2025.03.01 (#2222)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-27 02:34:31 +00:00
renovate[bot] 6f2a5d8cdb Update benchmark to v1.4.0-alpha10 (#2221)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-27 02:33:52 +00:00
renovate[bot] c3d52d430a Update androidx.room to v2.7.0-rc03 (#2220)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-26 23:08:55 +00:00
renovate[bot] 806897adf8 Update androidx.lifecycle to v2.9.0-alpha13 (#2219)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-26 23:08:40 +00:00
renovate[bot] c9b1bc175a Update dependency com.materialkolor:material-kolor to v2.1.1 (#2218)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-26 17:03:09 +00:00
renovate[bot]andFooIbar f4d9d9795a Update dependency liblzma to v5.8.0 (#2216)
* Update dependency liblzma to v5.8.0

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2025-03-26 11:35:47 +00:00
renovate[bot] 08e6d670de Update dependency com.materialkolor:material-kolor to v2.1.0 (#2217)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-25 22:12:34 +00:00
renovate[bot] a2848d52fc Update AGP to v8.9.1 (#2214)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-24 20:43:22 +00:00
FooIbar fa219a674e Address warnings 2025-03-24 21:15:41 +08:00
renovate[bot] 0d0faa3218 Lock file maintenance (#2212)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-24 04:00:10 +00:00
renovate[bot] 09ab930c56 Revert "Disable shared element transition for DownloadCard"
This reverts commit e5361949df.
2025-03-21 23:58:25 +08:00
renovate[bot] 9b7b411825 Inline PageLoader user (#2209) 2025-03-21 22:03:37 +08:00
renovate[bot] aacde8871e Migrate j.u.c.a atomics usages to k.c.a (#2207) 2025-03-21 12:27:38 +00:00
Dude so hot 1aa1addcf7 Address NamedMutex warning 2025-03-21 11:12:06 +08:00
Dude so hot a305980a78 Address telephoto deprecated API 2025-03-21 11:12:06 +08:00
Dude so hot 0def055e8b Avoid contextual classes for incoming context parameters 2025-03-21 11:12:06 +08:00
Dude so hot 29e9291030 Update benchmark module sdk to 36 2025-03-21 10:41:33 +08:00
renovate[bot] e9015d95e4 Update dependency com.google.devtools.ksp to v2.1.20-1.0.31 (#2203)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-21 02:27:38 +00:00
renovate[bot] 9cedcc4395 Update Kotlin & KSP to v2.1.20 (#2200)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-20 12:53:37 +00:00
renovate[bot] 744d8f4262 Update dependency libarchive to v3.7.8 (#2201)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-20 12:53:07 +00:00
renovate[bot] d9efc7aa19 Lock file maintenance (#2199)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-17 03:12:28 +00:00
FooIbar 53525cffe9 Fix renovate config 2025-03-14 20:01:47 +08:00
renovate[bot] c1269ede63 Update dependency com.pinterest.ktlint:ktlint-cli to v1.5.0 (#2198)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-14 12:01:38 +00:00
FooIbar 6102a33397 Fix renovate config 2025-03-14 19:54:42 +08:00
FooIbar 192e8ef664 Target SDK 36 2025-03-14 17:41:45 +08:00
renovate[bot] 5778230ee4 Update dependency androidx.compose:compose-bom-alpha to v2025.03.00 (#2196)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-14 02:21:50 +00:00
renovate[bot] 9e959306b1 Update benchmark to v1.4.0-alpha09 (#2195)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-14 02:21:09 +00:00
renovate[bot] 7a7f4eb458 Update androidx.room to v2.7.0-rc02 (#2193)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-14 00:22:36 +00:00
renovate[bot] 050545411d Update androidx.lifecycle to v2.9.0-alpha12 (#2192)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-14 00:22:08 +00:00
FooIbar 28b394d5ea Tweak side sheet item style 2025-03-11 22:39:06 +08:00
renovate[bot] a3761dab35 Lock file maintenance (#2190)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-10 01:46:33 +00:00
FooIbar 79ae51a973 Use KSP2 2025-03-08 14:30:16 +08:00
FooIbar b724286886 Drop obsolete code as HTTP/2 is fully supported (#2185) 2025-03-08 14:23:10 +08:00
renovate[bot] 9c52e789b3 Update Rust crate android_logger to 0.15 (#2188)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-06 22:52:03 +00:00
renovate[bot] 717a3740c6 Update compose.destinations to v2.1.0 (#2187)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-06 19:59:31 +00:00
renovate[bot] a8738b9ca9 Update dependency chrome to v134 (#2184)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-04 21:39:34 +00:00
renovate[bot] ea5dba02b1 Update AGP to v8.9.0 (#2183)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-04 20:03:51 +00:00
renovate[bot] 9fbcb59f32 Update dependency org.jsoup:jsoup to v1.19.1 (#2182)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-04 07:42:28 +00:00
renovate[bot] 9b312d4a71 Lock file maintenance (#2180)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-03 03:13:52 +00:00
renovate[bot] 480002e50d Update dependency com.google.devtools.ksp to v2.1.10-1.0.31 (#2179)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 19:30:44 +00:00
renovate[bot] 9cc775f548 Update dependency io.github.petertrr:kotlin-multiplatform-diff to v1 (#2178)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 07:14:57 +00:00
renovate[bot] 514e50da74 Update dependency androidx.datastore:datastore to v1.1.3 (#2177)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 07:14:10 +00:00
renovate[bot] 9dea931db0 Update dependency androidx.constraintlayout:constraintlayout-compose to v1.1.1 (#2175)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 03:37:24 +00:00
renovate[bot] 12c60715d2 Update dependency androidx.core:core-splashscreen to v1.2.0-beta01 (#2176)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-27 03:37:11 +00:00
renovate[bot] 23e0c45a52 Update androidx.room to v2.7.0-rc01 (#2173)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 22:34:54 +00:00
renovate[bot] c0c9c834e7 Update dependency androidx.activity:activity-compose to v1.10.1 (#2174)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 22:34:30 +00:00
renovate[bot] 9aaa0e8d36 Update AGP to v8.8.2 (#2171)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 19:16:57 +00:00
renovate[bot] 7bb4daabe2 Update androidx.lifecycle to v2.9.0-alpha11 (#2172)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-26 19:13:22 +00:00
renovate[bot] b0203874af Update dependency gradle to v8.13 (#2170)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-25 12:13:03 +00:00
renovate[bot] 2ee757e0b2 Update dependency com.android.tools:desugar_jdk_libs to v2.1.5 (#2169)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-25 12:08:33 +00:00
renovate[bot] b4db2885aa Update dependency io.ktor:ktor-client-okhttp to v3.1.1 (#2168)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-24 22:09:30 +00:00
FooIbar 4381237eb3 Use different color for selected items 2025-02-24 17:09:53 +08:00
renovate[bot] d91d333baa Lock file maintenance (#2165)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-24 01:59:26 +00:00
FooIbar 5f6f979bce Comment about rememberSwipeToDismissBoxState usage 2025-02-21 20:32:15 +08:00
FooIbar 881b76fa3e Only add quick search when is not loading or error 2025-02-21 20:32:15 +08:00
renovate[bot] e92dc29896 Update dependency com.google.accompanist:accompanist-drawablepainter to v0.37.2 (#2161)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-21 02:38:29 +00:00
renovate[bot] 07e64a30e4 Update dependency com.google.accompanist:accompanist-drawablepainter to v0.37.1 (#2159)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-20 06:50:04 +00:00
FooIbar ac8765655f Fix lambdas in side sheet capturing outdated value 2025-02-19 22:13:47 +08:00
renovate[bot] b5c8cfd9f8 Lock file maintenance (#2158)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-17 03:19:50 +00:00
renovate[bot] 71b11a3708 Update dependency me.saket.telephoto:zoomable to v0.15.1 (#2157)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-16 22:50:56 +00:00
renovate[bot] 8040394150 Update dependency me.saket.telephoto:zoomable to v0.15.0 (#2155)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-16 05:39:17 +00:00
FooIbar a07856a877 Revert "Update aboutlibraries to v11.6.0 (#2109)"
This reverts commit 6e990d3359.
2025-02-14 23:03:17 +08:00
renovate[bot] 6e990d3359 Update aboutlibraries to v11.6.0 (#2109)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-14 14:53:53 +00:00
renovate[bot] 031cdbf187 Update dependency com.google.devtools.ksp to v2.1.10-1.0.30 (#2151)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-14 06:30:41 +00:00
renovate[bot] 7198bda02e Update AGP to v8.8.1 (#2150)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-13 20:08:50 +00:00
renovate[bot] 18df20b675 Update dependency androidx.compose:compose-bom-alpha to v2025.02.00 (#2147)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-13 00:54:52 +00:00
FooIbar 581e6d2e5c Fix CI channel update 2025-02-13 08:46:00 +08:00
renovate[bot] 91c92f9dac Update benchmark to v1.4.0-alpha08 (#2145)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-12 21:56:09 +00:00
renovate[bot] 886e84a0c5 Update dependency androidx.paging:paging-compose to v3.3.6 (#2146)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-12 21:55:39 +00:00
renovate[bot] bfeeb955f0 Update androidx.lifecycle to v2.9.0-alpha10 (#2143)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-12 19:40:18 +00:00
renovate[bot] beebffa5fc Update androidx.room to v2.7.0-beta01 (#2144)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-12 19:39:22 +00:00
FooIbar bf6085bdf9 Migrate to the new semantics-based Autofill APIs 2025-02-12 17:42:53 +08:00
FooIbar db064e788b Fix auto logout when logging in through WebView 2025-02-12 17:42:42 +08:00
renovate[bot] 23be3be21e Upgrade build tools to 35.0.1 2025-02-12 13:23:57 +08:00
renovate[bot] 02ab809c34 NDK r28 (#2140)
* Update settings.gradle.kts

* Update build.gradle.kts
2025-02-12 10:22:07 +08:00
renovate[bot] 4d538714e4 Update dependency io.ktor:ktor-client-okhttp to v3.1.0 (#2139)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-11 23:42:02 +00:00
FooIbar 43e968864d Fix app updater to bypass GitHub login requirement 2025-02-11 08:31:57 +08:00
renovate[bot] 03f01bb5a0 Update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.6.2 (#2136)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 16:57:44 +00:00
renovate[bot] a7a6f60ebf Lock file maintenance (#2134)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 01:13:54 +00:00
FooIbar 4debd0a292 Revert "Migrate to lyricist, Part 1 (#2014)"
This reverts commit 0e608d16
2025-02-08 11:02:50 +08:00
Re*Index. (ot_inc) f0fa010df4 Update Japanese translations (#2130)
* Update strings.xml

* Update strings.xml

* Update ja.md
2025-02-08 10:19:39 +08:00
renovate[bot] 005112043e Update dependency io.coil-kt.coil3:coil-bom to v3.1.0 (#2127)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-05 01:15:50 +00:00
renovate[bot] 1d118af0f5 Update dependency chrome to v133 (#2126)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-04 18:53:28 +00:00
renovate[bot] fa0bfc256a Lock file maintenance (#2123)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-03 01:39:44 +00:00
renovate[bot] 602905ef25 Update dependency com.materialkolor:material-kolor to v2.0.2 (#2120)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-30 18:29:39 +00:00
renovate[bot] 1f429e4773 Update compose.destinations to v2.1.0-beta16 (#2119)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-30 18:29:23 +00:00
renovate[bot] 6ce6699355 Update dependency androidx.compose:compose-bom-alpha to v2025.01.01 (#2118)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-30 01:02:31 +00:00
renovate[bot] 3d46ae8440 Update benchmark to v1.4.0-alpha07 (#2117)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-30 01:02:13 +00:00
renovate[bot] bbbea1db9c Update androidx.lifecycle to v2.9.0-alpha09 (#2115)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-29 20:47:54 +00:00
renovate[bot] dc7f353e67 Update androidx.room to v2.7.0-alpha13 (#2116)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-29 20:46:47 +00:00
renovate[bot] 6ca6f14ad9 Update dependency com.google.devtools.ksp to v2.1.10-1.0.29 (#2114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-29 02:02:30 +00:00
renovate[bot] 03fd2708cd Update Kotlin & KSP to v2.1.10 (#2113)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-27 16:29:40 +00:00
renovate[bot] 6149497885 Update dependency com.materialkolor:material-kolor to v2.0.1 (#2112)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-26 20:28:27 +00:00
FooIbar f810ef03a7 Enable strict resource shrinking mode (#2110) 2025-01-25 14:05:01 +00:00
FooIbar eeef444df7 Revert "Update aboutlibraries to v11.5.0 (#2106)"
This reverts commit 03769e6cf6.
2025-01-25 17:12:02 +08:00
renovate[bot] 03769e6cf6 Update aboutlibraries to v11.5.0 (#2106)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 18:07:31 +00:00
renovate[bot] b0bd759035 Update dependency io.arrow-kt:arrow-stack to v2.0.1 (#2105)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 18:06:30 +00:00
renovate[bot] eb92b9ca78 Update dependency gradle to v8.12.1 (#2104)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 14:13:16 +00:00
renovate[bot] 411ab8db38 Update dependency liblzma to v5.6.4 (#2103)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-23 21:14:22 +00:00
renovate[bot] a679c17c64 Lock file maintenance (#2101)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-20 01:12:10 +00:00
renovate[bot] 87b7c46eb5 Update dependency sh.calvin.reorderable:reorderable to v2.4.3 (#2099)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-19 08:53:29 +00:00
renovate[bot]andDude so hot a8c0a05c28 Make DialogState Screen-Local (#2097)
* Prepare to make DialogState per Screen

* Remove some LocalDialogState usage

* Make DialogState Screen-Local

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2025-01-16 21:08:07 +08:00
Dude so hot 6ac512e749 Address Code Review 2025-01-16 20:22:34 +08:00
Dude so hot be55f3cf90 asyncState takes produce 2025-01-16 20:22:34 +08:00
Dude so hot cbbbc7f211 Rename delegateSnapshotUpdate to asyncState 2025-01-16 20:22:34 +08:00
Dude so hot 623c4c3e39 Remove unused functions 2025-01-16 20:22:34 +08:00
Dude so hot b0ab1f0f2d Make delegateSnapshotUpdate accept two lambda 2025-01-16 20:22:34 +08:00
renovate[bot]andDude so hot 733937ec74 Use androidx SearchBar InputField (#2095)
* Use androidx SearchBar InputField

* Fix

* Fix

* Address CR

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2025-01-16 11:31:30 +00:00
renovate[bot] 14a8818563 Update dependency androidx.compose:compose-bom-alpha to v2025 (#2094)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-16 01:30:16 +00:00
renovate[bot] 695d00506b Update dependency androidx.activity:activity-compose to v1.10.0 (#2092)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-15 20:28:43 +00:00
renovate[bot] e1a90a79ec Update dependency androidx.datastore:datastore to v1.1.2 (#2093)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-15 20:28:22 +00:00
renovate[bot] c6cedf7a02 Update dependency chrome to v132 (#2091)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-15 02:02:49 +00:00
renovate[bot] 9d870a3781 Update plugin spotless to v7.0.2 (#2090)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-14 22:15:09 +00:00
renovate[bot] e0a33f3013 Lock file maintenance (#2089)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-13 01:29:24 +00:00
FooIbar e3e95788b4 Clean up build script and address some warnings 2025-01-12 12:18:28 +08:00
FooIbar 0e87595692 Fix gallery comment style by not reusing Spans 2025-01-11 21:35:54 +08:00
FooIbar e5361949df Disable shared element transition for DownloadCard 2025-01-11 16:39:06 +08:00
FooIbar 62290e2812 Fix favorite names & notes in gallery detail cache 2025-01-10 23:44:20 +08:00
renovate[bot] 489b82e8f4 Update AGP to v8.8.0 (#2083)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-09 22:21:08 +00:00
renovate[bot] 4e8d6e058b Update plugin com.android.settings to v8.8.0 (#2082)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-09 18:05:45 +00:00
renovate[bot] 535e3abe92 Update dependency com.squareup.okio:okio-jvm to v3.10.2 (#2079)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-08 21:45:13 +00:00
FooIbar 35fbd4443e Refine tag database updating 2025-01-08 23:41:16 +08:00
renovate[bot] edf667f462 Update plugin spotless to v7.0.1 (#2077)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-08 02:12:57 +00:00
renovate[bot] a22be909a7 Update dependency com.squareup.okio:okio-jvm to v3.10.1 (#2076)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-08 02:12:14 +00:00
FooIbar 915f6d0b46 Allow archives to have more pages than galleries (#2073) 2025-01-08 10:05:29 +08:00
FooIbar c23e7af24b Remove obsolete workaround
This reverts commit 8811f92aea.
2025-01-07 22:58:42 +08:00
renovate[bot] 91fdbaff4d Update plugin spotless to v7 (#2070)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-07 09:44:35 +00:00
renovate[bot] c6f258f01d Update dependency com.squareup.okio:okio-jvm to v3.10.0 (#2069)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-07 09:44:04 +00:00
FooIbar 8811f92aea Fix build 2025-01-07 17:37:02 +08:00
renovate[bot] 0726505c25 Update kotlinx.serialization to v1.8.0 (#2068)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 17:16:33 +00:00
renovate[bot] 4df1d6cb0a Lock file maintenance (#2067)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 00:09:20 +00:00
renovate[bot] 773b5d4dab Hide comment which score reaches -100 by default (#2065) 2025-01-04 02:49:42 +00:00
renovate[bot] 660fa66df4 Revert "Update aboutlibraries to v11.3.0 (#2063)"
This reverts commit c2992e3a35.
2025-01-04 10:42:52 +08:00
renovate[bot] c2992e3a35 Update aboutlibraries to v11.3.0 (#2063)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-03 18:35:50 +00:00
Dude so hot d07649bcf8 Cleanup unused code 2025-01-03 12:30:13 +08:00
Dude so hot 5e1baf2104 Recover removed author style 2025-01-03 12:30:13 +08:00
Dude so hot e8701b65c6 Drop HAtHBlacklist
immature implementation
2025-01-03 12:10:42 +08:00
Dude so hot 517d6f6d0b timeoutBySpeed accept OnTimeout handler 2025-01-03 12:10:42 +08:00
renovate[bot]andDude so hot b7c5c15280 Make timeoutSpeed pow of 2 (#2060)
* IntSliderPreference support display transforms

* Make timeoutSpeed pow of 2

* Fix conversion

* Fix conversion

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2025-01-03 11:45:21 +08:00
renovate[bot]andDude so hot 0561a9bcf6 H@H blacklist (#2058)
* Move SpeedTracker to proper place

* SpeedTracker use Instant to avoid value class in generic

* Initial HAtHBlacklist

* H@H blacklist switch

* Allow to trim H@H blacklist

* Don't blacklist if that H@H returned twice

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-12-31 19:46:28 +08:00
Dude so hot 05a14a3610 And balance retry times 2024-12-31 18:15:34 +08:00
Dude so hot b3737448d7 Don't retry at one H@H twice
Now that quota is cheap
2024-12-31 18:15:34 +08:00
renovate[bot]andDude so hot bfa91bf2fb Apply watchdog before send request (#2056)
* Apply watchdog before send request

* Cleanup CronetEngine

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-12-31 17:55:39 +08:00
renovate[bot]andDude so hot b7948f7965 Introduce speed based timeout strategy (#2055)
* CronetEngine throw connTimeout properly

* Apply LowSpeedDetector

* Add switch

* Relax

* Refine

* Extract common part

* Apply to AppUpdater

* Fix

* Adjust

* Log conn timeout as well

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-12-31 15:25:00 +08:00
renovate[bot]andDude so hot b0f310b2fe Introduce connection timeout (#2054)
* Introduce connection timeout, Prepare to convert requestTimeout to speed based

* Fix step

* Refine

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-12-31 13:15:42 +08:00
renovate[bot]andDude so hot ac598fdfab Introduce Windowed SpeedTracker (#2053)
* Remove unreachable cond in `humanReadableByteCount`

* Introduce Windowed SpeedTracker

* Cleanup

* Optimise SpeedTracker for startcase

* Fixup

* Update naming

* Fix

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-12-31 12:11:13 +08:00
renovate[bot] 60e6a04d0d Update dependency nettle to nettle_3.10.1_release_20241230 (#2052)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-30 19:45:06 +00:00
renovate[bot] c4884022af Lock file maintenance (#2051)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-30 01:29:22 +00:00
renovate[bot] a70091bf99 Update dependency Corrosion to v0.5.1 (#2050)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-29 17:46:35 +00:00
renovate[bot]andDude so hot ebaf75df95 Update Rust crate rxing to 0.7 (#2047)
* Update Rust crate rxing to 0.7

* Fix build

Signed-off-by: Dude so hot <djohn@fbi.gov>

---------

Signed-off-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-12-29 07:50:16 +00:00
FooIbar 2f044a17e1 Fix crash when download label query takes too long 2024-12-26 17:56:20 +08:00
renovate[bot] 782dafca33 Lock file maintenance (#2040)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-23 02:02:28 +00:00
FooIbar 7174bbc0bd Clean up build script 2024-12-22 14:59:21 +08:00
renovate[bot] f177045e89 Update compose.destinations to v2.1.0-beta15 (#2038)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-22 04:42:37 +00:00
renovate[bot] e32d66e0aa Update dependency gradle to v8.12 (#2037)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-20 21:06:52 +00:00
renovate[bot] 0237aa31cb Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-android to v1.10.1 (#2036)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-20 16:23:04 +00:00
renovate[bot] 18921f8750 Update dependency com.android.tools:desugar_jdk_libs to v2.1.4 (#2035)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-20 10:57:58 +00:00
renovate[bot] e848360c80 Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-android to v1.10.0 (#2034)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-19 22:33:59 +00:00
FooIbar a075a7cba8 Make SpiderInfo optional 2024-12-19 21:06:49 +08:00
renovate[bot] f98630cff1 Update dependency io.ktor:ktor-client-okhttp to v3.0.3 (#2030)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-18 23:45:01 +00:00
FooIbar 325e756e4c Fix SpiderInfo serialization 2024-12-16 21:06:05 +08:00
renovate[bot] 556c623e98 Lock file maintenance (#2028)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-16 00:54:09 +00:00
FooIbar de5d74a1f0 Remove more java.io usage 2024-12-13 11:51:48 +08:00
renovate[bot] 41decf85c9 Update dependency com.google.accompanist:accompanist-drawablepainter to v0.37.0 (#2025)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-13 02:34:16 +00:00
renovate[bot] 51fa017b8b Update dependency sh.calvin.reorderable:reorderable to v2.4.2 (#2023)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-12 11:01:49 +00:00
renovate[bot] e78dd6f9dd Update dependency androidx.compose:compose-bom-alpha to v2024.12.01 (#2022)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-12 01:00:10 +00:00
renovate[bot] 0e8fcdd4d1 Update dependency androidx.paging:paging-compose to v3.3.5 (#2021)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-12 00:59:17 +00:00
renovate[bot] 717fc422ff Update benchmark to v1.4.0-alpha06 (#2019)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-11 22:05:33 +00:00
renovate[bot] b07c4b7e6c Update dependency androidx.activity:activity-compose to v1.10.0-rc01 (#2020)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-11 22:05:20 +00:00
renovate[bot] ff2b4cf6e1 Update androidx.room to v2.7.0-alpha12 (#2018)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-11 19:15:18 +00:00
renovate[bot] a131fa3dd7 Update androidx.lifecycle to v2.9.0-alpha08 (#2017)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-11 19:15:01 +00:00
FooIbar b3a212c7fd Match platform language resolution behavior
And add non-Compose accessor for Strings.
2024-12-11 00:06:07 +08:00
0e608d169e Migrate to lyricist, Part 1 (#2014)
* Initial convert xml to kotlin i10n res

* Composing take Translations

* Move HistoryScreen to lyricist

* Move FavouritesScreen to lyricist

* Fix naming

* Fixes

* Fixes

* Convert

* Convert

* Revert

* Fix

* Convert

* Convert

* Formats

* Cleanup

* Cleanup

* Cleanup

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Fixes

* Cleanup

* Cleanup

* Address Code Review

* Address Code Review

* Address Code Review

* Update app/src/main/kotlin/com/hippo/ehviewer/ui/i18n/ThTranslations.kt

Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>

* Update app/src/main/kotlin/com/hippo/ehviewer/ui/i18n/KoTranslations.kt

Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>

* Address Code Review

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-12-10 12:36:04 +00:00
renovate[bot] c38fa2a70f Drop useK2Uast (#2012)
Enabled by default
2024-12-09 10:46:26 +08:00
renovate[bot] 4c54c4653e Enable one pass resource shrinker 2024-12-09 10:38:29 +08:00
renovate[bot] 5ae5943cc8 Lock file maintenance (#2010)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-09 02:11:37 +00:00
renovate[bot] 857d367d15 Drop obsolete agp flags 2024-12-09 10:11:25 +08:00
renovate[bot]andDude so hot 8c766115db Refine EhTagDatabase & Cleanup java io usage
* Further kill some java io usage

* Further optimize TagDatabase update logic

* Further optimize TagDatabase

* Move some part from okio to kxio

* Address Code Review

* Fix to not reinit with current if inited

* Convert readLegacySpiderInfo to use kxio

* Refine

* Refine

* Refine

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-12-08 14:30:56 +00:00
FooIbar 7bd36dd274 Fix comment anchors handling and ripple on click 2024-12-08 12:14:15 +08:00
FooIbar bd246300e0 Revert "Kill Legacy TextView (#1786)"
This reverts commit 62927cb6

Reason for revert: Bad performance
2024-12-08 00:07:21 +08:00
renovate[bot] 31be546e8e Update dependency io.arrow-kt:arrow-stack to v2.0.0 (#2003)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-05 16:21:07 +00:00
FooIbar d57983032e Allow using RGB_565 on API < 26
And increase PageLoader cache size on API 26+
2024-12-06 00:13:50 +08:00
FooIbar 53b3190bbf Make image links in comments clickable 2024-12-04 20:53:00 +08:00
FooIbar d924237b7e Update thumbnail key in database on the fly 2024-12-04 20:42:21 +08:00
da29fc2f25 Handle multiple image format (#1988)
* Polymorphic copy_region

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Polymorphic qr_code

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Polymorphic detect_border

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Implement luminance conversion

* Implement RGB_565 and RGBA_F16 support

* Revert "Workaround for high bit depth images"

This reverts commit 12f46e2e4e.

* Add ptr_as_image

Signed-off-by: Dude so hot <djohn@fbi.gov>

* ptr_as_image_mut

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Refine poly

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Refine

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Use fake channel

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Cleanup

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Naming

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Refine

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Cleanup

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Refine

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Use typealias

Signed-off-by: Dude so hot <djohn@fbi.gov>

* just unwarp

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Cleanup

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Just unwarp

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Address code review

Signed-off-by: Dude so hot <djohn@fbi.gov>

---------

Signed-off-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-12-04 19:30:46 +08:00
renovate[bot] 3bbf195870 Update dependency io.ktor:ktor-client-okhttp to v3.0.2 (#1998)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-03 19:14:24 +00:00
renovate[bot] 75dac72640 Update dependency org.jsoup:jsoup to v1.18.3 (#1997)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-02 03:50:20 +00:00
renovate[bot] df9af9c35a Lock file maintenance (#1996)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-02 00:40:45 +00:00
FooIbar cccc8e829e Don't retry for some unrecoverable errors 2024-12-01 17:46:25 +08:00
FooIbar e0b1b18299 Support reverse physical key controls in reader 2024-12-01 17:46:13 +08:00
FooIbar 02d607817a Limit the scope of MIUI Cronet workaround
`ERROR_OTHER` is too generic and contains `ERR_CONTENT_LENGTH_MISMATCH`
2024-12-01 17:46:01 +08:00
FooIbar 8ae62e21a7 Clean up redundant v1 thumbnails 2024-12-01 17:45:47 +08:00
FooIbar 14a59262af Add missing .heic to supported file extensions 2024-12-01 13:10:10 +08:00
FooIbar 12f46e2e4e Workaround for high bit depth images 2024-12-01 13:09:47 +08:00
renovate[bot] dec2e6b69f Update dependency io.arrow-kt:arrow-stack to v2.0.0-rc.1 (#1987)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-29 11:25:41 +00:00
renovate[bot] e82327a979 Update dependency com.google.devtools.ksp to v2.1.0-1.0.29 (#1986)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-28 00:18:41 +00:00
renovate[bot] 81fb2ddcd1 Update dependency com.google.devtools.ksp to v2.1.0-1.0.28 (#1985)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-27 23:19:58 +00:00
renovate[bot] a8922cd0b2 Update Kotlin & KSP to v2.1.0 (#1984)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-27 13:31:21 +00:00
renovate[bot] 4f3ea48ec7 Update dependency org.jsoup:jsoup to v1.18.2 (#1982)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-27 05:11:59 +00:00
renovate[bot] 150265adf6 Update dependency io.coil-kt.coil3:coil-bom to v3.0.4 (#1981)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-26 09:35:14 +00:00
renovate[bot]andDude so hot aff627c0cd Implement standby behaviour (#1980)
* Implement standby behaviour

* Refine

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-26 09:28:27 +00:00
renovate[bot]andDude so hot 2b803d4193 Draggable Dialog Bubble (#1979)
* Draggable Dialog Bubble

* Cleanup

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-26 14:30:04 +08:00
renovate[bot]andDude so hot 464fa7c0c9 Pausable Tagger Dialog (#1978)
* DialogState center & top to allow non `AlertDialog` content

* Initial DialogContent w/o AlertDialog

* Animate DialogContent bubble

* Simplify

* Protect DialogState with MutatorMutex

* Refine animation

* Refine impl

* Refine impl

* Refine impl

* Refine impl

* Refine impl

* Cleanup

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-26 13:41:14 +08:00
FooIbar e9564b1d33 Don't use all caps for uploader names
Uploader names are in UTF-8, `uppercase` may result in unexpected values
 in some locales.
2024-11-25 23:43:54 +08:00
FooIbar c75929789d Show favorite name in HistoryScreen 2024-11-25 20:13:09 +08:00
renovate[bot] 63b7f47f30 Lock file maintenance (#1975)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-25 02:38:44 +00:00
FooIbar 5650e6ccfe Fix tagger back handler 2024-11-24 19:52:57 +08:00
a0d3706497 Refine TagDatabase Suggestions (#1973)
* Refine rawSuggestSequence

* Lift

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine naming

* Refine naming

* Update app/src/main/kotlin/com/hippo/ehviewer/client/EhTagDatabase.kt

Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-11-24 09:27:32 +00:00
FooIbar 0013ef42bd Fix crash when page URL's index is out of bound 2024-11-24 15:03:05 +08:00
Dude so hot 8da5f53856 Just override hue 2024-11-24 14:22:47 +08:00
renovate[bot]andDude so hot d0c150d419 Redesign Vote Status (#1970)
* Redesign Vote Status

* Revert "Redesign Vote Status"

This reverts commit 00295652f8eab9f91c1ef0ec1356e8eff838aaef.

* Redesign Vote Status

* Refine

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-24 05:57:45 +00:00
f52b828fe1 Refine Tagger Dialog (#1969)
* Refine Tagger Dialog

* Fix limit

* Suggestions use sequence

* Update app/src/main/kotlin/com/hippo/ehviewer/ui/tools/Dialog.kt

Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>

* Refine

* Refine

* Refine

* Naming

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-11-23 16:29:52 +00:00
8babadc33e Implement Tagger suggestion (#1968)
* Implement Tagger suggestion

* Refine suggestFlow impl

* Refine suggest

* Revert

* Refine display

* Refine

* Refine

* Refine

* Refine

* Update app/src/main/kotlin/com/hippo/ehviewer/client/EhTagDatabase.kt

Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>

* Refine

* Refine

* Refine

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-11-23 15:19:56 +00:00
7047de4959 Initial User Friendly Tag Inputer (#1966)
* Initial User Friendly Tag Inputer

* Address code review

* Update translation

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-11-23 10:52:30 +00:00
renovate[bot] 9b5e286b90 Update dependency io.arrow-kt:arrow-stack to v2.0.0-beta.3 (#1967)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-23 09:27:24 +00:00
renovate[bot]andDude so hot 99d98b6227 Support display tag vote status (#1965)
* Support parsing GalleryTag vote status

* Append utf-8 emoji vote status

* Refresh tag list after voting

* Refine to use substringAfter

* Fix implicitNulls

* Refine to use withDraw vote

* Recompose first

* Optimize Snackbar to be cancellable for freq action

* Fix GalleryDetail recompose jump

* Refine VoteStatus display

* Support parse WeakStatus Active

* Append instead

* Add switch

* Refine naming

* Fix fillInfo

* Drop correctly

* Refine

* Refine rememberInVM impl with key

* Be type safe

* Refine

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-23 07:44:23 +00:00
FooIbar 03a343784d Log Cronet errors before restarting app 2024-11-21 15:01:50 +08:00
Dude so hot 046350c0f9 Bump ArrowKt to 2.0.0-beta.2 2024-11-21 14:22:03 +08:00
renovate[bot] a1f267916e Update dependency gradle to v8.11.1 (#1959)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-20 21:46:50 +00:00
Dude so hot a4b0c1fe36 TightRope tolerant cancellation for 200ms 2024-11-20 21:49:55 +08:00
renovate[bot] 6aa0878480 Fix animated image (#1956)
* Fix animated image

* Update PagerItem.kt
2024-11-20 09:51:53 +00:00
FooIbar 897a56fa4a Fix rewrite GIF to actually match browser behavior 2024-11-20 14:51:38 +08:00
renovate[bot] 86a1e405b9 Update Kotlin & KSP 2024-11-20 08:18:33 +08:00
renovate[bot] e33fdaf74d Fix crossfade 2024-11-20 02:34:07 +08:00
renovate[bot]andDude so hot a554982f08 Refine MergeInterceptor to not cancel current job when awaiter exists (#1950)
* Refine MergeInterceptor to not cancel current job when awaiter exists

* Refine

* Cleanup abstraction

* Cleanup abstraction

* Refine

* Refine

* Fix MutableSharedFlow skip f when no awaiters

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-19 18:09:27 +00:00
renovate[bot]andDude so hot 553fa9245c Refine Thumb Preload Strategy (#1948)
* PrefetchAround for GalleryList

* Drop Preload Aggressively

* Refine

* Revert "Drop Preload Aggressively"

This reverts commit 0a8d5d083b509fb95c13c7674eca81f2770a92ab.

* Cleanup

* Fix

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-19 14:59:36 +08:00
renovate[bot]andDude so hot f862013c6a Prefetch around v2 preview image (#1947)
* Drop unused field in GalleryDetail

* Let GalleryPreview url prefetchDistance just be pageSize

* Prefetch around GalleryPreview image

* Optimize

* Optimize

* Refine semantics

* Perform decode for +-20 prefetch

* Refine

* Refine

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-19 05:50:20 +00:00
renovate[bot]andDude so hot 7dd87c1ff6 Workaround to not invalidate shared element modifier chain (#1944)
* Try to fix SET

* Drop check

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-18 21:58:45 +08:00
renovate[bot] 900da46090 Lock file maintenance (#1943)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-18 01:45:10 +00:00
Dude so hot 7d54b78521 ColorFilterSetting use RollingNumber 2024-11-17 18:59:14 +08:00
Dude so hot ccc7d467c2 Refine RollingNumber to animate negative when fixed length 2024-11-17 18:59:14 +08:00
FooIbar 8b6c358266 Avoid consuming click event if the image is loaded 2024-11-16 18:53:50 +08:00
renovate[bot] 444388e432 Update dependency io.coil-kt.coil3:coil-bom to v3.0.3 2024-11-16 14:28:24 +08:00
FooIbar b4c00d866c Play safe 2024-11-16 14:21:52 +08:00
Dude so hot b9606fcb49 Fix image jumping 2024-11-14 23:18:55 +08:00
Dude so hot ab6dfa0f08 Fix image recycle racing 2024-11-14 23:02:49 +08:00
FooIbar 81ee3c47f5 Fix reading UTF-8 flagged ZIP archives on API < 26 2024-11-14 21:36:03 +08:00
renovate[bot] 7a59f821cf Update dependency me.saket.telephoto:zoomable to v0.14.0 (#1933)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-14 11:30:50 +00:00
renovate[bot]andDude so hot 6f7276bcdf Revert "Temporarily disable shared element transitions (#1621)" (#1932)
* Revert "Temporarily disable shared element transitions (#1621)"

This reverts commit 42ed51094e.

* Fixes

* Update EhAsyncThumb.kt

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-14 19:24:11 +08:00
renovate[bot]andDude so hot 2cd884bd9d Hack zip_time to fix performance (#1931)
* Hack zip_time to fix performance

* Revert

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-14 06:33:13 +00:00
renovate[bot] 40f4554373 Update dependency androidx.compose:compose-bom-alpha to v2024.11.00 (#1930)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-14 03:12:22 +00:00
renovate[bot] 76321d3491 Update dependency androidx.activity:activity-compose to v1.10.0-beta01 (#1928)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-13 22:29:30 +00:00
renovate[bot] c3b5db18a7 Update dependency androidx.paging:paging-compose to v3.3.4 (#1929)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-13 22:28:56 +00:00
renovate[bot] 71afc90b0e Update androidx.lifecycle to v2.9.0-alpha07 (#1926)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-13 20:05:49 +00:00
renovate[bot] c03d08b9f4 Update benchmark to v1.4.0-alpha05 (#1927)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-13 20:05:34 +00:00
renovate[bot] b9d8931f3e Update dependency chrome to v131 (#1925)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-12 19:59:48 +00:00
renovate[bot]andDude so hot ec8bd2fc14 Add rust parser test (#1924)
* Add rust parser test

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Update cargo lock

Signed-off-by: Dude so hot <djohn@fbi.gov>

---------

Signed-off-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-12 08:31:49 +00:00
renovate[bot]andDude so hot dd1bbf1226 Ensure PageLoader not closed until decoder jobs completed (#1923)
* Optimize to use autoCloseScope

* Refine log

* Log

* Remove debug logging

* Refine

* Refine

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-12 12:15:29 +08:00
renovate[bot] c2c86ff58e Update dependency gradle to v8.11 (#1922)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-11 17:02:39 +00:00
FooIbar 2d2840c1bb Prepare for next iteration 2024-11-11 21:14:59 +08:00
FooIbar 571969fca9 Prepare for release 1.13.1 2024-11-11 21:14:29 +08:00
FooIbar 16fa52790c Misc cleanups (#1921)
* Clean up resources

* Clean up code
2024-11-11 20:39:45 +08:00
FooIbar c88c252587 Update README (#1920)
[no ci]
2024-11-11 17:19:43 +08:00
FooIbar 253cb03de8 Refine AndroidFileSystem exception handling 2024-11-11 17:19:17 +08:00
renovate[bot] 0b74adc13b Lock file maintenance (#1917)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-11 01:17:16 +00:00
FooIbar 6fc2328475 Fix false positive download failures on API 28 2024-11-11 00:52:12 +08:00
renovate[bot] e9c4201acc Update dependency io.coil-kt.coil3:coil-bom to v3.0.2 (#1912)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-10 04:10:41 +00:00
FooIbar 9edb52c909 Remove desktop site option 2024-11-10 00:21:53 +08:00
FooIbar f4c7320bb5 Remove search cover feature due to upstream change 2024-11-09 22:54:07 +08:00
FooIbar 17581ca204 Use desktop User-Agent by default
Since WebP resamples have smaller file size.
2024-11-09 20:56:14 +08:00
FooIbar 11edb8ce5d Error out on cover search for V2 galleries 2024-11-09 20:35:09 +08:00
FooIbar 40caa7b1eb Prefer to get page tokens from MPV 2024-11-09 19:44:12 +08:00
FooIbar e3f4c24983 Extend update download request timeout 2024-11-09 13:59:35 +08:00
renovate[bot]andDude so hot dd0482cb26 Allow ExchangeSite on Http 500 (#1905)
* Allow ExchangeSite on Http 500

* Fixup

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-09 13:38:23 +08:00
FooIbar 4052007de8 Implement retry on click for thumbnails 2024-11-09 11:27:10 +08:00
FooIbar 85b03d9d8a Propagate errors from writeComicInfo to callers 2024-11-08 16:06:55 +08:00
renovate[bot] 36c3fd6f5d Update dependency com.google.devtools.ksp to v2.1.0-RC-1.0.27 (#1902)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-08 07:15:42 +00:00
renovate[bot] d397a5d35e Update dependency com.android.tools:desugar_jdk_libs to v2.1.3 2024-11-07 09:59:04 +00:00
renovate[bot] 43d83ad919 Update dependency io.coil-kt.coil3:coil-bom to v3.0.1 2024-11-07 09:58:36 +00:00
FooIbar e71dd1d576 Improve scrollbar a11y 2024-11-06 23:44:48 +08:00
renovate[bot] 72e28b8e04 Update dependency com.google.devtools.ksp to v2.1.0-RC-1.0.26 2024-11-05 20:05:19 +00:00
renovate[bot] 3432a15c62 Update dependency io.github.pdvrieze.xmlutil:serialization to v0.90.3 2024-11-05 09:46:27 +00:00
renovate[bot]andDude so hot 45a5bae8b2 Group rust ffi code (#1893)
* Group rust ffi code

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Fix

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Fix

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Refine

Signed-off-by: Dude so hot <djohn@fbi.gov>

---------

Signed-off-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-05 09:39:03 +00:00
a566393a89 Optimize to use decode buffer pool (#1890)
* Optimize to use decode buffer poll

* Drop unnecessary logging

* Refine

* Update app/src/main/cpp/archive.c

Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-11-05 05:01:15 +00:00
renovate[bot] 5f2f3f9122 Update dependency io.coil-kt.coil3:coil-bom to v3.0.0 2024-11-04 22:53:10 +00:00
renovate[bot] c7fccf7e70 Update Kotlin & KSP to v2.1.0-RC 2024-11-04 20:24:35 +00:00
FooIbar 3d92d061f1 Fix archive size check 2024-11-04 21:15:07 +08:00
Dude so hot f2759675a1 Optimize to not allocate anon mapping when fully zero copy 2024-11-04 21:12:45 +08:00
Dude so hot 2e6ff78662 Fast fix for operator precedence 2024-11-04 20:57:10 +08:00
renovate[bot]andDude so hot 8ca0a32932 Cleanup to not handle memory allocation failure (#1882)
* Cleanup to not handle memory allocation failure

* Handle open failed on first open

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-04 12:06:38 +00:00
FooIbar 72fbcd4e0e Refine Cronet workaround 2024-11-04 18:43:16 +08:00
a5719a9c1d Optimize zero copy case to not iter over entries (#1879)
* Optimie zero copy case to not iter over entries

* Update app/src/main/cpp/archive.c

Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-11-04 09:03:41 +00:00
Re*Index. (ot_inc) bad41d5027 Change funds text (#1878)
* Fix Japanese

* Change Funds text
2024-11-04 08:49:11 +00:00
renovate[bot] 3bfb95f190 Lock file maintenance 2024-11-04 00:09:54 +00:00
renovate[bot]andDude so hot f04695feb6 Refresh Avatar Url when load failed (#1873)
* Refresh Avatar Url when load failed

* Check 404

* Refine

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-03 15:17:50 +00:00
renovate[bot]andDude so hot 94da911f93 Fix DrawerContent ColorScheme
* Fix listItemOnDrawerColor()

* Fix topBarOnDrawerColor

* Refine location

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-11-02 04:51:06 +00:00
Re*Index. (ot_inc) f4771d4ddb Fix Japanese 2024-11-02 11:06:44 +08:00
Re*Index. (ot_inc) 9f7c4adb0f Make Japanese README & Fix Japanese (#1867)
* Update Japanese

* Add Japanese README

* Update ja-jp.md

* Update ja-jp.md

* Update ja-jp.md

* Update ja-jp.md

* Update ja-jp.md

* Update ja-jp.md

* fix text & suffix.

* Update ja.md

* Update ja.md

* Update ja.md

* Update ja.md

* Add Minimum Android Version text
2024-11-01 23:41:58 +08:00
FooIbar 6fb20fc6c1 [no ci] Update README 2024-11-01 21:55:55 +08:00
FooIbar ce8e91aab8 Prepare for next iteration 2024-11-01 21:03:47 +08:00
FooIbar fe4ab6fdab Prepare for release 1.13.0 2024-11-01 21:03:04 +08:00
FooIbar e60b6922c3 Prevent coil from adding cache-control headers
ConnectivityChecker is not reliable when used with VPN on old platforms.
2024-11-01 19:23:14 +08:00
Re*Index. (ot_inc) d3d2c907ad Update & Fix Japanese strings 2024-11-01 17:03:25 +08:00
FooIbar 84306e0b28 Use shallow clone to fetch git dependencies 2024-11-01 12:44:47 +08:00
FooIbar f7c2148d5f Update description of "view original image" 2024-11-01 12:05:40 +08:00
FooIbar 46e5a0e121 Update renovate config 2024-11-01 11:39:34 +08:00
renovate[bot] 2f5b52f12c Update AGP to v8.8.0-alpha09 2024-10-31 22:58:11 +00:00
renovate[bot] 20f9120583 Update plugin com.android.settings to v8.8.0-alpha09 2024-10-31 22:55:48 +00:00
FooIbar e65428cae1 Use SecureTextField for password 2024-10-31 23:51:26 +08:00
Dude so hot e5862e807c Fix to not add padding manually 2024-10-31 23:08:53 +08:00
Dude so hot 911fb3cae0 Update to use bracketCase 2024-10-31 22:17:45 +08:00
d76821f6a6 Unify decode phase to PageLoader (#1848)
* Make PageLoader size RAII

* Unify decode phase to PageLoader

* Fixes

* Fixes

* Fixes

* Refine

* Refine name

* Fixes

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Revert

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Invalidate page cache on retryPage

* Value class

* Cancel bounds takes IntRange

* SpiderQueen awaitReade spread exception

* Reorder

* Fix

* Fix

* Refine

* Split install procress

* Interface default method

* Revert

* Revert

* Fix to clear error state

* Update app/src/main/kotlin/com/hippo/ehviewer/gallery/PageLoader.kt

Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>

* Refine

* Refine

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-10-31 12:30:52 +00:00
renovate[bot] 1d5a680a5b Update dependency androidx.work:work-runtime to v2.10.0 2024-10-31 01:19:56 +00:00
renovate[bot] 2f38e17fd6 Update dependency androidx.core:core-ktx to v1.15.0 2024-10-31 01:19:11 +00:00
renovate[bot] 7de4bea5f7 Update dependency androidx.constraintlayout:constraintlayout-compose to v1.1.0 2024-10-31 00:30:00 +00:00
renovate[bot] 35db8baa2a Update dependency androidx.compose:compose-bom-alpha to v2024.10.01 2024-10-31 00:29:50 +00:00
renovate[bot] e774dd3a6c Update benchmark to v1.4.0-alpha04 2024-10-30 21:13:16 +00:00
renovate[bot] f3619c6b43 Update dependency androidx.activity:activity-compose to v1.10.0-alpha03 2024-10-30 21:12:43 +00:00
renovate[bot] b807081f9d Update androidx.room to v2.7.0-alpha11 2024-10-30 19:03:46 +00:00
renovate[bot] 0807d7f1ce Update androidx.lifecycle to v2.9.0-alpha06 2024-10-30 19:03:18 +00:00
FooIbar 8b6894716b Remove fixed ktor workaround 2024-10-30 23:21:00 +08:00
Dude so hot cb733d8e38 Move ktlint to stable 2024-10-30 23:11:19 +08:00
FooIbar d9c7daebea Fix save image filename for external archives 2024-10-30 23:00:34 +08:00
FooIbar bbe8fd6b8f Use .editorconfig to disable ktlint rule (#1844) 2024-10-30 13:58:53 +00:00
Dude so hot 8f8fe513fa Cleanup ctor 2024-10-30 20:30:53 +08:00
Dude so hot 8a4df1f2ba Disable ktlint_standard_class-signature 2024-10-30 20:30:53 +08:00
Dude so hot dacbf5edb3 Fix thumb extension for webp 2024-10-30 19:08:52 +08:00
Dude so hot 4e145f46db Demagic DownloadThumbInterceptor 2024-10-30 19:08:52 +08:00
renovate[bot] 53dc622376 Update dependency io.ktor:ktor-client-okhttp to v3.0.1 2024-10-29 23:37:20 +00:00
renovate[bot] aab8fabb1f Disable SaveBodyPlugin & fix non-redirect Ktor client defaults 2024-10-29 16:21:19 +00:00
FooIbar 86bb240633 Disable Cronet on some incompatible devices 2024-10-29 23:41:40 +08:00
Dude so hot c6b3aec1af Fix build 2024-10-29 23:35:59 +08:00
Dude so hot e6c4b32a47 Use defaultRequest 2024-10-29 23:35:59 +08:00
Dude so hot b71e83047d Install UA for ktor client 2024-10-29 23:35:59 +08:00
Dude so hot 8609336240 Move to use BlackholeDecoder.Factory() 2024-10-29 23:35:59 +08:00
FooIbar ded11a81a5 Refine cache key for v2 gallery preview 2024-10-29 21:17:45 +08:00
renovate[bot]andDude so hot 0c00ea9292 Refactor PageLoader (#1830)
* Cleanup PageLoader

* Refactor ReaderScreen

* Refactor EhPageLoader

* Refine

* Refine

* Refine

* Refine

* Refine

* Don't inline

* Fix recompose

* Merge PageLoader

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-10-29 08:10:52 +00:00
FooIbar 672b53d8a9 Migrate to settings plugin and update NDK to r27c 2024-10-29 15:27:08 +08:00
FooIbar bc5032b2d0 Fix off-screen fetcher jobs blocking decode queue 2024-10-29 06:56:24 +08:00
renovate[bot] 4cefa439ec Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-rc02 2024-10-28 21:26:43 +00:00
FooIbar 4d2b7b3ad0 Adapt to the upcoming thumbnail changes (#1823) 2024-10-28 22:55:27 +08:00
FooIbar 58f85cc436 Clean up or parameter as it's no longer required 2024-10-28 20:14:52 +08:00
FooIbar 5c50d7622b Unify normal and small thumbnails parsing 2024-10-28 20:14:52 +08:00
renovate[bot] e90b31bf69 Update Rust crate quick-xml to 0.37 2024-10-28 00:48:23 +00:00
renovate[bot] b43d60138b Lock file maintenance 2024-10-28 00:47:49 +00:00
FooIbar 9f4faebfe6 Use ktor plugin for download timeout 2024-10-28 00:00:48 +08:00
FooIbar b6f84d8de6 Group ad utils and fix a main thread IO 2024-10-27 22:58:15 +08:00
FooIbar 230eec7c59 Revert "Block AD in Large preview (#1694)"
This reverts commit 04ee1a63

Reason for revert: Obsoleted by the upcoming changes
2024-10-27 22:58:15 +08:00
renovate[bot]andDude so hot 3b9cfefd5f Fix Small Preview CrossFade not work (#1816)
* Fix Small Preview CrossFade not work

* Abstract

* Update MergeInterceptor.kt

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-10-27 12:01:53 +00:00
FooIbar c1b701f1f9 Only check file integrity for images served by H@H
URLs returned by non-H@H servers may not contain file hash for resampled
images.
2024-10-27 16:10:47 +08:00
FooIbar 4744caaacc Show search warnings (if any) when no hits found 2024-10-27 15:48:46 +08:00
FooIbar b58912462a Make image limits description unambiguous 2024-10-27 12:36:56 +08:00
FooIbar f3cadf594d Fix crash on devices without WallpaperService 2024-10-27 11:30:37 +08:00
FooIbar a8834ee21c Fix menu click glitch after pager type change 2024-10-26 22:18:52 +08:00
FooIbar 0c59403e49 Add support for arrow key navigation (#1808)
* Add support for arrow key navigation

* Refactor key event handler to use Compose KeyEvent

Also removed volume key configurations.

* Fix focus requester
2024-10-26 12:54:29 +00:00
FooIbar 431a771672 Relax regex for the upcoming WebP adoption 2024-10-26 13:54:16 +08:00
Dude so hot b043b06208 Refine TagNamespace 2024-10-26 10:45:23 +08:00
renovate[bot] abccf713df Update AGP to v8.8.0-alpha08 2024-10-25 19:21:42 +00:00
renovate[bot] 4b83f6f28f Update dependency com.google.devtools.ksp to v2.1.0-Beta2-1.0.26 2024-10-25 19:19:06 +00:00
renovate[bot]andDude so hot e843a547a5 Make GalleryTagGroup immutable & non-empty (#1798)
* Make GalleryTagGroup immutable & non-empty

* Refine

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-10-25 15:18:12 +00:00
小白-白 40d9bfa30b Fix thumb parsing when labels are enabled 2024-10-25 22:00:53 +08:00
小白-白 69669f0a50 Fix archive download 2024-10-25 21:04:00 +08:00
Dude so hot 4c20d27d33 Optimize regex with Chatgpt 2024-10-25 18:34:00 +08:00
小白-白 06eb277b34 Fix preview parser 2024-10-25 16:18:52 +08:00
renovate[bot] 86120277c7 Update dependency androidx.work:work-runtime to v2.10.0-rc01 2024-10-24 18:16:09 +00:00
renovate[bot]andDude so hot 62927cb6a8 Kill Legacy TextView (#1786)
* Kill Legacy TextView

* Fix textStyle

* Fix color

* Add breakToTextAndUrl

* Impl breakToTextAndUrl

* Fix OOB

* Update GalleryCommentsScreen.kt

* Fix bug

* Fix color

* Refine regex

* Add undeline as well

* Refine

* Revert

* Don't break if not show image

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-10-24 23:38:27 +08:00
renovate[bot]andDude so hot 22f31f2ebc Remember pageloader in ViewModel (#1780)
* Remember pageloader in ViewModel

* Fix hang on

* Refine

* Move ***InVM functions to ViewModelState

* Add rememberInVM overload takes no key

* Support asyncInVM & launchInVM with key

* Move UNCHECKED_CAST code

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-10-23 21:57:28 +08:00
FooIbar c8cfaeecf6 Clean up java.nio APIs usage to avoid desugaring 2024-10-23 18:03:45 +08:00
FooIbar 714d334067 Misc cleanup 2024-10-23 15:20:43 +08:00
FooIbar ca324995b3 Clean up ExceptionUtils with Either.catch 2024-10-23 15:20:43 +08:00
FooIbar f301eab5b1 Fix preview list not recomposing on detail refresh 2024-10-23 11:27:04 +08:00
FooIbar 87ac60a3ab Clean up GalleryListUrlParser/Builder 2024-10-22 22:52:36 +08:00
FooIbar a2f89f07fa Use e-hentai thumbnail server by default 2024-10-22 21:40:21 +08:00
renovate[bot]andDude so hot 57d7d2b798 Kill Switch (#1778)
* Kill Switch

* Refine comment

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-10-21 13:32:01 +00:00
Dude so hot 6f3bc25b64 Don't apply NonCancellable to H@H large images 2024-10-21 20:54:37 +08:00
Dude so hot 62477dac87 Fix NamedSemaphore naming 2024-10-21 20:54:37 +08:00
Dude so hot 0dfee513f4 Lock concurrency for Normal previews as well 2024-10-21 20:54:37 +08:00
Dude so hot 31f97cb840 Introduce NamedSemaphore 2024-10-21 20:54:37 +08:00
Dude so hot 93e2d36dbb Share semaphore 2024-10-21 20:54:37 +08:00
Dude so hot aed3d08167 Fetch from h1 server is NonCancellable 2024-10-21 20:54:37 +08:00
Dude so hot 9c5f11dd9d Fix step 2024-10-21 20:54:37 +08:00
Dude so hot 1af7aa8a16 Allow configure thumb concurrency temporarily 2024-10-21 20:54:37 +08:00
Dude so hot cf6f793478 Limit thumb fetcher concurrency 2024-10-21 20:54:37 +08:00
Dude so hot 145948f506 Add HttpClientConfig<T>.configureCommon 2024-10-21 20:54:37 +08:00
FooIbar b068492d10 Refine caching configuration in CI 2024-10-21 12:13:03 +08:00
renovate[bot] 8c94d39ae4 Lock file maintenance 2024-10-21 01:43:19 +00:00
Dude so hot c584d72f41 Rotate hue ourselves 2024-10-20 22:31:16 +08:00
Dude so hot cfd248f818 Support WallPaper DynamicColor on O_MR1 above 2024-10-20 22:31:16 +08:00
Dude so hot b9e59ee2f8 Harmonize with Kolor functions 2024-10-20 22:31:16 +08:00
Dude so hot 439899fbdc Use Expressive MotionScheme 2024-10-20 22:31:16 +08:00
Dude so hot 177c1889fa Import material-kolor 2024-10-20 22:31:16 +08:00
FooIbar ebce847724 Update OkHttp and configure async DNS 2024-10-20 19:32:26 +08:00
renovate[bot]andDude so hot c6b6d9a310 Fallback to Okhttp instead (#1771)
* Fallback to Okhttp instead

* Drop unused proguard

* Exclude okhttp3 public suffix

* Refine

* Refine

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-10-20 09:21:14 +00:00
Dude so hot 6601a45472 GP divide by 1k 2024-10-19 22:53:37 +08:00
Dude so hot d66fb9a783 RollingNumber support separator 2024-10-19 22:53:37 +08:00
Dude so hot c244369875 Apply RollingNumber to quota 2024-10-19 22:53:37 +08:00
Dude so hot f9c812864e Apply RollingNumber to gp & c 2024-10-19 22:53:37 +08:00
Dude so hot 87d0cdd9e5 Fix to measure RollingNumber with +inf maxHeight 2024-10-19 22:53:37 +08:00
Dude so hot d237a18aae Refine Naming 2024-10-19 21:36:40 +08:00
Dude so hot 0159cf30ae NamedMutex shares MutexPool 2024-10-19 21:36:40 +08:00
Dude so hot 6aba1670ec Refine NamedMutex 2024-10-19 21:36:40 +08:00
Dude so hot 447a31ea00 Restore default MaxConnPerRoute 2024-10-19 21:36:40 +08:00
FooIbar 9e410a61ef Pin Rust toolchain version to 1.81.0
1.82.0 has a severe binary size regression (+36%)
2024-10-19 21:27:34 +08:00
FooIbar 4588b7eaa5 Refine resources packing options 2024-10-19 15:23:24 +08:00
FooIbar aef55c9207 Use Cargo.lock for reproducible builds 2024-10-19 15:23:24 +08:00
renovate[bot] 9a587e9dd2 Update plugin composeCompilerReportGenerator to v1.4.1 2024-10-19 06:40:15 +00:00
renovate[bot] cbe834c71d Update Kotlin & KSP 2024-10-19 08:46:37 +08:00
FooIbar 020495cebf Fix comparison with leading zeros and clean up 2024-10-19 00:31:38 +08:00
FooIbar 54d3cccb67 Fix AnchoredDraggable fling behavior 2024-10-19 00:29:47 +08:00
renovate[bot] b4adf57f39 Update compose.destinations to v2.1.0-beta14 2024-10-18 13:34:21 +00:00
b796dbcde3 Partially Reland "Use Apache5 as fallback HTTP engine" (#1755)
* Use Apache5 as fallback HTTP engine

* Fix R8

* Depolymorphism CronetEngine context

* Conditionally insert conscrypt

* Limit IO thread cnt to 1

* Don't package compose destination as well

* Refine

* Add an option for debugging HTTP engines

---------

Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-10-18 10:18:46 +00:00
FooIbar ba2c69690f Revert "Use Apache5 as fallback HTTP engine (#1752)"
This reverts commit c3b60f1eac.
2024-10-18 16:16:36 +08:00
FooIbarandDude so hot c3b60f1eac Use Apache5 as fallback HTTP engine (#1752)
* Use Apache5 as fallback HTTP engine

* Fix R8

* Depolymorphism CronetEngine context

* Drop Conscrypt, don't enforce anything

* Limit to 1 io thread count

* Fix H2 support below A10

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-10-18 15:57:42 +08:00
renovate[bot] 2bb387eeaf Update AGP to v8.8.0-alpha07 2024-10-17 22:50:11 +00:00
FooIbar fd67c733aa Always upload R8 reports 2024-10-18 00:17:44 +08:00
renovate[bot]andDude so hot eac7048360 Optimise non-fixed length RollingNumber (#1751)
* Try Optimise non-fixed length RollingNumber

* Apply RollingNumber to SliderPref

* Revert Debug

* RollingNumber handle negative value

* Fix typo

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-10-17 21:54:20 +08:00
renovate[bot]andDude so hot 34de943c9f Introduce RollingNumberPlaceholder (#1750)
* Introduce RollingNumberPlaceholder, sync page index double end style

* Cleanup

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-10-17 19:27:41 +08:00
renovate[bot] 302b43c9e8 Update dependency sh.calvin.reorderable:reorderable to v2.4.0 2024-10-17 09:02:20 +00:00
FooIbar 07b3917c4e Best effort for devices without DocumentsUI 2024-10-17 16:55:44 +08:00
FooIbar 1ace248121 Allow resetting to default download location 2024-10-17 16:55:44 +08:00
renovate[bot]andDude so hot 7a96feb049 Rolling number POC, convert page index (#1740)
* Rolling number POC, convert page index

* Refine

* Improve

* Comments

* Refine Comments

* Bigger number is from top

* Prepare to make content moveable

* Make content index reversed

* Use moveableContentOf

* Increase interval

* Fix calculation

* Fix calculation again

* Extract

* Refine

* Use zero-sized placeholder

* Fix width

* Allow RollingNumber have fixed width

* Improve comments

* Make moveableContent initialized lazily

* Reverse direction

* Avoid movableContentOf if width fixed

* Use Arrangement.spacedBy

* Improve animation

* Refine

* Fix comment

* Fix padding

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-10-17 06:07:49 +00:00
renovate[bot]andrenovate[bot] 5df1d099a1 Update dependency androidx.compose:compose-bom-alpha to v2024.10.00 (#1746)
* Update dependency androidx.compose:compose-bom-alpha to v2024.10.00

* Update Theme.k

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <99822064+revonateB0T@users.noreply.github.com>
2024-10-17 00:30:48 +00:00
renovate[bot] ed2db49cdb Update dependency androidx.core:core-ktx to v1.15.0-rc01 2024-10-17 00:23:24 +00:00
renovate[bot] 7b2c99357e Update androidx.lifecycle to v2.9.0-alpha05 2024-10-17 00:16:37 +00:00
renovate[bot] 4868c40795 Update androidx.room to v2.7.0-alpha10 2024-10-17 00:16:10 +00:00
renovate[bot]andrenovate[bot] 27ff17db50 Update benchmark to v1.4.0-alpha03 (#1743)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <99822064+revonateB0T@users.noreply.github.com>
2024-10-17 00:15:47 +00:00
renovate[bot] c15a52eb2a Update dependency androidx.constraintlayout:constraintlayout-compose to v1.1.0-rc01 2024-10-16 23:56:52 +00:00
FooIbar faa54dedb1 Migrate to BTF2
This reverts commit 8a29d46b
2024-10-16 11:14:54 +08:00
renovate[bot] 59bdb4b2f0 Update dependency io.github.pdvrieze.xmlutil:serialization to v0.90.2 2024-10-15 20:23:09 +00:00
renovate[bot] 4990d757ae Update dependency chrome to v130 2024-10-15 20:22:40 +00:00
FooIbar 5f71c3dcb4 Update Compose Material3 to 1.4 2024-10-15 23:58:56 +08:00
Dude so hot 1892a750b7 Address Code Review 2024-10-15 21:15:38 +08:00
Dude so hot 020f853bb1 MergeInterceptor use NamedMutex 2024-10-15 21:15:38 +08:00
Dude so hot 9ccddae60a Introduce Better NamedMutex 2024-10-15 21:15:38 +08:00
Dude so hot b7a2d93f03 Optimize rememberInVM allocation 2024-10-15 19:08:12 +08:00
Dude so hot 2fc8b421b0 Optimize collection access 2024-10-15 19:08:12 +08:00
Dude so hot 180466674f Optimize statesMap to use mutableIntObjectMapOf 2024-10-15 19:08:12 +08:00
Dude so hot ac23a4312d Address CR 2024-10-15 19:08:12 +08:00
Dude so hot aaea83b932 Minor cleanup GalleryDetailScreen 2024-10-15 19:08:12 +08:00
Dude so hot 8425ea0b2f Move SpiderDen file cache to use rwlock 2024-10-15 19:08:12 +08:00
Dude so hot 100a6569b7 Use rwlock 2024-10-15 13:40:02 +08:00
Dude so hot e8c4b9ab78 Ensure PageLoader cache sync 2024-10-15 13:03:18 +08:00
Dude so hot eff5467ccf Cleanup CrashHandler 2024-10-15 13:03:18 +08:00
Dude so hot 769308c9f0 Remove obsolete 2024-10-15 13:03:18 +08:00
Dude so hot e1de57c98c Ensure QrCodeInterceptor cache thread-safe 2024-10-15 13:03:18 +08:00
Dude so hot 9c6a5af87e Ensure FavouriteStatusRouter thread-safe 2024-10-15 13:03:18 +08:00
Dude so hot 9d88577108 Move to SieveCache 2024-10-15 13:03:18 +08:00
renovate[bot]andrenovate[bot] dbebc5956f Update AGP to v8.8.0-alpha06 (#1728)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <99822064+revonateB0T@users.noreply.github.com>
2024-10-15 02:30:35 +00:00
renovate[bot]andDude so hot 52ca5a7eb8 SpotlessAPply (#1729)
Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-10-15 02:19:56 +00:00
FooIbar 78b898dc5c Reduce build noise 2024-10-14 20:48:13 +08:00
Dude so hot 1e81157d5c Update VectorPainterCache to use MutableScatterMap 2024-10-14 13:27:49 +08:00
Dude so hot 5cff3db9b5 Drop unused local variable 2024-10-14 13:27:49 +08:00
Dude so hot 25fe80f252 Drop DismissDialogScope wrapper 2024-10-14 13:27:49 +08:00
Dude so hot 413bb2cd82 No longer need write permission as we copy magnet now 2024-10-14 13:27:49 +08:00
renovate[bot] b867bbc7a6 Lock file maintenance 2024-10-14 03:23:13 +00:00
Dude so hot 3bf6f763aa Optimise DialogState with value class 2024-10-13 20:48:24 +08:00
2c0d621b16 Add avatar (#1720)
* Load Avatar

* Click Avatar to show image limit

* Shared Limit among collection

* Cleanup and configure heartbeat

* Always refresh avatars

* Refine icons

* Avoid heartbeat

* Fix mistake

* No need to SharingStarted.WhileSubscribed

* Address code review

* Simply map error msg

* Convert limitFlow to stateFlow

* Fixes

* Refine retry logic

* Don't retry automatically

* Don't cache error result

* Animate quota changes

* Logout from guest mode via avatar

* No need to navigate explicitly as needSignIn is observed

* Make PostLogin not suspend

* More UX friendly

* Fix progressIndicator not disappear

* Use Either.catch.mapLeft

* Refine

* Add overload for awaitConfirmationOrCancel

* Log error with snackbar

* Refine

* Fix to use collectLatest

* Refine

* Refine

* Address cr

* Refine

* Animated loading

* Refine

* Fix

* Fix

* Refine image limits dialog

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-10-13 19:36:02 +08:00
renovate[bot] e930ebf42f Update dependency libarchive to v3.7.7 2024-10-13 10:41:48 +00:00
Dude so hot 4e3862b1c5 Move ImageSearchScreen 2024-10-12 21:21:14 +08:00
Dude so hot e3ffb9a473 Spilt ImageSearch from GalleryListScreen 2024-10-12 21:21:14 +08:00
FooIbar e485d79bb1 Drop torrent download in favor of magnet links 2024-10-12 15:26:37 +08:00
renovate[bot] 49edbb8185 Update compose.destinations to v2.1.0-beta13 2024-10-10 13:58:06 +00:00
renovate[bot] 32f7407752 Update dependency io.ktor:ktor-client-core to v3.0.0 2024-10-09 17:15:48 +00:00
renovate[bot]andFooIbar aef02d34a5 Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-rc01 (#1713)
* Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-rc01

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-10-08 11:24:43 +00:00
renovate[bot] bb2f9bb309 Lock file maintenance 2024-10-07 07:48:01 +00:00
FooIbar 140b6528a6 Fix ktlint snapshot 2024-10-07 15:40:23 +08:00
FooIbar fa3cf650ea Pin Compose Material3 version to 1.3 2024-10-05 16:11:48 +08:00
renovate[bot] cfe2cff74c Update AGP to v8.8.0-alpha05 2024-10-03 22:08:36 +00:00
renovate[bot] 1def52e41a Update dependency androidx.compose:compose-bom-alpha to v2024.09.03 2024-10-03 19:18:58 +00:00
renovate[bot] cc4eab3244 Update dependency io.ktor:ktor-client-core to v3.0.0-rc-2 2024-10-03 09:08:35 +00:00
renovate[bot] 4327e48c1f Update dependency androidx.profileinstaller:profileinstaller to v1.4.1 2024-10-03 00:25:35 +00:00
renovate[bot] c8c077c14b Update dependency androidx.work:work-runtime to v2.10.0-beta01 2024-10-03 00:25:19 +00:00
renovate[bot] f82221552b Update benchmark to v1.4.0-alpha02 2024-10-02 21:08:39 +00:00
renovate[bot] bfe0aad951 Update dependency androidx.core:core-ktx to v1.15.0-beta01 2024-10-02 21:08:05 +00:00
renovate[bot] 2f5d8edb03 Update androidx.lifecycle to v2.9.0-alpha04 2024-10-02 19:09:56 +00:00
renovate[bot] ac0acafff9 Update androidx.room to v2.7.0-alpha09 2024-10-02 19:09:27 +00:00
renovate[bot] 9333150c3b Update dependency liblzma to v5.6.3 2024-10-01 18:41:54 +00:00
renovate[bot] 0c71c6856b Update dependency chrome to v129 2024-10-01 05:59:07 +00:00
FooIbar 6a47a8a1e1 Use renovate to update Chrome version 2024-10-01 13:51:58 +08:00
renovate[bot]andDude so hot 04ee1a6362 Block AD in Large preview (#1694)
* Cleanup with `getOrPut`

* Refine `ArchivePageLoader` naming

* Move `PageLoader`

* Bump ktlint to fix when guards

* Extract `AdsPlaceholder`

* Detect QrCode for LargePreview

* Conditional detect

* Fixes

* Fixes

* Cleanup code

* Fix render

* Fixup hardware bitmap

* Original size to detect

* Log QrCode detect exception

* Don't mutate cached

* Refine ListUrlBuilder

* Move functions

* Enable preview adblocker for debug build only

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-09-30 21:09:56 +08:00
renovate[bot] 9ead29643d Lock file maintenance 2024-09-30 00:22:01 +00:00
FooIbar d8e7bd4ccc Prepare for next iteration 2024-09-28 22:57:59 +08:00
FooIbar dd2949638c Prepare for release 1.12.1 2024-09-28 22:57:17 +08:00
FooIbar f71aa4902b Prepare changelog for 1.12.1 (#1691)
[no ci]
2024-09-28 22:56:20 +08:00
FooIbar af7e411932 Refine GalleryMultiPageViewerPTokenParser 2024-09-28 00:01:21 +08:00
FooIbar c54ac1a4c0 Fix crash when download location is invalid 2024-09-27 19:57:47 +08:00
renovate[bot] 00d6a2e403 Update AGP to v8.8.0-alpha04 2024-09-27 02:08:47 +00:00
FooIbar b67d0938b0 Reapply "Add scroll bar to quick search and download label"
This reverts commit a52ab28534.
2024-09-26 19:12:46 +08:00
FooIbar 8447760cb5 Fix image download queue not respecting FIFO order 2024-09-25 22:58:36 +08:00
FooIbar 24d2072586 Use Downloads as start screen if device is offline (#1675) 2024-09-25 03:54:34 +00:00
renovate[bot] a52ab28534 Revert "Add scroll bar to quick search and download label"
This reverts commit 601713d8d7.
2024-09-25 08:25:04 +08:00
FooIbar 601713d8d7 Add scroll bar to quick search and download label 2024-09-25 07:38:20 +08:00
FooIbar 7bfa5be53c Fix concurrent creation of the same directory 2024-09-24 21:36:42 +08:00
renovate[bot] ae3a66903a Update dependency gradle to v8.10.2 2024-09-24 02:16:59 +00:00
renovate[bot] 5438fd5d9b Update AGP to v8.8.0-alpha03 2024-09-23 21:59:33 +00:00
FooIbar a74ffca03d Fix galleries with both artist and cosplayer tags
Legacy issue of E-Hentai's tag namespacing changes.
2024-09-24 00:38:24 +08:00
renovate[bot] c5a83d567e Update dependency libarchive to v3.7.6 2024-09-23 13:40:44 +00:00
FooIbar 1b1f781dd9 Update renovate config 2024-09-23 21:32:34 +08:00
renovate[bot] 988195e4fc Lock file maintenance 2024-09-23 00:49:24 +00:00
FooIbar 4d4124458d Fix reader prefetch when scroll direction changes 2024-09-22 16:19:24 +08:00
FooIbar 0ae2843676 Actually fix data import on Android V
This reverts commit 26921c8a
2024-09-21 23:10:50 +08:00
FooIbar beaddc9eeb Fix foreign key constraint violation on db import 2024-09-21 23:10:50 +08:00
FooIbar d843b3a14b Try to reduce false positives in ad detection 2024-09-21 20:05:01 +08:00
Dude so hot b9da0eda8b Cleanup 2024-09-20 20:01:49 +08:00
Dude so hot ba75cda036 Move navigation to use compose Rect 2024-09-20 20:01:49 +08:00
Dude so hot 9d59af29c5 Singleton Navigation 2024-09-20 20:01:49 +08:00
FooIbar 660d6e32f1 Cleanup 2024-09-20 19:50:13 +08:00
FooIbar c07c663105 Address deprecation 2024-09-20 19:50:13 +08:00
FooIbar 3673f6f7f9 Rename awaitPermissionOrCancel -> awaitConfirmationOrCancel 2024-09-20 19:50:13 +08:00
renovate[bot]andDude so hot e8120e12d0 ADT Page model (#1655)
* Enable when guards

* ADT Page model

* Refine

* Refine

* Remove type conversion

* Cleanup

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-09-20 16:19:59 +08:00
renovate[bot] f7459886b2 Update kotlinx.serialization to v1.7.3 2024-09-19 20:07:38 +00:00
FooIbar 6fe5319c08 Update Kotlin & KSP to 2.1.0-Beta1 2024-09-19 23:57:48 +08:00
FooIbar 3a42208a36 Merge GalleryPreviewScreen to GalleryDetailScreen (#1649) 2024-09-19 23:39:42 +08:00
FooIbar e4eacce5bf Update Compose BOM 2024-09-19 23:02:04 +08:00
FooIbar d1fdea8d3e Update libarchive to v3.7.5 2024-09-19 22:57:38 +08:00
98e452e39e Fastpath to create regioned hardware bitmap (#1647)
* kotlin side

* Impl

* Refine

* respect ahb align

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Don't copy unnecessary things

* Cleanup

* Recycle

* Revert "Disable `abortOnError` for lint in debug build"

This reverts commit cea06f0c

* Fix marshmallow build

* Fix cmake

* Address cr

* Refine

* Cleanup

* log it

---------

Signed-off-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-09-19 14:25:55 +00:00
FooIbar 02e8fcc534 Fix lint
This reverts commit cea06f0c
2024-09-19 21:54:28 +08:00
renovate[bot]andDude so hot 70852c2725 Crop bitmap before draw (#1646)
* Crop bitmap before draw

* Spilt

* Refine

* Cleanup

* Address code review

* Address code review

* Address code review

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-09-19 07:56:24 +00:00
renovate[bot] ea67d6e078 Update benchmark to v1.4.0-alpha01 2024-09-18 22:15:18 +00:00
renovate[bot] d2aa3b5347 Update androidx.room to v2.7.0-alpha08 2024-09-18 22:14:40 +00:00
renovate[bot] 937792ba91 Update dependency androidx.work:work-runtime to v2.10.0-alpha04 2024-09-18 18:53:24 +00:00
renovate[bot] fcfdaf59f8 Update dependency androidx.lifecycle:lifecycle-process to v2.9.0-alpha03 2024-09-18 17:22:46 +00:00
renovate[bot] 0d4da998a1 Update dependency androidx.profileinstaller:profileinstaller to v1.4.0 2024-09-18 17:21:32 +00:00
FooIbar 0e7a32d9af [Marshmallow] Add ISRG Root X1 as a trusted root 2024-09-18 17:54:41 +08:00
FooIbar 4bb6b0baf6 Switch to rxing for QR code detection 2024-09-16 17:54:14 +08:00
renovate[bot] 0591b3224f Lock file maintenance 2024-09-16 00:10:00 +00:00
renovate[bot]andDude so hot eaf8dd21ff Crop border in Rust (#1631)
* Fix deref_mut_direct_bytebuffer lifetime

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Framework

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Add Infra

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Implement

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Refine

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Impl

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Fixes

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Implement

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Update profile code

* Remove corrent but slow code that slow for 1000x

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Revert "Remove corrent but slow code that slow for 1000x"

This reverts commit 644d093ddc20f4a129ee304157767707337d149d.

* Fix speed

Signed-off-by: Dude so hot <djohn@fbi.gov>

* refine

Signed-off-by: Dude so hot <djohn@fbi.gov>

* refine

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Refine

Signed-off-by: Dude so hot <djohn@fbi.gov>

* cleanup type conversion

Signed-off-by: Dude so hot <djohn@fbi.gov>

* cleanup

Signed-off-by: Dude so hot <djohn@fbi.gov>

* refine

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Remove C cropborder impl

* impl nth to accel

Signed-off-by: Dude so hot <djohn@fbi.gov>

* F**K

Signed-off-by: Dude so hot <djohn@fbi.gov>

---------

Signed-off-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-09-15 22:20:55 +08:00
Dude so hot 9bc6cccf26 buffer share same lifetime with jnienv
Signed-off-by: Dude so hot <djohn@fbi.gov>
2024-09-14 20:08:51 +08:00
Dude so hot eb3b53ee5b Format
Signed-off-by: Dude so hot <djohn@fbi.gov>
2024-09-14 20:08:51 +08:00
Dude so hot 731af586af Add safety hint for parse_marshal_inplace
Signed-off-by: Dude so hot <djohn@fbi.gov>
2024-09-14 20:08:51 +08:00
Dude so hot 3acb70b8e1 Add safety hint for deref_mut_direct_bytebuffer
Signed-off-by: Dude so hot <djohn@fbi.gov>
2024-09-14 20:08:51 +08:00
Dude so hot 836b1841e3 Add safety hint for with_bitmap_content
Signed-off-by: Dude so hot <djohn@fbi.gov>
2024-09-14 20:08:51 +08:00
Dude so hot d37f4580a9 Rename to avoid clash
Signed-off-by: Dude so hot <djohn@fbi.gov>
2024-09-14 20:08:51 +08:00
Dude so hot 70fc964b4d Fold get_bitmap_handle
Signed-off-by: Dude so hot <djohn@fbi.gov>
2024-09-14 20:08:51 +08:00
Dude so hot c3c5fbfc79 Extract with_bitmap_content
Signed-off-by: Dude so hot <djohn@fbi.gov>
2024-09-14 20:08:51 +08:00
Dude so hot 04103f9280 Extract detect_image_ad
Signed-off-by: Dude so hot <djohn@fbi.gov>
2024-09-14 20:08:51 +08:00
Dude so hot 69370efcf5 Modularize QrCode
Signed-off-by: Dude so hot <djohn@fbi.gov>
2024-09-14 20:08:51 +08:00
renovate[bot]andDude so hot f0d3b0c8ae Misc updates (#1629)
* Respect Arch's ndk location

* Don't spam in debug build

* Cleanup

* Revert "Cleanup"

This reverts commit 45b9d76dd363aa1fd3d58b5102b68649028e313a.

* Revert "Respect Arch's ndk location"

This reverts commit 3fd773422d3ae440a6466e2fa161a45018fd8ed7.

* Respect Arch ndk location

---------

Co-authored-by: Dude so hot <djohn@fbi.gov>
2024-09-14 10:45:36 +00:00
FooIbar 370c485048 Update NDK to r27b and address deprecation 2024-09-14 17:07:04 +08:00
FooIbar 7e4c910cd7 Fix blocked image placeholder content scale 2024-09-14 16:06:09 +08:00
renovate[bot] e8c1c80ce5 Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-android to v1.9.0 2024-09-13 16:20:18 +00:00
0d55f319c9 Fuckoff External Ads (#1617)
* Add Rust implementation to detect QRCode from bitmap

* Add QRCodeInterceptor Framework

* Let image take hasQRCode info

* Keep ReaderPage index internal

* Move imageCache to use ReaderPage as key

* Make PageLoader size & pages internal

* Refine

* Kill entry if QRCode

* Rewrite request to respect index mapping

* Debug: enable by default

* Fix crash

* Fixup

* Fix identity

* Revert to lruCache to avoid crash

* Fixup

* Clippy check for android only

* Fixup

* Resolve clippy

* Switch

* Apply switch

* Restart pageloader restore pages

* Cleanup

* Cleanup

Signed-off-by: Dude so hot <djohn@fbi.gov>

* let it inference

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Don't detect border for ads

* Make coil interceptor runs in `Dispatchers.Default`

* Revert "Restart pageloader restore pages"

This reverts commit 8fd02fb7d9c677c119df72a767a6079f1899dc31.

* Revert drop page changes

* Use backGround color painter for ads

* Only check ads for tags contains extraneous ads

* Only check ads for head 5 images || tail 10 images

* Move strip ADs switch to AdvancedScreen

* Pick placeholder

* Show Placeholder

* Don't try to extract & decode

Signed-off-by: Dude so hot <djohn@fbi.gov>

* cleanup

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Naming

* Naming

* Naming

* Naming

* For ArchivePageLoader as well

* Hint

* Fix flicker

* Refine

* Naming

* QR -> Qr

* Naming

* QR -> Qr

* Naming

* Refine

* Revert

* Remove header check

* Allow show ads

* Adjust

* Refine

* Revert "Don't try to extract & decode"

This reverts commit f35ef46f6ffc81485cf0f4c646ed79e524c29d32.

Signed-off-by: Dude so hot <djohn@fbi.gov>

* be strict

Signed-off-by: Dude so hot <djohn@fbi.gov>

* Just Extract, don't decode

* Refine

* Refine placeholder

---------

Signed-off-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: Dude so hot <djohn@fbi.gov>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-09-13 16:10:05 +00:00
FooIbar 42ed51094e Temporarily disable shared element transitions (#1621) 2024-09-13 12:10:26 +08:00
renovate[bot] 84c3fee5da Update dependency sh.calvin.reorderable:reorderable to v2.4.0-beta01 2024-09-13 00:33:59 +00:00
renovate[bot] b3af2c9481 Update AGP to v8.8.0-alpha02 2024-09-12 22:42:21 +00:00
renovate[bot] 33cab186fd Update dependency com.squareup.okio:okio-jvm to v3.9.1 2024-09-12 22:40:33 +00:00
FooIbar e3f52412ee Replace custom user agent with desktop site option 2024-09-12 20:22:54 +08:00
080810c707 Update dependency io.ktor:ktor-client-core to v3.0.0-rc-1 (#1424)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <99822064+revonateB0T@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-09-10 01:22:52 +00:00
renovate[bot] 964e827cbe Update AGP to v8.8.0-alpha01 2024-09-10 01:10:26 +00:00
FooIbar cae02acfc4 Fix cosplayer tag translation in download label 2024-09-10 06:11:25 +08:00
FooIbar 31ce4eac92 Update description for IP-based image limit 2024-09-09 22:13:49 +08:00
renovate[bot] bd5bd1e571 Implement Shared Element Transition Connector Framework (#1614)
undefined
2024-09-09 21:46:07 +08:00
renovate[bot] 2b4a6dc57a Update dependency gradle to v8.10.1 2024-09-09 10:25:31 +00:00
FooIbar 68932731b9 Fix gallery detail losing scroll position 2024-09-09 18:14:48 +08:00
renovate[bot] aab7ba0d53 Lock file maintenance 2024-09-09 01:22:24 +00:00
renovate[bot] 59bf4f2702 Update compose.destinations to v2.1.0-beta12 2024-09-08 22:47:54 +00:00
FooIbar e0e4b739f9 Add key and contentType for gallery detail 2024-09-08 22:04:12 +08:00
FooIbar 21d6b3bbb8 [no ci] Fix renovate config 2024-09-07 18:13:20 +08:00
FooIbar dae5d67515 [no ci] Fix renovate config 2024-09-07 17:59:56 +08:00
FooIbar a6a814bbbb [no ci] Update renovate config 2024-09-07 16:27:23 +08:00
FooIbar 0b0555af9d Use singleton empty WindowInsets 2024-09-07 16:13:54 +08:00
FooIbar 6e0d77a8ab Fix unfinished files being considered downloaded 2024-09-07 16:13:40 +08:00
FooIbar 5c06a69c8a Revert "Update agp to v8.7.0-beta01"
This reverts commit 63ec1aa217.
2024-09-06 14:25:38 +08:00
FooIbar 188a236a90 Fix reader padding and progress indicator theme 2024-09-06 10:00:21 +08:00
renovate[bot] 63ec1aa217 Update agp to v8.7.0-beta01 2024-09-05 21:38:21 +00:00
renovate[bot] 829316d8b9 Update dependency com.google.devtools.ksp to v2.0.20-1.0.25 2024-09-05 21:36:55 +00:00
renovate[bot] 337739fdad Update dependency androidx.profileinstaller:profileinstaller to v1.4.0-rc01 2024-09-05 14:44:41 +00:00
FooIbar f144ac701d Refine BitmapPainter 2024-09-05 22:36:19 +08:00
FooIbar 9c9b8b74cd Fix crash on random button click with empty list 2024-09-05 20:53:00 +08:00
renovate[bot] 154c7f3710 Update dependency com.google.accompanist:accompanist-drawablepainter to v0.36.0 2024-09-05 03:38:28 +00:00
renovate[bot] d3308bc987 Update dependency androidx.activity:activity-compose to v1.10.0-alpha02 2024-09-05 01:56:06 +00:00
renovate[bot] 04d9ee57d7 Update dependency androidx.core:core-splashscreen to v1.2.0-alpha02 2024-09-05 01:45:16 +00:00
FooIbar f3eecf18fb Switch to official Compose alpha BOM
This reverts commit c76440f167.
2024-09-05 09:45:04 +08:00
renovate[bot] 6591495d2d Update dependency androidx.work:work-runtime to v2.10.0-alpha03 2024-09-05 01:43:42 +00:00
renovate[bot] 2497835628 Update dependency androidx.constraintlayout:constraintlayout-compose to v1.1.0-beta01 2024-09-04 22:35:38 +00:00
renovate[bot] 8fad9b2abe Update androidx.lifecycle to v2.9.0-alpha02 2024-09-04 22:34:46 +00:00
renovate[bot] fdd0ec9fd2 Update dependency com.android.tools:desugar_jdk_libs_nio to v2.1.2 2024-09-04 10:52:07 +00:00
FooIbar 1219ff99ff Reset page state on page loader restart 2024-09-03 19:12:01 +08:00
FooIbar c60b14998a Fix crash when drawing > 100 MB bitmaps 2024-09-03 19:03:54 +08:00
renovate[bot] 380554bd19 Lock file maintenance 2024-09-02 01:56:54 +00:00
FooIbar 2b969030da Fix recent download label can't be set to null
This reverts commit 822a461acd.
2024-09-01 20:56:01 +08:00
github-actions[bot] da917de1f4 Update Chrome version for default User-Agent 2024-09-01 13:34:46 +08:00
renovate[bot] 541f9e89f3 Update agp to v8.7.0-alpha09 2024-08-30 15:14:11 +00:00
renovate[bot] f4a987c83f Update agp to v8.7.0-alpha08 2024-08-28 19:45:33 +00:00
renovate[bot] 37474ed6ac Update kotlinx.serialization to v1.7.2 2024-08-28 19:43:12 +00:00
renovate[bot] cb69a168f3 Update dependency com.android.tools:desugar_jdk_libs_nio to v2.1.1 2024-08-28 13:34:26 +00:00
FooIbar 94366553de Fix torrent count parsing
This partially reverts commit 634269c6a4.
2024-08-27 07:37:30 +08:00
FooIbar 383332bfbb Fix account-based image limit parsing (#1565)
* Fix account-based image limit parsing

* Fix format
2024-08-27 07:37:05 +08:00
renovate[bot] 4bb1a17d39 Update dependency com.android.tools:desugar_jdk_libs_nio to v2.1.0 2024-08-26 17:43:40 +00:00
renovate[bot] 94d68fe38b Lock file maintenance 2024-08-26 00:56:27 +00:00
renovate[bot] cf6c850d2a Update aboutlibraries to v11.2.3 2024-08-23 11:06:34 +00:00
renovate[bot] c8a3a0fc20 Update dependency sh.calvin.reorderable:reorderable to v2.4.0-alpha02 2024-08-23 01:22:29 +00:00
renovate[bot] 433896b267 Update dependency com.google.devtools.ksp to v2.0.20-1.0.24 2024-08-22 23:11:02 +00:00
renovate[bot] 7e9c1f00ef Update Kotlin & KSP to v2.0.20 2024-08-22 10:56:10 +00:00
renovate[bot] 2b5b0d695a Update dependency me.saket.telephoto:zoomable to v0.13.0 2024-08-22 03:41:35 +00:00
renovate[bot] 2265b0943e Update dependency androidx.core:core-ktx to v1.15.0-alpha02 2024-08-22 01:09:20 +00:00
renovate[bot] 78f12065ab Update dependency dev.chrisbanes.compose:compose-bom to v2024.08.00-alpha02 2024-08-21 22:04:09 +00:00
renovate[bot] f28c45a13a Update dependency androidx.profileinstaller:profileinstaller to v1.4.0-beta01 2024-08-21 22:03:53 +00:00
renovate[bot] e030500917 Update benchmark to v1.3.0 2024-08-21 21:01:47 +00:00
renovate[bot] 9c042cd323 Update androidx.room to v2.7.0-alpha07 2024-08-21 21:01:30 +00:00
FooIbar 44eea7a273 Adapt status bar content color for reader theme 2024-08-21 15:20:25 +08:00
FooIbar 834cfc5e8c Support scrolling with mouse wheel in reader 2024-08-21 15:20:16 +08:00
renovate[bot] 876bb68873 Update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.6.1 2024-08-20 17:10:58 +00:00
FooIbar 40c1b7ef21 Prepare for next iteration 2024-08-19 21:02:30 +08:00
FooIbar 6191ad74d3 Prepare for release 1.12.0 2024-08-19 21:01:58 +08:00
FooIbar 5aae8f5649 Fix thumbnail resolution setting not working 2024-08-19 17:45:39 +08:00
FooIbar 6886465afb Refine reader
Fix navigation when switching from `WebtoonViewer` to `PagerViewer`.

Hide navigation overlay and reset slider to follow pager on click.
2024-08-19 17:45:26 +08:00
FooIbar 5a46fc4573 Don't recycle visible images 2024-08-19 13:49:36 +08:00
renovate[bot] a08b8e96e5 Lock file maintenance 2024-08-19 01:05:11 +00:00
FooIbar 5aeded7a24 Don't show load state indicator when no hits found 2024-08-18 17:40:48 +08:00
FooIbar 1883b82159 Fix pager unclickability when image is not loaded 2024-08-18 17:40:37 +08:00
FooIbar 302b57d4ac Fix normal preview in exhentai
Remove force e-hentai thumb option due to infeasible.
2024-08-17 00:52:44 +08:00
FooIbar c6b793923e Temporarily disable shared element transitions 2024-08-16 20:20:13 +08:00
FooIbar 058c280fd7 Avoid out-of-screen shared element transitions 2024-08-16 19:45:19 +08:00
renovate[bot] 0fa42d731b Update agp to v8.7.0-alpha07 2024-08-16 00:45:15 +00:00
FooIbar 9b54b57934 Refactor reader prefetch logic (#1523)
* Refactor reader prefetch logic

* Refine
2024-08-16 00:46:44 +08:00
FooIbar d3ab3ba61f [no ci] Update workflow 2024-08-15 18:29:41 +08:00
renovate[bot] 921f570151 Update dependency gradle to v8.10 2024-08-14 12:46:28 +00:00
FooIbar 03ab435401 Fix preload in reader (#1517)
* Fix preload in reader

* Reduce preload page count for ArchivePageLoader
2024-08-14 12:58:06 +08:00
renovate[bot] b73704ede1 Update dependency com.google.devtools.ksp to v2.0.20-RC2-1.0.24 2024-08-14 01:37:30 +00:00
renovate[bot] 97b2181ff7 Update agp to v8.7.0-alpha06 2024-08-13 19:11:16 +00:00
renovate[bot] ef5e3f7c51 Update Kotlin & KSP to v2.0.20-RC2 2024-08-13 13:41:34 +00:00
FooIbar 8a29d46b38 Revert^3 "Update Compose snapshot and migrate to BTF2 (#1474)"
This reverts commit 22b5a175f4.
2024-08-13 18:54:38 +08:00
FooIbar 75d8ff4b64 Fix ComicInfo.xml for galleries with temp tags 2024-08-13 17:46:01 +08:00
FooIbar 33258ea554 Fix read progress insert crash when exiting reader 2024-08-13 17:40:21 +08:00
renovate[bot] a723b4ecd3 Lock file maintenance 2024-08-12 00:15:22 +00:00
renovate[bot] 78a237fb0e Update agp to v8.7.0-alpha05 2024-08-09 02:18:54 +00:00
renovate[bot] 8fe60c0163 Update dependency dev.chrisbanes.compose:compose-bom to v2024.08.00-alpha01 2024-08-08 06:19:26 +00:00
renovate[bot] ffe47b2ff2 Update dependency androidx.lifecycle:lifecycle-runtime-compose to v2.9.0-alpha01 2024-08-08 03:14:46 +00:00
renovate[bot] e05fffb41c Update dependency androidx.biometric:biometric-ktx to v1.4.0-alpha02 2024-08-08 03:14:00 +00:00
renovate[bot] 1fb5de2527 Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-alpha10 2024-08-08 00:40:20 +00:00
renovate[bot] 46790a1fbe Update dependency androidx.profileinstaller:profileinstaller to v1.4.0-alpha02 2024-08-08 00:39:56 +00:00
renovate[bot] af1316f06b Update dependency androidx.constraintlayout:constraintlayout-compose to v1.1.0-alpha14 2024-08-07 22:11:39 +00:00
renovate[bot] 24564cac8d Update dependency androidx.paging:paging-compose to v3.3.2 2024-08-07 22:11:14 +00:00
renovate[bot] c4868f137b Update benchmark to v1.3.0-rc01 2024-08-07 20:38:52 +00:00
renovate[bot] 3ccfa0dd5b Update androidx.room to v2.7.0-alpha06 2024-08-07 20:38:26 +00:00
FooIbar fded0fd08d Fix GitHub authorization and clean up code 2024-08-07 18:37:51 +08:00
renovate[bot] b1afe9bcd1 Update agp to v8.7.0-alpha04 2024-08-06 22:54:54 +00:00
FooIbar 22b5a175f4 Reapply "Update Compose snapshot and migrate to BTF2 (#1474)"
This reverts commit 94b138f254.
2024-08-06 23:01:20 +08:00
FooIbar ee9e0df12e [no ci] Fix release workflow 2024-08-06 22:03:30 +08:00
FooIbar dd525baf88 Use encoded token to avoid detection & revocation (#1492) 2024-08-06 21:33:46 +08:00
FooIbar 9180603ead Fix a division by zero error in ScrollbarAdapter 2024-08-06 21:30:12 +08:00
renovate[bot] 66fe19369e Lock file maintenance 2024-08-05 00:38:20 +00:00
renovate[bot] b9db025f57 Update gradle/actions action to v4 2024-08-04 00:54:28 +00:00
FooIbar 44f6eca3aa Fix main thread IO (really) and float comparison 2024-08-03 14:55:05 +08:00
FooIbar 1ff1caf421 Fix list item container color
Also compile debug build with SDK 35 as sources for SDK 35 have been
available.
2024-08-03 08:42:33 +08:00
github-actions[bot] ec1355c0e7 Update Chrome version for default User-Agent 2024-08-01 11:21:29 +08:00
FooIbar d23a453f71 Don't let navigation overlay consume click event
So it won't take two actions to dismiss overlay & app bar.
2024-08-01 07:25:47 +08:00
FooIbar 94b138f254 Revert "Update Compose snapshot and migrate to BTF2 (#1474)"
This reverts commit abcef9a86e.
2024-08-01 03:06:53 +08:00
FooIbar c281daa4ea Update NDK to r27 2024-08-01 01:42:33 +08:00
FooIbar 4f9eba8c63 Update Kotlin and remove workaround 2024-08-01 01:08:41 +08:00
FooIbar a2547f1e8d Update page range filter limit 2024-07-31 18:54:51 +08:00
FooIbar abcef9a86e Update Compose snapshot and migrate to BTF2 (#1474)
* Update Compose snapshot and remove workaround

* Sync SearchBarInputField with upstream

* Migrate to BTF2 text fields

* Fix search page range error text container color

* Update snapshot to fix a SieveCache crash

https://r.android.com/3199791
2024-07-31 17:40:09 +08:00
FooIbar 7d6a9b10e4 Fix crash when opening archives simultaneously 2024-07-30 16:27:16 +08:00
renovate[bot] 9322b80790 Update dependency com.google.devtools.ksp to v2.0.0-1.0.24 2024-07-30 00:51:18 +00:00
FooIbar e12897bd13 Fix layout issue with comments that contain images 2024-07-29 21:59:40 +08:00
FooIbar 28279cc671 Fix page transitions when reading with volume keys 2024-07-29 18:19:43 +08:00
FooIbar 2531fa289b Update dependency sh.calvin.reorderable:reorderable to v2.4.0-alpha01 2024-07-29 10:47:13 +08:00
renovate[bot] 9673163e8f Lock file maintenance 2024-07-29 00:55:33 +00:00
renovate[bot] 3f7091f880 Update dependency sh.calvin.reorderable:reorderable to v2.3.0 2024-07-28 20:01:11 +00:00
FooIbar 5df75fd534 Don't save baseline profile in sources (#1462)
* Don't save baseline profile in sources

* Fixup
2024-07-28 17:25:36 +00:00
FooIbarandGG Bond 62061e54ee Add shared element transitions (#1049)
* Add shared element transitions

* Fixup CodeStyle

* Add a overload for `Modifier.sharedBounds`

* Add TransitionsVisibilityScope to hold multiple transition

* advance AnimatedVisibilityScope to TransitionsVisibilityScope

* composing use advance

* Correctly remember

* Convert to use `Set`

* share SharedContentState

* Refine

* Cleanup

* Cleanup

* Update snapshot

* Temporarily disable navigation transition

* Fix build

* Make `TransitionsVisibilityScope` a value class

* Naming

* Use `implicit` instead

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-07-28 14:11:47 +00:00
github-actions[bot] 436c07fb6b Update baseline profile 2024-07-28 21:34:06 +08:00
FooIbar a16f873f7d Fix crash when switching reading mode 2024-07-28 21:15:09 +08:00
FooIbar 98fdcf0588 Fix double free on closing failed-to-open archives 2024-07-28 20:48:56 +08:00
renovate[bot] 539ad1af30 Fix read encrypted archive 2024-07-28 12:05:04 +00:00
FooIbar 4370606977 [Reader] Show progress indicator & fix background 2024-07-28 19:45:18 +08:00
FooIbar 1ecdc07655 Graduate Compose Reader to stable 2024-07-28 17:29:50 +08:00
FooIbar 01a1113a07 [New Reader] Avoid initial scroll on reader start 2024-07-28 17:14:07 +08:00
renovate[bot] fd6c2977b0 Update plugin composeCompilerReportGenerator to v1.4.0 2024-07-28 08:50:51 +00:00
FooIbar 02e36e7021 [New Reader] Implement open archive intent 2024-07-28 14:00:23 +08:00
FooIbar 7f8e4aa003 [New Reader] Hide menu on scroll 2024-07-28 14:00:23 +08:00
FooIbar 8ce16bc918 [New Reader] Implement navigation overlay (#1445)
* [New Reader] Implement navigation overlay

* Fix typo

* Refine

* Reuse navigation regions
2024-07-26 23:45:41 +08:00
renovate[bot] fbe35a0fa0 Update agp to v8.7.0-alpha03 2024-07-25 23:43:05 +00:00
renovate[bot] 931f1ec514 Update dependency dev.chrisbanes.compose:compose-bom to v2024.07.00-alpha02 2024-07-25 17:31:31 +00:00
renovate[bot] 7c4a59e9a4 Update compose.destinations to v2.1.0-beta11 2024-07-25 13:33:39 +00:00
FooIbar c1c6f25763 [New Reader] Refine landscape zoom (#1442) 2024-07-25 18:53:16 +08:00
renovate[bot] e7f515c70f Update dependency androidx.paging:paging-compose to v3.3.1 2024-07-24 19:48:04 +00:00
renovate[bot] 64fecbfa52 Update dependency androidx.lifecycle:lifecycle-process to v2.8.4 2024-07-24 17:18:31 +00:00
renovate[bot] c6c181a9fa Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-alpha09 2024-07-24 22:05:22 +08:00
FooIbar 53a1bd9959 [New Reader] Implement landscape zoom 2024-07-24 20:36:43 +08:00
FooIbar 7b1f94cf5a [New Reader] Implement custom image scale types 2024-07-24 09:02:45 +08:00
renovate[bot] 4b8ecbf6a7 Update agp to v8.7.0-alpha02 2024-07-22 21:19:13 +00:00
renovate[bot] 0e0b0519e7 Lock file maintenance 2024-07-22 02:12:22 +00:00
FooIbar 7fb3b7c785 Tweak baseline profile generation schedule
[no ci]
2024-07-21 15:00:14 +08:00
renovate[bot]andFooIbar e18ebb1feb Update compose.destinations to v2.1.0-beta10 (#1435)
* Update compose.destinations to v2.1.0-beta10

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-07-21 06:30:57 +00:00
FooIbar f76dcfc97b [New Reader] Misc improvements 2024-07-21 08:30:32 +08:00
renovate[bot] c0c630bd9f Update dependency me.saket.telephoto:zoomable to v0.12.1 2024-07-20 09:00:29 +00:00
FooIbar 04df7da5dc Remove obsolete workaround 2024-07-17 17:38:01 +08:00
FooIbar d156638a79 Fix comment screen refresh indicator padding 2024-07-17 17:33:44 +08:00
FooIbar c78fe0b72c [New Reader] Implement touch navigation 2024-07-17 17:32:08 +08:00
renovate[bot] 799c37ea71 Update dependency sh.calvin.reorderable:reorderable to v2.2.0 2024-07-17 05:42:34 +00:00
renovate[bot] 9559ca571b Update agp 2024-07-15 19:40:24 +00:00
renovate[bot] 2f5c1e11c6 Lock file maintenance 2024-07-15 01:07:35 +00:00
renovate[bot] 734c73fa4d Update dependency me.saket.telephoto:zoomable to v0.12.0 2024-07-13 19:51:02 +00:00
renovate[bot] c09173d62c Update dependency com.google.devtools.ksp to v2.0.0-1.0.23 2024-07-11 21:35:55 +00:00
renovate[bot] 533f50ed08 Update dependency gradle to v8.9 2024-07-11 18:03:51 +00:00
Dude so hot b4422fe910 Drop MAP_UNINITIALIZED
This is not available on modern MMU devices
2024-07-11 21:31:34 +08:00
Dude so hot 22e58a034f Fix memleak while do archive 2024-07-11 21:12:31 +08:00
FooIbar 784856d341 Revert "Update agp to v8.6.0-beta01"
This reverts commit b982705b2f.
2024-07-11 08:45:00 +08:00
renovate[bot] f82832ca36 Update dependency dev.chrisbanes.compose:compose-bom to v2024.07.00-alpha01 2024-07-11 00:15:30 +00:00
renovate[bot] 6a70aa792e Update benchmark to v1.3.0-beta02 2024-07-10 19:10:50 +00:00
renovate[bot] a0016dbf85 Update androidx.room to v2.7.0-alpha05 2024-07-10 19:10:30 +00:00
renovate[bot] b982705b2f Update agp to v8.6.0-beta01 2024-07-10 17:01:40 +00:00
FooIbar 4c36398bed Prepare for next iteration 2024-07-10 22:13:25 +08:00
FooIbar 7e1b3abcf6 Prepare for release 1.11.7 2024-07-10 22:12:56 +08:00
FooIbar 97bb65aa35 Fix search bar title flickering 2024-07-10 22:11:46 +08:00
FooIbar 98c1a377ca Fix main thread disk IO 2024-07-10 20:25:52 +08:00
FooIbar 2d2ce3281e Fix Path -> Uri conversion for paths contain '%'
This reverts commit ab2e4a8e2d.
2024-07-10 19:44:13 +08:00
renovate[bot] a28d3ba840 Update dependency org.jsoup:jsoup to v1.18.1 2024-07-10 08:41:55 +00:00
FooIbar ab2e4a8e2d Fix Path -> Uri conversion
No need to do it for '?' as that's not allowed in filename.
2024-07-10 12:59:29 +08:00
FooIbar 67ddba87b5 Fix workflow config
[no ci]
2024-07-09 22:29:28 +08:00
FooIbar 8164847fcb Prepare for next iteration 2024-07-09 22:03:40 +08:00
FooIbar 85b538bbd3 Prepare for release 1.11.6 2024-07-09 22:03:04 +08:00
FooIbar d00d700a4b Improve Path/Uri conversion 2024-07-09 21:51:41 +08:00
github-actions[bot] ae66318843 Update baseline profile 2024-07-09 19:15:53 +08:00
FooIbar 1b9aa6a762 Retrieve favorite notes when modifying favorites 2024-07-09 18:54:57 +08:00
renovate[bot]andFooIbar 306ce83de4 Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-alpha08 (#1397)
* Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-alpha08

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-07-09 07:01:49 +00:00
FooIbar 89f9735ab9 Update Rust edition to 2021 2024-07-09 11:07:10 +08:00
FooIbar 843e1cc6a0 Fix MediaStore DATE_ADDED/DATE_MODIFIED
They are in seconds not milliseconds as per the documentation.
2024-07-09 10:55:34 +08:00
FooIbar 1a53d0d207 Fix download notification not showing 2024-07-09 10:18:22 +08:00
renovate[bot] 45c02d4fd6 Update Rust crate quick-xml to 0.36 2024-07-08 20:06:06 +00:00
renovate[bot] 862dee0845 Lock file maintenance 2024-07-08 01:53:46 +00:00
FooIbar 809bbfeba7 Refine clean redundancy dialog 2024-07-08 00:12:23 +08:00
FooIbar 959c740175 AndroidFileSystem POC (#1383)
* AndroidFileSystem POC

* Cache image file paths

* Refine
2024-07-07 07:13:49 +00:00
FooIbar a718510c89 Implicitly add language filter tag
This partially reverts commit 673c1837e9.
2024-07-06 15:02:55 +08:00
FooIbar f7c2fd8af3 Renew GitHub token 2024-07-05 21:12:46 +08:00
FooIbar c76440f167 Address deprecation 2024-07-05 20:57:47 +08:00
FooIbar c3bd959ee5 Update Compose snapshot (#1381)
* Update Compose snapshot

https://issuetracker.google.com/344633766

* Fix search bar text field padding
2024-07-04 13:34:27 +00:00
FooIbar 0a25643b87 Fix native crash on archive open failures 2024-07-04 20:24:37 +08:00
FooIbar c805ca8aff Revert "Reuse the root download location UniFile object"
Reason for revert: Caused OOM.
2024-07-03 22:34:18 +08:00
FooIbar 699a1ab801 Refactor DownloadService to use flows 2024-07-03 19:59:12 +08:00
FooIbar ee091aee0f Rescan download directory when restoring downloads (#1372) 2024-07-02 05:50:20 +00:00
FooIbar 673c1837e9 Fix language filter being applied to quick search 2024-07-02 13:44:01 +08:00
FooIbar 3998913c17 Fix existing download dirname not being used (#1371)
Tweak clean redundancy logic and add a confirm dialog.
2024-07-02 13:41:31 +08:00
renovate[bot] 1e83d7128e Update androidx.lifecycle to v2.8.3 2024-07-01 17:29:06 +00:00
FooIbar 355289a576 Avoid relying on implementation details (#1357)
* Avoid relying on implementation details

* Refine

* Fixup

* Extract common logic of RawFile & TreeDocumentFile

* Reuse the root download location UniFile object
2024-07-01 20:00:13 +08:00
FooIbar ba3a41f0ee Limit search bar text to single line 2024-07-01 17:17:38 +08:00
github-actions[bot] fc6d0bd6ef Update Chrome version for default User-Agent 2024-07-01 14:26:38 +08:00
FooIbar 15ef0ae362 Exclude scrollbar area from the system gesture 2024-07-01 14:26:15 +08:00
renovate[bot] a598f8562d Lock file maintenance 2024-07-01 01:28:33 +00:00
github-actions[bot] 2860fed5ab Update baseline profile 2024-06-30 11:07:14 +08:00
FooIbar f247544439 Migrate to CMP's implementation of scrollbar 2024-06-30 11:06:12 +08:00
renovate[bot] fdc3d94d5c Update Rust crate quick-xml to 0.35 2024-06-29 20:08:16 +00:00
renovate[bot] afc2ff7478 Update dependency io.github.petertrr:kotlin-multiplatform-diff to v0.7.0 2024-06-29 15:38:04 +00:00
renovate[bot] 83072d4eee Update aboutlibraries to v11.2.2 2024-06-29 12:13:33 +00:00
renovate[bot] 7e7be8d40a Update agp to v8.6.0-alpha08 2024-06-27 21:42:03 +00:00
FooIbar 90d7555333 [no ci] Fix benchmark build type configuration 2024-06-27 14:48:55 +08:00
github-actions[bot] ba268cfe6d Update baseline profile 2024-06-27 12:37:32 +08:00
renovate[bot]andFooIbar 0a7a9beb84 Update dependency androidx.test.uiautomator:uiautomator to v2.4.0-alpha01 (#1354)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-06-27 04:09:18 +00:00
renovate[bot] b18b89db29 Update dependency androidx.test.ext:junit to v1.2.1 2024-06-27 03:54:12 +00:00
FooIbar cb2d99bdc1 Add automated baseline profile generation (#1349)
* Add automated baseline profile generation

* Create benchmark build type

And remove the `enabledRules` argument as it will be injected by
baseline profile gradle plugin.
2024-06-27 11:46:02 +08:00
renovate[bot]andFooIbar 4dd6d68163 Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-alpha07 (#1351)
* Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-alpha07

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-06-27 03:44:45 +00:00
renovate[bot] 28ecc9d479 Update dependency dev.chrisbanes.compose:compose-bom to v2024.06.00-alpha01 2024-06-26 23:16:46 +00:00
renovate[bot] c917117db3 Update kotlinx.serialization to v1.7.1 2024-06-25 17:19:22 +00:00
FooIbar 5c0d65dd60 Fix crop borders not working 2024-06-25 15:17:21 +08:00
FooIbar dfc59aa643 Target API 35 as it has reached platform stability
Still use 34 SDK in debug build as sources for 35 are not available yet.
2024-06-25 15:17:09 +08:00
renovate[bot] 6ab77e541f Update dependency com.android.application to v8.6.0-alpha07 2024-06-25 10:01:48 +08:00
renovate[bot] 6224f8f4ab Update Rust crate quick-xml to 0.34 2024-06-24 21:20:26 +00:00
renovate[bot] 3d269c4220 Lock file maintenance 2024-06-24 00:31:53 +00:00
FooIbar 176a802e96 Don't use Unicode ellipsis character for filename
It will be replaced by three dots.
2024-06-23 09:04:18 +08:00
renovate[bot] 417a06e140 Update dependency io.github.fornewid:material-motion-compose-core to v2.0.1 2024-06-22 21:19:47 +00:00
FooIbar 5c4f034532 Update Compose snapshot and vendor Reorderable
As `animateItemPlacement` has been removed.
2024-06-22 12:57:13 +08:00
FooIbar 1d50855f52 Workaround for displaying extremely long images (#1327)
* Workaround for displaying extremely long images

* Make hardware bitmap threshold configurable
2024-06-22 12:56:46 +08:00
renovate[bot] 0280450797 Update Rust crate quick-xml to 0.33 2024-06-21 16:58:19 +00:00
FooIbar d0c907c7ff Remove unused jitpack repo 2024-06-21 12:17:49 +08:00
FooIbar 1302e17c01 Migrate to ViewPager2 (#1335)
* Migrate to ViewPager2

* Remove code for unimplemented automatic background
2024-06-21 12:07:27 +08:00
FooIbar 33f83b7325 Switch PhotoView to active fork 2024-06-20 15:05:02 +08:00
FooIbar d2c49f5022 Upload all R8 reports 2024-06-19 12:26:32 +08:00
FooIbar 084883a308 Decouple CronetEngine 2024-06-19 12:14:20 +08:00
FooIbar 67a73da720 Revert "Update dependency com.android.application to v8.6.0-alpha06"
This reverts commit f2447fd122.
2024-06-19 01:21:01 +08:00
renovate[bot] f2447fd122 Update dependency com.android.application to v8.6.0-alpha06 2024-06-18 16:33:56 +00:00
FooIbar 8ddcb003e0 Move lint check to the check job (#1330)
* K2 lint

* Move lint check to the check job

* Fix CI
2024-06-18 16:25:38 +00:00
FooIbar 0bff011f72 Address deprecation 2024-06-18 18:15:29 +08:00
FooIbar f41d1d7306 Skip patching if the patch is already applied 2024-06-18 00:12:33 +08:00
renovate[bot] a30aa23b67 Update xmlutil to v0.90.1 2024-06-17 23:39:02 +08:00
FooIbar 583d30eb5f Update nettle to v3.10 2024-06-17 18:01:31 +08:00
FooIbar c53b0986a9 Use link options to exclude libarchive symbols 2024-06-17 18:00:56 +08:00
renovate[bot] 85703c8c47 Lock file maintenance 2024-06-17 07:57:38 +00:00
renovate[bot] 025ba0bf5b Lock file maintenance 2024-06-17 01:19:24 +00:00
renovate[bot] ac2def22d2 Update Rust crate android_logger to 0.14 2024-06-16 09:59:31 +00:00
FooIbar 895cfc7bc6 Minor refactor 2024-06-16 17:48:50 +08:00
FooIbar 49eb9d5077 Fix gid qualifier not working with language filter 2024-06-16 17:48:50 +08:00
FooIbar 5a3c165ff1 Update ktlint to 1.3.0 2024-06-16 17:48:50 +08:00
FooIbar 3946428df6 Migrate to the std implementation of OnceCell 2024-06-16 17:46:40 +08:00
FooIbar 471d9784d6 Use different schedule to avoid rate limits 2024-06-15 13:41:21 +08:00
FooIbar 0ba0afc0d0 Downgrade Compose to the last known good build 2024-06-14 20:44:18 +08:00
FooIbar 5049b791fb Fix FAB recomposing on item selected 2024-06-14 20:43:46 +08:00
renovate[bot] 9a3715c516 Update androidx.lifecycle to v2.8.2 2024-06-12 23:23:08 +00:00
renovate[bot] 4ee276f636 Update androidx.room to v2.7.0-alpha04 2024-06-12 20:27:55 +00:00
renovate[bot] d528b2d5d0 Update dependency io.github.petertrr:kotlin-multiplatform-diff to v0.6.0 2024-06-12 01:40:34 +00:00
FooIbar b3ee69d193 Clean up EhCookieStore 2024-06-11 14:21:51 +08:00
FooIbar f882b78ff6 Update NDK to r27 RC 1 2024-06-11 14:20:18 +08:00
renovate[bot] 7e58101a3f Update Rust crate quick-xml to 0.32 2024-06-10 15:25:59 +00:00
FooIbar 5450eb9b2b Revert "Update Compose snapshot"
This reverts commit 13cf42437f.
2024-06-10 13:04:40 +08:00
renovate[bot] 69695e3c99 Lock file maintenance 2024-06-10 01:02:53 +00:00
FooIbar 5b15059c04 Switch back to C implementation of sha1
Now that libnettle is built with hardware acceleration instructions
2024-06-09 23:11:57 +08:00
FooIbar f50d69cd60 Build libnettle with assembly code (#1292)
* Build libnettle with assembler code

* Add .gitattributes for shell script

* Patch nettle for CPU feature detection on Android

* Don't build libnettle at configuration time

* Fix build

* Refine
2024-06-09 13:49:36 +08:00
renovate[bot] df6f783a69 Update dependency com.android.application to v8.6.0-alpha05 2024-06-08 10:58:55 +00:00
Dude so hot f0291d94f9 Tell function return types to workaround compiler bug 2024-06-07 17:11:04 +08:00
Dude so hot 593f24b86f Refactor awaitInputTextWithCheckBox 2024-06-07 17:11:04 +08:00
Dude so hot 5bce898f99 Move goto dialog invalidator to use ensure 2024-06-07 17:11:04 +08:00
Dude so hot 2b444c262d Move archive dialog invalidator to use ensure 2024-06-07 17:11:04 +08:00
Dude so hot e40a7c75d9 Move page range invalidator to use ensure 2024-06-07 17:11:04 +08:00
Dude so hot 4a7c057260 Expr-ize 2024-06-07 17:11:04 +08:00
Dude so hot 229a00cd53 Let Dialog.awaitInputText use Raise to improve semantics 2024-06-07 17:11:04 +08:00
Dude so hot d2d0d880f1 Let Dialog.awaitResult use Raise to improve semantics 2024-06-07 17:11:04 +08:00
Dude so hot c5e17c1d5b Retry when FabLayoutState sync interrupted
Double click primary fab on select mode should "collapse to recompose secondary fabs" then immediately expand
2024-06-07 15:58:37 +08:00
Dude so hot 33ff2ebe06 Import arrow resilience 2024-06-07 15:58:37 +08:00
Dude so hot 5c13e188de Secondary fab recompose force fablayout collapse
Fix bug where fastly click primary fab twice on select mode, select state is cleared but secondary fabs not recomposed
2024-06-07 15:58:37 +08:00
FooIbar 60b03dcd0e Fix integrity check for non-H@H resampled images
Their URLs contain hashes for both original and resampled images.
2024-06-07 15:13:40 +08:00
renovate[bot] 4604a25f58 Update dependency io.github.fornewid:material-motion-compose-core to v2 2024-06-07 01:26:56 +00:00
FooIbar 99029b8b04 Prepare for next iteration 2024-06-06 22:07:52 +08:00
FooIbar 70f46442c6 Prepare for release 1.11.6-RC2 2024-06-06 22:07:23 +08:00
FooIbar 13cf42437f Update Compose snapshot
https://issuetracker.google.com/343750859
2024-06-06 21:54:22 +08:00
renovate[bot] 1e29f6dcb4 Update kotlinx.serialization to v1.7.0 2024-06-06 13:52:43 +00:00
renovate[bot] f25981792f Update dependency com.google.devtools.ksp to v2.0.0-1.0.22 2024-06-06 00:09:30 +00:00
FooIbar 934c8be3e4 Anti-tamper support 2024-06-04 15:13:09 +08:00
renovate[bot] b9994eacbc Lock file maintenance 2024-06-03 01:53:41 +00:00
FooIbar 704ab0ee7e Prepare for next iteration 2024-06-02 23:38:33 +08:00
FooIbar 6d1d737f9f Prepare for release 1.11.6-RC1 2024-06-02 23:38:02 +08:00
FooIbar bc75156232 Simplify ReadableTime.getFilenamableTime 2024-06-02 22:51:58 +08:00
FooIbar 2101ea7a36 Update mime types based on Android's mime.types 2024-06-02 22:22:42 +08:00
FooIbar 26921c8ae1 Fix data export/import on Android V
The mime type mapping for sqlite files was added in
https://r.android.com/2988915.
2024-06-02 22:22:42 +08:00
FooIbar be1eecf3b5 Use official coroutines API instead of manual cast 2024-06-02 19:49:21 +08:00
FooIbar 2d4f154c9b Prevent async failure from cancelling parent scope 2024-06-02 19:49:21 +08:00
renovate[bot] d82cbe51ba Update dependency io.github.fornewid:material-motion-compose-core to v1.2.1 2024-06-02 03:13:01 +00:00
FooIbar d13ffa93ba Workaround for navigation bars padding on API < 28 2024-06-01 22:34:30 +08:00
FooIbar 2cce55953f Fix quick search and download label reordering
This is a regression introduced by 6277d7d.
2024-06-01 22:15:44 +08:00
FooIbar 07d100fcc0 Show navigation drawer only on top-level screens (#1266)
* Show navigation drawer only on top-level screens

* Remove redundant `rememberUpdatedState`
2024-06-01 18:59:16 +08:00
FooIbar cc04371181 Fix navigation drawer overlapping side sheet 2024-06-01 13:08:49 +08:00
github-actions[bot] ee50c88765 Update Chrome version for default User-Agent 2024-06-01 09:02:43 +08:00
renovate[bot] efc5b55ea7 Update dependency gradle to v8.8 2024-05-31 23:42:12 +00:00
FooIbar 94af66156a Replace invalid/consecutive whitespaces in query 2024-06-01 01:52:03 +08:00
FooIbar 4861359f9e Make secondary FAB offset density-aware 2024-06-01 01:51:40 +08:00
renovate[bot] 5af167dab4 Update compose.destinations to v2.1.0-beta09 2024-05-31 14:19:32 +00:00
renovate[bot] db1f0bc6d7 Update dependency com.android.application to v8.6.0-alpha04 2024-05-30 23:33:55 +00:00
renovate[bot] b94a843ec5 Update aboutlibraries to v11.2.1 2024-05-30 08:27:09 +00:00
FooIbar b27d214f24 Use Non-H as default category for guest mode
Don't modify the URL builder.
2024-05-30 10:57:26 +08:00
FooIbar a81eb9d17b Fix default value 2024-05-30 10:57:26 +08:00
FooIbar ec9b85f30f Refactor to not get sign-in state from cookies 2024-05-30 10:57:26 +08:00
FooIbar 8ac2f33949 Update liblzma to v5.6.2 2024-05-30 09:32:18 +08:00
FooIbar d84198ab28 Move Compose out of snapshot 2024-05-30 09:22:20 +08:00
renovate[bot] 34d339d9f1 Update compose.destinations to v2.1.0-beta08 2024-05-30 00:26:53 +00:00
renovate[bot] bcfefc7c76 Update dependency dev.chrisbanes.compose:compose-bom to v2024.05.00-alpha03 2024-05-29 21:16:26 +00:00
renovate[bot] 62539dc48e Update dependency androidx.appcompat:appcompat to v1.7.0 2024-05-29 21:15:22 +00:00
renovate[bot] 453ab11395 Update androidx.lifecycle to v2.8.1 2024-05-29 18:36:58 +00:00
renovate[bot] b2246b980a Update androidx.room to v2.7.0-alpha03 2024-05-29 18:36:07 +00:00
FooIbar 822a461acd Use All as default recent download label 2024-05-28 22:46:18 +08:00
renovate[bot] 25e5c0ab8e Lock file maintenance 2024-05-27 01:53:10 +00:00
FooIbar 2a55db95f4 Workaround for ReaderPageSheet clipped on API < 28 2024-05-26 17:17:50 +08:00
FooIbar a144866182 Use commit time instead for reproducible builds 2024-05-25 16:56:17 +08:00
FooIbar be7a04a4cb Move kotlin options to kotlin block 2024-05-24 22:18:18 +08:00
renovate[bot] fd1b861dab Update dependency com.android.application to v8.6.0-alpha03 2024-05-24 01:09:17 +00:00
FooIbar 957ebd35aa Update Compose snapshot
https://issuetracker.google.com/333584635
2024-05-23 16:31:14 +08:00
FooIbar 29d8b11771 Fix quota exceeded exceptions being swallowed 2024-05-22 18:37:28 +08:00
renovate[bot] c87059e9d7 Update Kotlin & KSP 2024-05-22 09:51:29 +08:00
renovate[bot] 4babe2eec4 Update aboutlibraries to v11.2.0 2024-05-21 23:45:18 +00:00
FooIbar 48fdaaca0c Fix race condition of ComicInfo.xml modification 2024-05-21 19:54:41 +08:00
FooIbar f0ee88b4d6 [no ci] Fix renovate config 2024-05-21 17:32:37 +08:00
FooIbar 9210780b6b Fix renovate false positive 2024-05-21 17:26:30 +08:00
FooIbar b479e28543 Initial support for importing downloaded archives 2024-05-21 14:20:57 +08:00
FooIbar f93b98fc5e Fix user input not being used when rating gallery 2024-05-20 11:51:29 +08:00
renovate[bot] 4721d1011b Lock file maintenance 2024-05-20 00:43:28 +00:00
FooIbar 4da4443e67 [no ci] Remove unused res 2024-05-20 00:25:13 +08:00
FooIbar e5343f4360 Don't package 32-bit x86 libs into universal apk 2024-05-20 00:24:05 +08:00
FooIbar 86323220dc Prepare for next iteration 2024-05-19 23:06:35 +08:00
FooIbar ada8f3af75 Prepare for release 1.11.5 2024-05-19 23:06:00 +08:00
FooIbar fb940d3982 Group downloads by artist if no labels are defined 2024-05-19 23:02:29 +08:00
FooIbar 8e8729c25f Introduce AppConfig.isSnapshot 2024-05-19 23:01:25 +08:00
FooIbar ffdd063ca1 Revert "Update Compose snapshot"
This reverts commit e6bdaf1172.

Reason for revert: https://issuetracker.google.com/341320533
2024-05-19 20:44:51 +08:00
FooIbar dfd5c6c70e Remove unnecessary synchronization
We use thread-safe methods now.
2024-05-19 20:32:08 +08:00
FooIbar 3068aab681 Use CI update channel by default for snapshots (#1223)
* Use CI update channel by default for snapshots

And use build time as initial update time.

* Fix build time
2024-05-19 20:25:59 +08:00
renovate[bot] e402587f8f Update plugin composeCompilerReportGenerator to v1.3.1 2024-05-19 10:52:18 +00:00
FooIbar 00b1be879d Fix app language out of sync with system settings (#1221)
* Fix app language out of sync with system settings

* Manually update current language

Recomposition may not happen when current language is the same as system
 default.
2024-05-19 10:43:24 +00:00
ɴᴇᴋᴏ e63bd49a4c Update TW Translation (#1081)
* Add new TW Translation

* Fix translation

* change translate

* Update strings.xml

* Update strings.xml

* Update strings.xml

* Update strings.xml

* change to '圖庫'

* 更新 strings.xml

* space

* fix

* Update strings.xml

* Update strings.xml

* Update strings.xml

* Update strings.xml
2024-05-19 15:41:10 +08:00
renovate[bot] 8131170eb1 Update compose.destinations to v2.1.0-beta07 2024-05-18 20:13:22 +00:00
FooIbar dc1abd3806 Migrate to Compose Material3 Adaptive (#1219)
* Migrate to Compose Material3 Adaptive

* Fix R8
2024-05-18 20:56:03 +08:00
FooIbar 468fbd50da Fix tap zone overlay not following inversion 2024-05-18 18:53:26 +08:00
FooIbar f2011f9b6f Fix reader tap zone inversion not working 2024-05-18 18:53:26 +08:00
FooIbar 1e53a9b389 Make sure favorites don't have the same timestamp 2024-05-18 10:46:46 +08:00
renovate[bot] dc2504b67f Update dependency com.android.application to v8.6.0-alpha02 2024-05-17 23:06:40 +00:00
FooIbar 2ae3e3b64c Reland "Use autogenerated localeConfig"
Reland as https://issuetracker.google.com/294109810 has been fixed.
2024-05-17 23:50:48 +08:00
FooIbar e6bdaf1172 Update Compose snapshot
https://issuetracker.google.com/339188523
2024-05-17 14:34:53 +08:00
FooIbar 36a66d9199 Revert "Workaround for renovate false positive"
This reverts commit fb6fbb8df9.
2024-05-17 14:23:21 +08:00
FooIbar fb6fbb8df9 Workaround for renovate false positive 2024-05-17 12:17:12 +08:00
renovate[bot] ef8449dc02 Update compose.destinations to v2.1.0-beta06 2024-05-16 16:06:28 +00:00
FooIbar b59f8e9ade Use Non-H category as homepage in guest mode 2024-05-16 01:46:14 +08:00
FooIbar a49506f4a0 Update Compose snapshot to fix item clipping
https://issuetracker.google.com/340201510
2024-05-15 21:26:07 +08:00
FooIbar 4ce3d25eed Remove unused code 2024-05-15 17:28:42 +08:00
FooIbar 81b166bee1 Unpin dependencies 2024-05-15 10:58:53 +08:00
renovate[bot] 37a587859a Update dependency dev.chrisbanes.compose:compose-bom to v2024.05.00-alpha02 2024-05-15 10:47:04 +08:00
renovate[bot] b7544630bb Update dependency com.android.application to v8.6.0-alpha01 2024-05-15 02:43:51 +00:00
renovate[bot] 05c7a0fa39 Update dependency androidx.paging:paging-compose to v3.3.0 2024-05-15 02:43:16 +00:00
renovate[bot] eee7655f80 Update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.6.0 2024-05-15 02:42:54 +00:00
renovate[bot] 9390813c48 Update dependency androidx.lifecycle:lifecycle-runtime-compose to v2.8.0 2024-05-15 02:42:37 +00:00
renovate[bot] d032fbdd67 Update dependency androidx.annotation:annotation to v1.8.0 2024-05-14 23:15:41 +00:00
renovate[bot] adcd73a590 Update dependency androidx.appcompat:appcompat to v1.7.0-rc01 2024-05-14 23:15:00 +00:00
renovate[bot] 87b405bf1f Update androidx.room to v2.7.0-alpha02 2024-05-14 17:41:39 +00:00
renovate[bot] d8306e2c80 Update androidx.lifecycle to v2.8.0 2024-05-14 17:41:20 +00:00
FooIbar c03fe9b51e Address java.util.regex.Pattern usage 2024-05-15 01:31:54 +08:00
FooIbar 9099014d28 Remove reference of "Sign in via cookies" 2024-05-15 01:31:54 +08:00
FooIbar d7b3872486 Support autofill in SignInScreen 2024-05-15 01:31:54 +08:00
FooIbar 4ae2af0bef Adjust SignInScreen layout 2024-05-15 01:31:54 +08:00
FooIbar c9bcd46b77 Revert "Drop basic login as captcha is mandatory now"
This reverts commit e07aab4434.
2024-05-15 01:31:54 +08:00
FooIbar e531653634 Workaround for archive list crash when scrolling
It has fixed size and we don't actually expect its items to be reused.
2024-05-14 13:59:24 +08:00
renovate[bot]andFooIbar a29e4c72b1 Update Kotlin & KSP (#1171)
* Update Kotlin & KSP

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-05-14 12:14:54 +08:00
FooIbar 9e1f7ca051 Fix crash in favorites caused by duplicate items 2024-05-13 22:42:39 +08:00
renovate[bot] fbbc347411 Update dependency sh.calvin.reorderable:reorderable to v2.1.1 2024-05-13 04:11:24 +00:00
renovate[bot] ea364536a4 Lock file maintenance 2024-05-13 01:32:13 +00:00
github-actions[bot] 575fc9e94c Update Chrome version for default User-Agent 2024-05-12 14:53:50 +08:00
FooIbar 703c63125a [no ci] Don't push to main branch directly 2024-05-12 14:42:53 +08:00
FooIbar b205b5e120 Keep default User-Agent updated 2024-05-12 11:44:28 +08:00
FooIbar e27f36d2c8 Don't swallow exceptions when importing database 2024-05-12 11:39:29 +08:00
FooIbar d582eddc03 Update Corrosion to v0.5 2024-05-12 02:08:29 +08:00
FooIbar 3b83d8744c Revert "Update dependency com.android.application to v8.5.0-beta01"
This reverts commit 7c39b95025.
2024-05-11 13:18:20 +08:00
renovate[bot] 68a5217b1c Lock file maintenance 2024-05-11 04:39:15 +00:00
FooIbar c01082b822 Revert pointless bumps and check in Cargo.lock 2024-05-11 12:26:25 +08:00
FooIbar bb95c86320 Update Compose snapshot 2024-05-11 11:56:41 +08:00
FooIbar d398926aeb Simplify rating widget implementation 2024-05-11 03:23:40 +08:00
FooIbar 7b23efb0ce Fix rememberMutableStateInDataStore persistence 2024-05-11 03:22:22 +08:00
FooIbar 7818ff197c Fix R8 2024-05-11 03:21:37 +08:00
FooIbar 95bfc4f8c5 Introduce AnchoredHorizontalDraggable to prevent unintentional drags 2024-05-11 03:21:37 +08:00
FooIbar c750016034 Revert "Revert "Drop experimental touch slop factor setting" (#1162)"
This reverts commit a4619547f1.
2024-05-11 03:21:37 +08:00
FooIbar 6298e501cd Save minimum rating search option in preference (#1163) 2024-05-11 03:18:01 +08:00
renovate[bot] 7c39b95025 Update dependency com.android.application to v8.5.0-beta01 2024-05-10 18:46:00 +00:00
renovate[bot] 02c1e630d1 Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-android to v1.8.1 2024-05-10 11:36:12 +00:00
GG Bond 8f3b0cc536 Refine naming 2024-05-10 19:27:45 +08:00
GG Bond d0c5ef8e8a Refine naming 2024-05-10 19:27:45 +08:00
GG Bond d628024637 Refine 2024-05-10 19:27:45 +08:00
GG Bond fe1249630b Convert FavDialogTheta to use rememberInDataStore 2024-05-10 19:27:45 +08:00
GG Bond cdbe3cf728 Drop unused avatar pref 2024-05-10 19:27:45 +08:00
GG Bond f5e36bc0cf Initialize dataStateFlow on app start 2024-05-10 19:27:45 +08:00
GG Bond 4f9bfe13cb Move SearchCategory to use rememberInDataStore 2024-05-10 19:27:45 +08:00
GG Bond 959da21b9d Introduce rememberInDataStore 2024-05-10 19:27:45 +08:00
renovate[bot]andGG Bond fae2b1f416 Cleanup rememberInVM family (#1166)
* Update DataStore to 1.1.1 for future `rememberInDataStore` impl

* Cleanup `rememberInVM` family

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-05-10 06:15:18 +00:00
GG Bond a054633d0a Update DataStore to 1.1.1 for future rememberInDataStore impl 2024-05-10 13:49:36 +08:00
FooIbar a4619547f1 Revert "Drop experimental touch slop factor setting" (#1162)
* Revert "Drop experimental touch slop factor setting"

This reverts commit d5d8a828ef.

Reason for revert: After some more testing I think sadly we still need it.

* Read touch slop factor as state
2024-05-10 13:08:32 +08:00
FooIbar 5d53febb15 Show gallery pages in thumbnail mode (#1164) 2024-05-10 04:41:42 +00:00
FooIbar 3da1587924 Use HapticFeedback in ChapterNavigator as well 2024-05-10 12:22:09 +08:00
FooIbar 971d0307fe Inline DragHandle as it's redundant now 2024-05-10 12:22:09 +08:00
FooIbar 705d3afb78 Refactor haptic feedback on reordering 2024-05-10 12:22:09 +08:00
renovate[bot] bc34b4b9c1 Update dependency sh.calvin.reorderable:reorderable to v2.1.0 2024-05-09 09:59:57 +00:00
FooIbar a2ac01fcdc Revert "Update dependency sh.calvin.reorderable:reorderable to v2.0.4"
This reverts commit 4cea8d0090.

Reason for revert: The item being dragged becomes invisible.
2024-05-09 14:44:10 +08:00
FooIbar 645ebddd4f Fix crash when saving unloaded images 2024-05-09 14:23:11 +08:00
FooIbar d5d8a828ef Drop experimental touch slop factor setting 2024-05-09 12:18:59 +08:00
FooIbar 96d4193d2d Fix system bars insets in fullscreen on API < 30 2024-05-09 12:14:59 +08:00
FooIbar 18e4afdff9 Update Compose snapshot 2024-05-09 12:13:28 +08:00
FooIbar 19a702ffc4 Migrate to main artifact of AndroidX WorkManager
`work-runtime-ktx` is empty since 2.9.0
2024-05-08 17:55:39 +08:00
renovate[bot] cfd44c256f Update compose.destinations to v2.1.0-beta05 2024-05-07 23:13:30 +00:00
renovate[bot] 4cea8d0090 Update dependency sh.calvin.reorderable:reorderable to v2.0.4 2024-05-07 19:49:57 +00:00
FooIbar 30e166b29c Fix DownloadService state not cleared 2024-05-07 16:34:23 +08:00
FooIbar c50f3d8c5b Fix tap control area shifting after zooming out 2024-05-07 15:37:38 +08:00
FooIbar d9249eeedb Fix tap control area shifting in multi-window mode 2024-05-07 15:37:38 +08:00
FooIbar 51699cafe6 Constrain minimum width of reader bottom bar menus 2024-05-07 15:37:17 +08:00
FooIbar ce97976bdd Refactor bottom bar icon dropdown menus in reader
Avoid hard-coded width and offset.
2024-05-07 15:37:17 +08:00
renovate[bot]andFooIbar 7b8a12e3eb Update dependency sh.calvin.reorderable:reorderable to v2.0.3 (#1143)
* Update dependency sh.calvin.reorderable:reorderable to v2.0.3

* Address deprecation

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-05-07 03:49:33 +00:00
FooIbar 7276c37c54 Don't constrain menu's width 2024-05-07 01:17:55 +08:00
FooIbar 4ec7de611c Introduce DropdownFilterChip for SearchFilter 2024-05-07 01:17:55 +08:00
FooIbar 0295c40b02 Implement fullscreen mode in new reader 2024-05-06 19:53:32 +08:00
FooIbar 035fa44523 Correctly handle display cutout (#1139) 2024-05-06 14:34:22 +08:00
renovate[bot] 60c6618db1 Update compose.destinations to v2.1.0-beta04 2024-05-05 23:53:49 +00:00
FooIbar f35643b2b6 Correctly handle window insets in reader
Now it's actual edge-to-edge.
2024-05-06 07:46:15 +08:00
FooIbar b25661c436 Revert "Clarify message for no current torrents"
This reverts commit 49d4ae07

Reason for revert: We list outdated torrents as well after torrent
dialog overhaul.
2024-05-05 18:05:40 +08:00
FooIbar cea06f0c7e Disable abortOnError for lint in debug build
[no ci]
2024-05-05 17:16:16 +08:00
FooIbar 7de6a821d9 Drop 32-bit x86 support 2024-05-05 11:17:26 +08:00
FooIbar 13be4e4eb1 Remove Navigation Compose dependency
It's transitively provided by Compose Destinations, we should not
directly depend on it in case they are incompatible.
2024-05-05 07:58:46 +08:00
renovate[bot] 691e7c3ba7 Update compose.destinations to v2.1.0-beta03 2024-05-04 18:08:26 +00:00
FooIbar 31aea1cdbf Fix duplicate key in search suggestions 2024-05-05 01:59:49 +08:00
FooIbar 97d5642427 Run download item restoration in parallel 2024-05-04 18:52:05 +08:00
FooIbar c68272c1a4 Fix download item restoration not bailing on error 2024-05-04 17:59:34 +08:00
renovate[bot] a69dc994b3 Update dependency sh.calvin.reorderable:reorderable to v2.0.1 2024-05-04 09:27:19 +00:00
renovate[bot] d79a71c764 Update dependency dev.chrisbanes.compose:compose-bom to v2024.05.00-alpha01 2024-05-04 08:31:58 +00:00
renovate[bot] 35183de477 Update dependency androidx.navigation:navigation-compose to v2.8.0-alpha08 2024-05-04 16:31:41 +08:00
FooIbar 21b9fe3cb2 Update to snapshot Compose and remove workaround (#1050)
* Update to snapshot Compose

* Fix dep

* Revert "More workaround"

This reverts commit 9013778f58.

* Revert "Workaround for lazy layout lagging (#1042)"

This reverts commit b83e0fd0

* Revert "Workaround for comment list lagging at the bottom"

This reverts commit 45be957df5.

* Fix minOffset for blur radius calculation

Also use `onSizeChanged` instead of `onGloballyPositioned` as
measurement happens before placement.
2024-05-04 16:22:01 +08:00
FooIbar 5762b0bfc3 Disallow screen capture on identity cookies dialog 2024-05-04 11:30:34 +08:00
renovate[bot] 3473e91747 Update dependency com.android.application to v8.5.0-alpha08 2024-05-03 23:07:00 +00:00
renovate[bot]andFooIbar 6277d7d41d Update dependency sh.calvin.reorderable:reorderable to v2 (#1120)
* Update dependency sh.calvin.reorderable:reorderable to v2

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-05-03 09:36:56 +00:00
renovate[bot] f22da2b771 Revert androidx navigation update 2024-05-03 17:07:55 +08:00
FooIbar 3466bbd64a Disable grouping for AndroidX dependencies 2024-05-03 16:33:25 +08:00
FooIbar 49fc87621c Revert "Limit workflow concurrency"
This reverts commit e81092d42c.
2024-05-03 16:33:25 +08:00
GG Bond 7e558f4478 DialogState.bgWork doesn't show dialog if work doesn't suspend 2024-05-03 15:29:13 +08:00
FooIbar 307624ca9a Copy invalid filename handling logic from AOSP 2024-05-03 15:29:00 +08:00
FooIbar 40e66b919a Move ArchiveList and TorrentList to separate files (#1113)
* Move ArchiveList and TorrentList to separate files

GalleryDetailScreen is too long

* Refactor with deferred archive and torrent results
2024-05-03 07:27:57 +08:00
FooIbar cf2e0aadd5 [no ci] Fix renovate config 2024-05-02 13:56:25 +08:00
FooIbar 1b523f6a78 [no ci] Tweak renovate config 2024-05-02 13:48:50 +08:00
renovate[bot] 6a9f6bb645 Drop obsolete flag
Room generate kotlin by default now.
2024-05-02 07:17:16 +08:00
renovate[bot] 45602b05c6 Update aboutlibraries to v11.1.4 2024-05-01 19:09:42 +00:00
renovate[bot] 8dc842e125 Update AndroidX & Jetpack Compose 2024-05-01 19:09:18 +00:00
renovate[bot] 9dfc3a49fe Update Rust crate tl to 0.7.8 2024-05-01 17:10:59 +00:00
renovate[bot] 97d4a61140 Update Rust crate serde_cbor to 0.11.2 2024-05-01 17:10:41 +00:00
renovate[bot] 8b596e2274 Update Rust crate sha1 to 0.10.6 2024-05-01 17:10:15 +00:00
renovate[bot] 123b86830b Update Rust crate serde to 1.0.200 2024-05-01 16:40:54 +00:00
renovate[bot] e11f5615a1 Update Rust crate regex-lite to 0.1.5 2024-05-01 14:16:12 +00:00
FooIbar 31fb2ed2b1 Address renovate warning
[no ci]
2024-05-01 22:15:59 +08:00
renovate[bot] 9c12d11c85 Update Rust crate serde to 1.0.199 2024-05-01 14:14:59 +00:00
renovate[bot] aea0e885c3 Update Rust crate log to 0.4.21 2024-05-01 12:43:51 +00:00
renovate[bot] f34ff71145 Update Rust crate jni to 0.21.1 2024-05-01 12:43:29 +00:00
FooIbar 820c16e86b Tweak image limits dialog 2024-05-01 19:39:24 +08:00
renovate[bot] a335348b1a Update Rust crate android_logger to 0.13.3 2024-05-01 10:41:05 +00:00
renovate[bot] 7f134e1995 Update Rust crate anyhow to 1.0.82 2024-05-01 10:40:43 +00:00
FooIbar 9e13c1c3db Revert "Update Kotlin & KSP (#1084)"
This reverts commit 9ff74e789c.

Reason for revert: crash
2024-05-01 01:29:14 +08:00
FooIbar 61161cef0f Torrent dialog overhaul 2024-05-01 01:06:57 +08:00
renovate[bot]andFooIbar 9ff74e789c Update Kotlin & KSP (#1084)
* Update Kotlin & KSP

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-04-30 12:48:06 +00:00
FooIbar 45183df640 Avoid packing/unpacking and use pre-allocated list 2024-04-30 17:13:59 +08:00
FooIbar 22f11994f5 Remove obsolete workaround 2024-04-30 12:46:46 +08:00
renovate[bot] bc7aa832b7 Update dependency com.android.application to v8.5.0-alpha07 2024-04-29 21:37:45 +00:00
FooIbar b32f78ea9f Archive dialog overhaul 2024-04-29 23:49:40 +08:00
FooIbar 78002dac3a Use proper placeholder instead of 0 in image limit 2024-04-29 16:29:46 +08:00
renovate[bot]andGG Bond aca70354e7 Refactor FabBuilder interface & refine suspend dialog naming (#1082)
* `FabLayoutValue` is `Stable`

* FabBuilder accepts a autoClose

* Refactor control flow to pattern matching expression and avoid exception

* Close fab on DatePicker selected

* Refine naming

* Introduce `SnapshotStateMap<K, V>.takeAndClear()`

* PutAll action use `autoClose = false`

* Handle exceptions

* Cleanup

* Handle potential e

* Refine to use autoClose

* FabLayout should use parent Screen CoroutineScope

* Use implicit context

* Introduce `runSwallowingWithUI`

* log exception as well

* Refine naming

* Cleanup with `runSwallowingWithUI`

* Refine naming again

* Fixup

* Remove redundant logcat

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-04-29 04:20:37 +00:00
FooIbar d7a3471b9b Fix side drawer anchor updates during initial open 2024-04-28 23:43:55 +08:00
FooIbar e81092d42c Limit workflow concurrency
[no ci]
2024-04-28 18:51:11 +08:00
renovate[bot] d06df3c819 Update dependency me.saket.telephoto:zoomable to v0.11.2 2024-04-28 10:17:26 +00:00
FooIbar 050bfea8f2 Parse favorite categories from user config page 2024-04-28 18:09:17 +08:00
renovate[bot] 7b84c74abf Update dependency me.saket.telephoto:zoomable to v0.11.1 2024-04-28 06:46:40 +00:00
FooIbar 009c49cd89 Don't fail silently if can't install update 2024-04-28 14:37:31 +08:00
renovate[bot] ca023f73f4 Update dependency me.saket.telephoto:zoomable to v0.11.0 2024-04-28 05:53:51 +00:00
renovate[bot]andFooIbar 456dfd2aac Update compose.destinations to v2.1.0-beta02 (#1073)
* Update compose.destinations to v2.1.0-beta02

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-04-28 05:45:03 +00:00
renovate[bot] 0c0291127c Revert "Drop Xjvm-default=all"
This reverts commit df1efa7604.
2024-04-27 16:59:41 +08:00
FooIbar fe0c74de23 MimeTypeMap is case-sensitive prior to Android O
https://android-review.googlesource.com/251120
2024-04-27 16:54:06 +08:00
renovate[bot] df1efa7604 Drop Xjvm-default=all
We are not a library intended for Javaers nor do we have any Java code to interop so this is meaningless and safely to drop
2024-04-27 03:41:54 +08:00
FooIbar 73122fc517 Workaround for SearchBar reopen in non-touch mode 2024-04-27 03:34:27 +08:00
renovate[bot] b506ba277c Drop -Xlambdas=indy
https://kotlinlang.org/docs/whatsnew-eap.html#generate-lambda-functions-using-invokedynamic
2024-04-26 23:00:41 +08:00
dasoopsandFooIbar ea3aed8fae Reload metadata (#1058)
* Reload metadata

* Remove pages check and Refactor

* Check metadata stable

* Run in parallel

* Refactor postedTime

* Remove concurrency limit

* Update translation

* Update translate

Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>

* `parseDate` return timestamps

* Remove unused import

* Show Snackbar after the update

* Revert EndLine

* use localContext

* Extend the range of `runSuspendCatching`

---------

Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-04-26 21:05:52 +08:00
FooIbar 481bb8e7d4 Update libarchive to v3.7.4 2024-04-26 19:01:03 +08:00
FooIbar 0ed8c40dbf Improve a11y by limiting grid item's aspect ratio 2024-04-26 18:08:32 +08:00
FooIbar d267d7c3b0 [no ci] Change links in README to use https 2024-04-26 17:48:27 +08:00
FooIbar a04206f600 Refine UniFile and evict lookup cache on delete
Also add comments on functions that rely on implementation details.
2024-04-26 15:46:47 +08:00
FooIbar 8d64a6f1b2 Update ndk and support 16 KB page sizes (#1057)
* Update ndk and support 16 KB page sizes

* Fix CI

* Update graphics-path and pass linker flag to rustc
2024-04-25 14:37:01 +00:00
dasoops b3f614e150 Sort artists by gallery count (#1059)
* Sort artists by number of galleries

* Sorted in DB query
2024-04-25 11:23:11 +00:00
renovate[bot]andGG Bond 988fae56fd Add fake implicit syntax for migration (#1056)
* Add fake `implicit` syntax

* Refine

* Refine

* Refine

* Refine

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-04-25 00:17:33 +08:00
FooIbar fa439fc62d Switch back to GitHub xz repo
It should be faster.
2024-04-24 22:05:35 +08:00
GG Bond c58b2d6156 Cleanup realPadding calculation 2024-04-24 19:40:30 +08:00
GG Bond 62c56b7918 Add missing lazy item key 2024-04-24 19:40:30 +08:00
GG Bond 73882ab55d Cleanup DownloadsScreen to use implicit context 2024-04-24 19:17:34 +08:00
490ea2b521 Add Option to Select Downloads Grouping Mode (#998)
* Add Option to Select Downloads Grouping Mode

* hide Drag and Edit Button when Mode is Artist

* Revert "hide Drag and Edit Button when Mode is Artist"

some changes are not filtered when pushed

This reverts commit 319812e156f61c32250d908ed5ed22720ea0c6b7.

* hide Drag and Edit Button when Mode is Artist

* declared is typo

* use ComicInfo.penciller

* remove BaseGalleryInfo.artist

* Correct invalidate key

* reImport kotlin.math.roundToInt, it was incorrectly deleted

* use movableContentOf

* optimize imports

* use remember not rememberInVM

* Get DownloadInfo.artists from Database or `ComicInfo.xml`

* refactor

* unknown artist group

* redundant parameter

* reformat code

* SearchBar title and hint

* Translation

* Fix when initially loaded, the count of DownloadLabel is zero.

* lazy invalid

* use remember not rememberInVM

* refactor

* Fix LazyColumn not updated

* refactor

* Hide some Button in Artist Mode

* Revert

* Fix update labelList not updated UI

* Revert reFormat

* use trailing lambda

* Revert rememberUpdatedState

* Translate

* use buildMap

* Move ARTIST to DOWNLOAD_ARTIST

* Revert multi-line for chained Modifier

* Generate DownloadInfo.artistInfoList after writeComicInfo and restoreDownload

* Fixed crash after download gallery

* Use a composite key for DOWNLOAD_ARTISTS

* Make artists non-null

* Refactor

* Only update artist info when writing comic info

* Separate list for pending artist info

* Remove unused

* Put download artist when import database

* Use a composite key of GID and ARTIST

* Refactor

* Cache labelList

* named lambda parameters

* Refactor to avoid `mutex`

* follow up on `Make artists non-null`

* ArtistList order by ARTIST

* Lift EhTagDatabase check

* Translate artist in download title

* Refactor

* Refactor readMetadataFromLocal

Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>

* Do not update the DB when the `artists` is empty

* Remove unused

---------

Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
Co-authored-by: GG Bond <whatever@tagkong.com>
2024-04-24 11:01:53 +00:00
GG Bond 7116871652 Avoid implement a CancellableContinuation
Let compiler do CPS transform
2024-04-24 18:43:21 +08:00
FooIbar cca374c774 Refactor UniFile.fromUri for tree uri
This reverts b39e244 ("Fix `UniFile.fromUri` for children of tree uri")
and 3978abe ("Fix UniFile.fromUri() for 2 path segments tree uri").
2024-04-24 17:48:41 +08:00
FooIbar 3e0dbf92d0 Fix search bar offset not being reset 2024-04-22 12:49:03 +08:00
renovate[bot] 2747ae674c Update dependency sh.calvin.reorderable:reorderable to v1.5.2 2024-04-21 20:20:31 +00:00
FooIbar e85ec5aaba Code cleanup 2024-04-21 23:42:55 +08:00
FooIbar d4894e066b Prepare for next iteration 2024-04-21 22:47:04 +08:00
FooIbar 71a4e84d7c Prepare for release 1.11.4 2024-04-21 22:45:54 +08:00
FooIbar d6c36146ba Fix losing reading progress on reading mode change 2024-04-21 22:35:22 +08:00
FooIbar 9013778f58 More workaround 2024-04-21 18:05:25 +08:00
renovate[bot] 1af03dd145 Update dependency sh.calvin.reorderable:reorderable to v1.5.1 2024-04-20 16:46:53 +00:00
FooIbar b83e0fd092 Workaround for lazy layout lagging (#1042) 2024-04-20 16:37:41 +00:00
GG Bond 1f8d786d05 Simplify to use Modifier.offset 2024-04-20 18:31:22 +08:00
GG Bond 5d87a4ada0 Never have a clipped shadow 2024-04-20 18:31:22 +08:00
GG Bond 4d4fb1e398 Eliminate unnecessary Column 2024-04-20 17:10:33 +08:00
GG Bond 05eea54f06 Fix primaryFab appear anim 2024-04-20 17:10:33 +08:00
GG Bond a00d9ef765 Mitigate shadow being clipped 2024-04-20 17:10:33 +08:00
GG Bond aa6ddac9c5 Avoid unnecessary zIndex 2024-04-20 17:10:33 +08:00
GG Bond 9a6f17c745 Image Search Card doesn't need to be scrollable now 2024-04-20 17:10:33 +08:00
GG Bond 980977aaf3 Ensure Image Search Card's shadow not being clipped 2024-04-20 17:10:33 +08:00
GG Bond 3ed0afaf91 Restore an alpha usage can be safely applied 2024-04-20 17:10:33 +08:00
GG Bond 250adb4b33 Fix shadow being clipped 2024-04-20 17:10:33 +08:00
GG Bond 0baf09cb53 Codestyle fix for DownloadCard 2024-04-20 17:10:33 +08:00
FooIbar d04a914b9b Tweak gallery card alignment and ensure min height 2024-04-19 19:08:21 +08:00
renovate[bot] 59775cb27c Update dependency com.android.application to v8.5.0-alpha06 2024-04-18 22:06:24 +00:00
GG Bond fb76cd7b1b Move compose out of snapshot 2024-04-18 11:25:52 +08:00
renovate[bot] 52fb5306b6 Update dependency dev.chrisbanes.compose:compose-bom to v2024.04.00-alpha02 2024-04-18 01:03:11 +00:00
renovate[bot] 74f7d95718 Update AndroidX & Jetpack Compose 2024-04-17 18:12:27 +00:00
renovate[bot] bcc1b78c7c Update compose snapshot 2024-04-18 00:00:56 +08:00
FooIbar 3978abea87 Fix UniFile.fromUri() for 2 path segments tree uri 2024-04-17 17:38:51 +08:00
FooIbar 556b726349 Update to follow the latest material slider specs
Tick size is 4 dp now.
2024-04-16 10:49:10 +08:00
FooIbar e0f16f31e6 Automatically backup data before updating 2024-04-16 00:08:30 +08:00
FooIbar b39e24467c Fix UniFile.fromUri for children of tree uri 2024-04-15 23:50:54 +08:00
FooIbar 65613f07ba Optimize DownloadCard interaction in select mode 2024-04-15 21:53:37 +08:00
FooIbar 666a7e4d77 Allow disable list item animations on API 29+ (#1024)
* Allow disable list item animations on API 29+

* Update list item animations setting description
2024-04-15 14:54:13 +08:00
renovate[bot] cf08bfdd9b Update dependency me.saket.telephoto:zoomable to v0.10.0 2024-04-14 21:58:40 +00:00
renovate[bot]andFooIbar 1f47d56c55 Update Kotlin, KSP and Compose Compiler (#1009)
* Update Kotlin, KSP and Compose Compiler

* Migrate to new compose compiler gradle plugin

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-04-14 14:38:22 +00:00
FooIbar 1a7dde848f Don't treat warnings as errors on debug build 2024-04-14 17:56:55 +08:00
GG Bond c8207308a8 Update predictive back animations to use interpolation curve of (0.1, 0.1, 0, 1) 2024-04-14 17:38:03 +08:00
renovate[bot] f23020cc6f Update dependency sh.calvin.reorderable:reorderable to v1.5.0 2024-04-12 18:46:12 +00:00
renovate[bot] 555e487f1e Update dependency com.android.application to v8.5.0-alpha05 2024-04-11 18:20:21 +00:00
renovate[bot] 107bb0b15d Update aboutlibraries to v11.1.3 2024-04-09 19:14:59 +00:00
FooIbar 87a2de393e Tweak select item dialog style 2024-04-10 03:04:49 +08:00
renovate[bot] a7e4412454 Update dependency com.mikepenz.aboutlibraries.plugin to v11.1.2 2024-04-09 14:42:54 +00:00
FooIbar 7dce4cfa8e Update Compose snapshot 2024-04-09 22:12:49 +08:00
FooIbar 2b30aca47c Update R8 and remove workaround 2024-04-09 21:44:57 +08:00
FooIbar 0073d2862b Fixed crash on deleting a label after renaming it 2024-04-09 18:39:25 +08:00
FooIbar b182c97185 Fix titleless select item dialog top padding 2024-04-09 10:46:44 +08:00
renovate[bot] a32119bada Update dependency com.android.application to v8.5.0-alpha04 2024-04-08 19:37:35 +00:00
FooIbar a928cfd066 Update libarchive to v3.7.3 2024-04-09 00:08:01 +08:00
FooIbar 8c7a371336 Highlight selected item in select item dialog 2024-04-07 23:32:47 +08:00
GG Bond 6f61eb4946 Update outdated comments 2024-04-07 21:21:37 +08:00
GG Bond 1096f05344 Move navigation out of snapshot 2024-04-07 21:21:37 +08:00
GG Bond 26f96d3e38 Move to telephoto 0.10.0-SNAPSHOT 2024-04-07 21:21:37 +08:00
FooIbar 4a02189a59 Rearrange code to move plurals resources together 2024-04-07 17:13:35 +08:00
FooIbar 7a5bab41f6 Add option to disable list item animations (#997)
It may crash on some devices.
2024-04-07 13:57:27 +08:00
FooIbar 84c32fb28d Prepare for next iteration 2024-04-06 17:10:28 +08:00
FooIbar a3cb6d2782 Prepare for release 1.11.3 2024-04-06 17:09:38 +08:00
FooIbar 45be957df5 Workaround for comment list lagging at the bottom 2024-04-06 15:25:26 +08:00
FooIbar 8e45014e3f Align load comments button and progress indicator 2024-04-06 15:24:54 +08:00
FooIbar d84e948352 Add padding for progress indicator in DetailScreen 2024-04-06 15:24:54 +08:00
FooIbar 68bd835038 Fallback to transferTo if sendfile failed 2024-04-06 10:52:25 +08:00
FooIbar c297bebea1 Fix resource leak when decode job is canceled 2024-04-05 20:29:04 +08:00
FooIbar 6c0a823216 Fix typo (#991)
* Fix typo

* Fix lint
2024-04-05 06:57:34 +00:00
renovate[bot]andFooIbar 067a701bdc Update KSP to v2.0.0-Beta5-1.0.20 (#989)
* Update Kotlin, KSP and Compose Compiler

* Fix compose compiler version

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-04-05 05:03:58 +00:00
GG Bond c3fb008c92 Introduce HttpStatement.executeSafely 2024-04-05 13:03:39 +08:00
GG Bond bc4321da2e Cleanup CronetEngine 2024-04-05 13:03:39 +08:00
FooIbar 8dec040803 Fix FileNotFoundException on saving download thumb 2024-04-05 00:04:02 +08:00
FooIbar 29e4e77c44 Open file descriptor in "wt" mode for overwriting 2024-04-05 00:04:02 +08:00
FooIbar 11429ef7fe Log image loading errors in release build 2024-04-05 00:04:02 +08:00
FooIbar f5fcd96a1e Fix DownloadService stopped during onFinish call 2024-04-04 19:17:35 +08:00
renovate[bot]andFooIbar 19120038c5 Update AndroidX & Jetpack Compose (#985)
* Update AndroidX & Jetpack Compose

* Fix nullability

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-04-04 06:19:08 +00:00
FooIbar 9021f28ead Allow update to unstable AndroidX libraries
Most of them are already transitively updated.
2024-04-04 13:52:50 +08:00
renovate[bot] 62934f72e3 Update dependency dev.chrisbanes.compose:compose-bom to v2024.04.00-alpha01 2024-04-03 23:36:15 +00:00
renovate[bot] 6c534e1049 Update dependency androidx.paging:paging-compose to v3.3.0-beta01 2024-04-03 19:00:38 +00:00
renovate[bot] f80cd90792 Update dependency androidx.core:core-splashscreen to v1.1.0-rc01 2024-04-03 19:00:00 +00:00
renovate[bot] 3999c0c114 Update dependency io.arrow-kt:arrow-stack to v1.2.4 2024-04-03 13:21:01 +00:00
FooIbar 59399453c4 Fix IP ban error message and parse error logging (#979) 2024-04-03 08:56:40 +00:00
renovate[bot] 694bb19e2a Update dependency sh.calvin.reorderable:reorderable to v1.4.0 2024-04-03 06:25:14 +00:00
FooIbar 9928ecd4d9 Refactor database export 2024-04-03 11:54:06 +08:00
renovate[bot] 2c5293af6e Update dependency com.android.application to v8.5.0-alpha03 2024-04-02 13:39:05 +00:00
FooIbar 9569ca774d Fix unable to refresh images due to resource leak 2024-04-02 00:38:38 +08:00
FooIbar 3a04460926 Abort if no image entries found in archive 2024-04-01 18:18:19 +08:00
FooIbar acb4fb6166 Don't run decode job if fetch job failed
Fix fetch error being suppressed by decode job result.
2024-03-31 20:39:27 +08:00
renovate[bot]andGG Bond 7d137bb016 Fast move to compose destinations v2.1 (#965)
* Fast move to compose destinations v2.1

* Remove default parameters

* Cleanup

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-03-31 16:07:06 +08:00
FooIbar 8c2ed37b72 Update build script due to xz Github repo shutdown 2024-03-31 01:31:22 +08:00
FooIbar 749b230250 Fix download label not being draggable 2024-03-30 10:19:08 +08:00
renovate[bot]andGG Bond 23531cb6e0 Upstream SearchBar (#960)
* Upstream SearchBar

* Fix SearchBar label

* Fix SearchBar padding

* Use BoxWithConstraints

* Refine

* Refine

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-03-29 10:01:42 +00:00
FooIbar 0ac11dbe0b Fix SpiderQueen not respecting FIFO order
And optimize preloading strategy.
2024-03-29 17:50:53 +08:00
FooIbar 9b0e017542 Use Compose UI implementation of parseAsHtml 2024-03-28 15:48:28 +08:00
FooIbar f2f5fcacf9 Use upstream navigation drawer 2024-03-28 15:48:16 +08:00
FooIbar 52ded265f3 Update Compose to snapshot and remove workaround 2024-03-28 08:41:01 +08:00
FooIbar e77f905c4a Revert "Downgrade to stable AGP"
This reverts commit 2d14d34d53.

Reason for revert: Workaround added
2024-03-28 08:39:15 +08:00
FooIbar 2d14d34d53 Downgrade to stable AGP 2024-03-27 13:26:34 +08:00
renovate[bot] 78facda18a Crossinline (#952) 2024-03-26 22:32:42 +08:00
renovate[bot]andrenovate[bot] 1fe1b43015 Update Kotlin, KSP and Compose Compiler (#950)
* Update Kotlin, KSP and Compose Compiler

* Update libs.versions.toml

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <99822064+revonateB0T@users.noreply.github.com>
2024-03-26 14:19:00 +00:00
FooIbar 63164dc70a Scale wide images (banners) to fit target width
And don't scale tall images (webtoons).
2024-03-26 15:50:45 +08:00
renovate[bot] 0d39092a7f Update dependency me.saket.telephoto:zoomable to v0.9.0 2024-03-26 00:34:29 +00:00
renovate[bot] c50db8a327 Update plugin composeCompilerReportGenerator to v1.2.0 2024-03-25 11:58:03 +00:00
renovate[bot] 7e107cc5e2 Update dependency com.mikepenz.aboutlibraries.plugin to v11.1.1 2024-03-23 15:15:45 +00:00
renovate[bot] 260949e3a7 Update dependency gradle to v8.7 2024-03-22 20:28:33 +00:00
renovate[bot] d9ec108721 Update dependency com.android.application to v8.5.0-alpha02 2024-03-22 20:25:51 +00:00
FooIbar 1e97407936 Fix recycled item's height being 0 in webtoon mode
Refactor reader page holder and miscellaneous cleanups
2024-03-22 22:10:00 +08:00
FooIbar 73afe05a18 Manually migrate from schema 17 to 18 for non-null 2024-03-22 20:59:45 +08:00
FooIbar 23475de932 Fix layout inspector not working 2024-03-21 20:31:10 +08:00
FooIbar 6fb2172c2c Drop obsolete snapshot 2024-03-21 19:02:34 +08:00
renovate[bot] 9226b71119 Update dependency dev.chrisbanes.compose:compose-bom to v2024.03.00-alpha02 2024-03-21 10:42:27 +00:00
FooIbar 58e38b58bf Fix renovate configuration
[no ci]
2024-03-21 18:18:29 +08:00
renovate[bot] db0d110627 Update dependency androidx.paging:paging-compose to v3.3.0-alpha05 2024-03-21 10:17:09 +00:00
FooIbar 08812bf7ff Tweak renovate configuration
[no ci]
2024-03-21 18:09:13 +08:00
renovate[bot] daf7f8ffca Update dependency com.android.application to v8.5.0-alpha01 2024-03-21 09:52:03 +00:00
FooIbar 74564fa07f Tweak renovate configuration
[no ci]
2024-03-21 17:41:35 +08:00
FooIbar fc51d3fc81 Allow update to unstable AGP and Compose BOM
[no ci]
2024-03-21 17:32:50 +08:00
renovate[bot]andFooIbar c5d5b8abd2 Update dependency androidx.navigation:navigation-compose to v2.8.0-alpha05 (#929)
* Update dependency androidx.navigation:navigation-compose to v2.8.0-alpha05

* Fix deprecated

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-03-21 17:31:54 +08:00
FooIbar 193badccb8 Fix crash when reading galleries from gallery list 2024-03-21 16:52:17 +08:00
FooIbar 2653d0568a Fix false positive update notifications 2024-03-21 16:31:48 +08:00
FooIbar adf5a65371 Group Kotlin, KSP and Compose Compiler
[no ci]
2024-03-21 15:54:08 +08:00
FooIbar 5b59dabc66 Fix generating simple language from title 2024-03-21 15:19:46 +08:00
GG Bond f7259c5b40 Individual zoomableState per pager item 2024-03-17 14:56:44 +08:00
FooIbar 6f9fceaef8 Prepare for next iteration 2024-03-17 14:45:19 +08:00
FooIbar 6a64ff51ed Prepare for release 1.11.2 2024-03-17 14:44:16 +08:00
FooIbar ea9d9cfba7 Prepare changelog for 1.11.2 2024-03-17 14:41:43 +08:00
FooIbar 75c6561896 Fix app updater getting wrong download link 2024-03-16 20:13:42 +08:00
FooIbar 8f8db82e9d Fix disowned gallery uploader parsing (#918)
* Fix disowned gallery uploader parsing

* Run rustfmt

* Refine

* Run rustfmt
2024-03-16 17:48:10 +08:00
FooIbar a114a8ac72 Minor tweak to some settings' visibility 2024-03-16 11:10:08 +08:00
FooIbar 2c6216057f Revert "Merge default and marshmallow flavors"
This reverts commit 5676de24da.

Reason for revert: Desugaring causes regression on API 26+
2024-03-15 19:55:59 +08:00
FooIbar c5cbcf7418 Reintroduce confirm dialog for swipe-to-dismiss (#914)
Observe the state changes instead of using `confirmValueChange`, which
will be called twice.
2024-03-15 18:40:51 +08:00
FooIbar 5746e3bb57 Pin compose foundation version to 1.7.0-alpha03 2024-03-14 16:05:18 +08:00
FooIbar fd3c87be22 Make reader bottom sheet scrollable and fix insets 2024-03-14 16:05:08 +08:00
FooIbar 866fff3e45 Fix favorites modification blocked by snackbar 2024-03-14 16:04:55 +08:00
FooIbar 06df7befb6 Fix tag namespace for cloud favorites search 2024-03-13 21:38:16 +08:00
FooIbar 8021f86473 Address java.util.regex.Pattern usage 2024-03-13 21:34:04 +08:00
renovate[bot]andGG Bond c9919a8b39 Cleanup CronetEngine (#901)
* Cleanup CronetEngine with UploadDataProviders

* Remove WriteChannelContent as no user now

* Cleanup

* Cleanup

* Remove unnecessary invokeOnCancellation

* Refine

* Refine

* Format

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-03-13 14:40:37 +08:00
renovate[bot] 386015a9ec Update dependency com.squareup.okio:okio-jvm to v3.9.0 2024-03-13 04:00:26 +00:00
FooIbar cbce98b34e Prepare for next iteration 2024-03-12 22:47:24 +08:00
FooIbar f69521fc1a Prepare for release 1.11.1 2024-03-12 22:45:48 +08:00
FooIbar 01b4054368 Prepare changelog for 1.11.1 2024-03-12 22:34:27 +08:00
FooIbar e07aab4434 Drop basic login as captcha is mandatory now 2024-03-12 21:27:01 +08:00
FooIbar 18caa87512 Implement group by download label 2024-03-12 21:26:09 +08:00
FooIbar 5676de24da Merge default and marshmallow flavors 2024-03-12 12:05:12 +08:00
FooIbar 57bbb1fe38 Embed Cronet and drop OkHttp (#895)
* Embed Cronet and drop OkHttp

* Fix updater
2024-03-11 12:22:39 +00:00
FooIbar dcbfbc2e5f Fix concurrent modification 2024-03-11 15:04:56 +08:00
FooIbar e1f473d301 Convert remaining icons to ImageVector 2024-03-11 12:43:52 +08:00
renovate[bot] a33256d29f Update dependency sh.calvin.reorderable:reorderable to v1.3.3 2024-03-10 11:12:12 +00:00
FooIbar 6a81877b09 Prepare for next iteration 2024-03-09 19:17:18 +08:00
FooIbar 6cd7b85b94 Prepare for release 1.11.0 2024-03-09 19:16:25 +08:00
FooIbar df97a9c4b9 Prepare changelog for 1.11.0 (#881)
no ci
2024-03-09 19:10:37 +08:00
FooIbar 5cb91e9b45 Update liblzma to v5.6.1 2024-03-09 19:03:37 +08:00
FooIbar 94794cb0db Address code review comments 2024-03-09 17:16:42 +08:00
FooIbar a16c021000 Fix temporary download directory cleanup 2024-03-09 16:22:57 +08:00
FooIbar 49d4ae078f Clarify message for no current torrents 2024-03-09 14:52:12 +08:00
FooIbar eb45068df3 Increase bringCursorIntoView workaround delay 2024-03-09 14:19:00 +08:00
renovate[bot] 1aa750d676 Update softprops/action-gh-release action to v2 2024-03-08 21:35:28 +00:00
FooIbar af85a68e3d Fix duplicate subscription on page state 2024-03-08 15:45:54 +08:00
FooIbar a8fc4003a3 Workaround for crash on delete text button click 2024-03-08 09:24:10 +08:00
renovate[bot] 675df44745 Update dependency com.google.devtools.ksp to v2.0.0-Beta4-1.0.19 2024-03-08 00:33:53 +00:00
renovate[bot] 7e271d7e8e Update dependency com.android.application to v8.4.0-alpha13 2024-03-07 22:07:29 +00:00
FooIbar acb2c720af Fix torrent parsing 2024-03-07 23:06:22 +08:00
GG Bond 5d0c2e3f05 Animated dim with SettingsPager 2024-03-07 22:48:33 +08:00
GG Bond 3d5e3620dd Restore dep behaviour in ReaderModeSetting 2024-03-07 22:48:33 +08:00
GG Bond 43aefeedae Restore dep behaviour of fullscreen & cutoutShort 2024-03-07 22:48:33 +08:00
GG Bond c2cbcc009d No more credits to MDC-Android 2024-03-07 21:08:55 +08:00
GG Bond 2aa494d9b7 Get rid of MDC-Android 2024-03-07 21:08:55 +08:00
GG Bond 8f3a11f374 Calculate Reader statusBarColor with Compose 2024-03-07 21:08:55 +08:00
GG Bond 76298f15e4 Rewrite harmonizeWithRole with ColorUtils 2024-03-07 21:08:55 +08:00
GG Bond 58839e0def Fix Error Text Color 2024-03-07 21:08:55 +08:00
GG Bond 6fe62db5e4 Remove ReaderButton, prepare to drop MDC 2024-03-07 21:08:55 +08:00
renovate[bot]andGG Bond 9b9f25d405 Move to Compose Reader Settings Now (#871)
* Move to Compose Reader Settings Now

* Cleanup res

* Cleanup

* Fix trans

* Fix

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-03-07 17:43:41 +08:00
renovate[bot]andGG Bond e47d7378ec Add remaining settings layout (#870)
* Implement ReadModeSetting

* Fix textstyle

* Fix pref color

* Fix

* Refine

* Refine style

* Remaining Pref

* Inline

* Refine

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-03-07 08:49:13 +00:00
renovate[bot]andGG Bond 51b385408d Implement remaining of ColorFilterSetting (#867)
Co-authored-by: GG Bond <whatever@tagkong.com>
2024-03-07 13:14:58 +08:00
renovate[bot] 8e7cced8d2 Update dependencies 2024-03-07 13:12:18 +08:00
renovate[bot] affeb3e106 Update dependency androidx.browser:browser to v1.8.0 2024-03-06 21:05:15 +00:00
FooIbar a2377857e9 Fix page state update on cache entry removed 2024-03-06 22:53:41 +08:00
FooIbar 7714ff8938 Make sure slider value has single source of truth 2024-03-06 21:55:43 +08:00
FooIbar 352853b88c Implement VolumeKeysHandler 2024-03-06 20:44:49 +08:00
5idereal 23d282e354 Update strings.xml 2024-03-06 19:46:00 +08:00
FooIbar b93c12de89 Fix navigating on non-main thread 2024-03-06 16:30:37 +08:00
FooIbar e0e5a155aa Initial support for local tag search
BREAKING CHANGE: Upgrade database
2024-03-06 16:29:37 +08:00
renovate[bot]andGG Bond e1f34a7b1b Implement ColorFilterSetting (#859)
* Implement ColorFilterSetting

* Initial ColorFilterSetting

* Cleanup

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-03-05 17:20:09 +00:00
renovate[bot] 298e80eb9d Update compose.destinations to v1.10.2 2024-03-05 16:28:14 +00:00
renovate[bot]andGG Bond 3ecfd83f1e Remaining GeneralSettings Layout (#857)
* PlaceHolder

* Implement

* ConfigureKeepScreenOn

* Implement

* Remaining general layout

* Remove zIndex

* Add ReaderContentOverlay

* Stub for ColorFilterSetting

* Implement ColorFilterSetting

* Introduce SliderChoice

* Refine naming

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-03-05 16:19:21 +00:00
renovate[bot]andGG Bond 1dcf4e7f46 Implement some reader settings (#856)
* Initial SpinnerChoice

* Apply bgColor

* Introduce SwitchChoice

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-03-05 18:32:36 +08:00
FooIbar f1a856cb45 Don't fetch metadata if source is GalleryDetail 2024-03-05 18:32:25 +08:00
renovate[bot]andGG Bond af32d7eea7 Initial Setting Pager (#854)
* Update Compose Snapshot

* Initial SettingsPager

* Cleanup

* Fix inactive color

* Sync container color with BSheet

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-03-05 13:32:48 +08:00
FooIbar 47be2754e5 Refactor tag namespace to use value class 2024-03-05 10:45:51 +08:00
FooIbar 39b16b6650 Fix webtoon last visible item position calculation 2024-03-04 22:13:07 +08:00
FooIbar 0a809a564c Fix general setting update on reading mode changes
Another bug introduced in DataStore migration.
2024-03-04 19:49:32 +08:00
FooIbar 07e24013c8 Workaround for prepending before the first item 2024-03-04 19:48:55 +08:00
FooIbar 8e8394985d Don't crop borders for webtoons
Webtoons are typically split across multiple pages, they require
consistent width to maintain alignment.
2024-03-04 16:56:23 +08:00
FooIbar e54b33aaaa Fix simple language generation for ComicInfo
Regression introduced in commit 4142f288
2024-03-04 15:01:16 +08:00
GG Bond e6a22d8ef4 Reader Setting PlaceHolder 2024-03-04 12:21:02 +08:00
GG Bond ae25018574 ReaderScreen saveToImage 2024-03-04 12:21:02 +08:00
GG Bond 28160608ec ReaderScreen saveImage 2024-03-04 12:21:02 +08:00
GG Bond 38651eba1d Optimize GalleryListScreen 2024-03-04 00:42:36 +08:00
GG Bond cc53fa5f1c Optimize 2024-03-04 00:42:36 +08:00
FooIbar 70f8181752 Support FTS for history and local favorites search
BREAKING CHANGE: Upgrade database
2024-03-03 23:24:08 +08:00
GG Bond 9e506f6258 Update empty hint in HistoryScreen 2024-03-03 23:23:08 +08:00
GG Bond 1304c728cf Cleanup GalleryCommentsScreen 2024-03-03 23:09:00 +08:00
GG Bond 80e11c54e7 Composing FavouritesScreen 2024-03-03 23:09:00 +08:00
GG Bond ff5d58b101 Update CopyLeft years 2024-03-03 23:09:00 +08:00
GG Bond bf550d99bc Remove credits to OkHttp as we are not directly built on it 2024-03-03 23:09:00 +08:00
FooIbar 7738b7bc29 Implement title keyword search in history (#840)
* Implement title keyword search in history

* Don't use Dispatchers.IO
2024-03-03 14:51:30 +00:00
FooIbar 01f51b1000 Decouple search FAB from SearchBarScreen 2024-03-03 18:44:40 +08:00
FooIbar 16dfacb285 Workaround incorrect fling velocity on zoom end 2024-03-03 00:42:46 +08:00
GG Bond a253ddf7e4 composing with MainActivity 2024-03-02 21:57:55 +08:00
GG Bond ffb488482c composing GalleryDetailScreen 2024-03-02 21:57:55 +08:00
GG Bond 0e29754ce9 composing GalleryCommentsScreen 2024-03-02 21:57:55 +08:00
GG Bond ee97720e1f composing GalleryPreviewScreen 2024-03-02 21:22:57 +08:00
GG Bond 29d4e6370c composing GalleryPreviewScreen 2024-03-02 21:22:57 +08:00
GG Bond 9040cb54d4 composing with CoroutineScope 2024-03-02 21:22:57 +08:00
GG Bond f082766f06 composing HistoryScreen 2024-03-02 21:22:57 +08:00
GG Bond e2372891cb composing ReaderScreen 2024-03-02 21:22:57 +08:00
GG Bond 9dc5b5c539 Introducing composing magic, pack necessary environment CompositionLocal 2024-03-02 21:22:57 +08:00
GG Bond 886e025ac8 Implement copy 2024-03-02 21:22:57 +08:00
GG Bond feb13cbd79 Fix sheet anim 2024-03-02 21:22:57 +08:00
GG Bond 66baaad86f Implement share image 2024-03-02 21:22:57 +08:00
FooIbar 4142f28822 Fix simple language generation for favorites 2024-03-02 19:40:30 +08:00
renovate[bot] c578b16e27 Update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.6.0-RC.2 2024-03-02 10:06:04 +00:00
FooIbar 32887acecd Migrate to kotlinx datetime [2/2] 2024-03-02 17:58:37 +08:00
FooIbar 5cf5cc5e34 Update page state on image extraction failure 2024-03-02 16:11:42 +08:00
GG Bond 4dc0f7e02e CropBorder use Compose IntRect 2024-03-02 16:01:08 +08:00
renovate[bot]andGG Bond 6e9c6e6269 Updates for ReaderScreen (#827)
* Retry pages

* Restore loading behaviour

* Refactor GalleryPager

* GalleryPager accepts onSelectPage

* Slot to do page select actions

* Move zoomableState in

* Refactor using EdgeApplier

* Cleanup unneeded

* Workaround Crash

* Don't scale non-image

* Reset page state when recycled

* Have pageloader restart when cropBorder changes

* Make PagerItem top-level

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-03-02 15:43:53 +08:00
renovate[bot]andGG Bond a22880a9b1 Fix archive memleak (#828)
* Don't lock anon pages when decode

* Log madvise fault

* Simplify

* Don't readahead unconditionally

* Refine

* Fixes

* Cleanup

* Fix sparse archive case

* Fixes

* Prefault anon pages for new kernel

* Fixes

* Fixes

* Fixes

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-03-02 14:48:35 +08:00
FooIbar 7357724392 Address GlobalScope usage and minor cleanup 2024-03-01 16:05:17 +08:00
renovate[bot] fb1b08e7e8 Update dependency com.android.application to v8.4.0-alpha12 2024-02-29 23:43:32 +00:00
renovate[bot] 1405b99ab8 Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-alpha06 2024-02-29 23:41:13 +00:00
FooIbar f7aec69dae Avoid SAF overhead when save-as-cbz is enabled 2024-02-29 22:15:43 +08:00
renovate[bot] f15a0fc4bb Update dependency io.arrow-kt:arrow-stack to v1.2.3 2024-02-29 10:21:56 +00:00
FooIbar 6330fc3bdc Revert "Build with Android 15 preview SDK"
This reverts commit 7d2e0f7f

Reason for revert: Android SDK sources for VanillaIceCream are not
available, making it hard to debug.
2024-02-29 16:10:00 +08:00
FooIbar 01e3f3e9b7 Sort only entries in external archive files 2024-02-29 16:07:34 +08:00
FooIbar e0c614cf71 Cache display name and mime type for document file 2024-02-29 16:06:42 +08:00
renovate[bot] b34764d4c2 Update dependency com.google.devtools.ksp to v2.0.0-Beta4-1.0.18 2024-02-29 04:44:46 +00:00
FooIbar f46f84e533 Fix forbidden filename characters in gallery title 2024-02-29 12:36:40 +08:00
renovate[bot] ca0eaf2053 Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-alpha05 2024-02-29 03:05:54 +00:00
renovate[bot] 25f283ee9c Update snapshot 2024-02-29 03:45:13 +08:00
FooIbar 8ee23ab520 Fix zero-copy branch condition for an edge case 2024-02-29 01:45:10 +08:00
renovate[bot]andrenovate[bot] 6964baf3f6 Update aboutlibraries to v11 (major) (#810)
* Update aboutlibraries to v11

* Update LicenseScreen.kt

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <99822064+revonateB0T@users.noreply.github.com>
2024-02-28 12:52:07 +00:00
FooIbar 01aa7af175 Minor fixes for new reader 2024-02-28 18:28:19 +08:00
renovate[bot]andGG Bond 5982bd2d4b Zero-copy read for 0-compression archives (#809)
* Zero-copy read for 0-compression archives

* Refine

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-02-28 09:04:17 +00:00
FooIbar d0fbb3539f Initial save downloaded gallery as cbz archive (#808)
* Initial save downloaded gallery as cbz archive

* Make save as cbz archive opt-in
2024-02-28 08:06:08 +00:00
GG Bond 284fb4242b Compose Reader Start Page 2024-02-28 15:52:53 +08:00
GG Bond beeb4bdbd4 Crop border for Compose ReaderScreen 2024-02-28 15:52:53 +08:00
renovate[bot]andGG Bond 76a52903e5 Polymorphic pager (#804)
* Ctrl AppbarVisible

* PageIndicatorText

* Polymorphic pager

* Fixes

* Sync state for pager as well

* Refine

* Navbar Padding

* Refine

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-02-28 04:19:29 +00:00
Vladimir Dostoyevskiy a19b8782a8 Update compose snapshot 2024-02-28 08:58:51 +08:00
Vladimir DostoyevskiyandGG Bond 31f66fd05b Reader updates (#800)
* Refine

* Bars and sliders

* Zoomable

* Refine

* Refine Slider & LazyList state sync

* Refine

* Cleanup

* Fixes

* Fix initial state

* Fixes

* Fixes

* Fixup initial state

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-02-27 23:14:36 +08:00
renovate[bot] bc3c4e969c Update dependency io.arrow-kt:arrow-stack to v1.2.2 2024-02-27 14:52:00 +00:00
FooIbar 4231402e54 Coroutinize DownloadManager 2024-02-27 22:44:12 +08:00
Vladimir DostoyevskiyandGG Bond ff4f76dfa5 Initial Compose ReaderScreen (#799)
* Initial Compose ReaderScreen

* Refine

* Naming

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-02-27 09:44:03 +00:00
FooIbar 2ff9df4c07 Show gallery pages in history 2024-02-27 17:29:35 +08:00
GG Bond 7cbc641178 Drop outdated comment 2024-02-27 13:58:33 +08:00
GG Bond 08d5621b59 Update snapshot for non-gesture systemback transition 2024-02-27 13:58:33 +08:00
GG Bond d39c2fdfa2 Update workaround 2024-02-27 13:58:33 +08:00
GG Bond 27e02ad642 Don't dup fd when calculate sha1
Signed-off-by: GG Bond <whatever@tagkong.com>
2024-02-27 12:50:32 +08:00
FooIbar 11e9faef7c Fix skip H@H key parsing
It may contain alphabets.
2024-02-26 20:55:48 +08:00
FooIbar cbb8971dd1 Implement sort downloads by page count 2024-02-26 18:04:45 +08:00
FooIbar 1077f4d8cf Show pages instead of language in downloads' badge (#793)
It is expected that most downloads will be in the same language.

BREAKING CHANGE: Upgrade db, add `PAGES` column to `GALLERIES` table
2024-02-26 17:54:21 +08:00
FooIbar 594f9412e3 Ignore leading zeros when sorting archive entries 2024-02-26 12:44:48 +08:00
Vladimir DostoyevskiyandGG Bond 7674f6a0f7 Refactor Image with coil Interceptor (#791)
* CropBorderInterceptor

* TooLargeBitmapInterceptor

* Refine

* Take Foolbar's code

* May fail if the image is too large

* Fixup

* Fixup

* Refine

* Refine

* Swap CropBorderInterceptor & HardwareBitmapInterceptor

* Refine

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-02-26 03:49:40 +00:00
Vladimir DostoyevskiyandGG Bond aea6fbf4ab Anyhow for parser (#788)
* Use anyhow for parser

Signed-off-by: GG Bond <whatever@tagkong.com>

* Refine

Signed-off-by: GG Bond <whatever@tagkong.com>

---------

Signed-off-by: GG Bond <whatever@tagkong.com>
Co-authored-by: GG Bond <whatever@tagkong.com>
2024-02-25 23:58:33 +08:00
GG Bond 962f9bfff5 Fuck off silly error handling
Signed-off-by: GG Bond <whatever@tagkong.com>
2024-02-25 23:04:35 +08:00
GG Bond 60532e2622 Move sha1 to mod hash, use anyhow
Signed-off-by: GG Bond <whatever@tagkong.com>
2024-02-25 23:04:35 +08:00
FooIbar 5c7a834342 Treat download as finished if archive file exists 2024-02-25 21:24:08 +08:00
FooIbar ca940080a9 Move checked category filter cards to first 2024-02-25 19:39:16 +08:00
Vladimir Dostoyevskiy 2273dd541a Enable simd (#783)
* Enable simd

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt
2024-02-25 07:34:17 +00:00
Vladimir DostoyevskiyandGG Bond 422062226d Move to rust sha1 impl (#782)
* Move to rust sha1 impl

* Use onstack buffer

Signed-off-by: GG Bond <whatever@tagkong.com>

---------

Signed-off-by: GG Bond <whatever@tagkong.com>
Co-authored-by: GG Bond <whatever@tagkong.com>
2024-02-25 14:07:32 +08:00
FooIbar 6a6da6f059 Move sha1 digest calculation to native function (#781)
`kotlinx-io` has removed hash functions API.
2024-02-25 00:15:34 +08:00
GG Bond 4cbb0eca4f launchInVM 2024-02-24 22:29:41 +08:00
GG Bond ebb3eb1ab3 Simplify EhEngine.getPreviewList 2024-02-24 22:29:41 +08:00
GG Bond ebf645acaf Refine naming 2024-02-24 22:29:41 +08:00
GG Bond ec787ebde2 Aggressively fetch in viewModelScope 2024-02-24 22:29:41 +08:00
GG Bond 4f190cb0ef Cleanup GalleryPreviewScreen 2024-02-24 22:29:41 +08:00
GG Bond 2a36868d11 CR for GalleryInfo 2024-02-24 22:29:41 +08:00
GG Bond 176d8be565 Throwable.displayString() 2024-02-24 22:29:41 +08:00
GG Bond 7b581e45e1 CodeReview for LoadStateIndicator 2024-02-24 22:29:41 +08:00
GG Bond 4888e29f79 CodeReview for EhAsyncThumb 2024-02-24 22:29:41 +08:00
GG Bond e5f6d1b1aa CodeReview for EhAsyncThumb 2024-02-24 22:29:41 +08:00
GG Bond d544bbfbeb CodeReview for GalleryPreview 2024-02-24 22:29:41 +08:00
FooIbar ed20d6022b Update liblzma to v5.6.0 2024-02-24 19:26:32 +08:00
FooIbar 4191e2091c Handle invalid UTF-8 characters in response body (#778) 2024-02-24 18:30:40 +08:00
FooIbar 1eeb5a51f6 Introduce DownloadsFilterState (#769)
* Fix default download list not updating on label delete

* Fix unexpected behavior after renaming label
2024-02-24 12:51:11 +08:00
FooIbar dd0776758f Refactor confirm remove download dialog 2024-02-24 01:42:01 +08:00
FooIbar cf3ccf6155 Update snapshot
* Remove obsolete workaround
2024-02-23 22:40:19 +08:00
GG Bond fa6e4acad6 Flatten closure
Signed-off-by: GG Bond <whatever@tagkong.com>
2024-02-23 11:13:58 +08:00
GG Bond db33a72a8e Update snapshot 2024-02-23 11:13:58 +08:00
renovate[bot] 0f8a0549b1 Update dependency com.android.application to v8.4.0-alpha11 2024-02-23 02:02:43 +00:00
renovate[bot] 26ff30af6c Update dependency sh.calvin.reorderable:reorderable to v1.3.2 2024-02-22 01:20:38 +00:00
GG Bond c2fa32f430 Workaround SlotTable modification race 2024-02-21 20:09:36 +08:00
GG Bond 2734de0588 Fix upstream RememberObserver forget order changes 2024-02-21 20:09:36 +08:00
GG Bond aa219e4b71 Fix for compose snapshot 2024-02-21 20:09:36 +08:00
GG Bond 645656b4cd Update compose snapshot 2024-02-21 20:09:36 +08:00
GG Bond ef16bdeb75 Relax GalleryList recomposition 2024-02-21 14:17:37 +08:00
FooIbar 84299b4db7 Workaround for image search (#768)
* Workaround for image search

* Cleanup
2024-02-20 15:22:51 +00:00
FooIbar 953e216dde Implement sort modes and random walk for downloads (#767)
* Implement sort modes and random walk for downloads

* Use `PrefDelegate<T>.asMutableState` instead

BREAKING CHANGE: Upgrade database.
2024-02-20 11:50:37 +00:00
FooIbar c57fd0a923 Reset progress indicator on retry 2024-02-19 17:31:20 +08:00
FooIbar f9cb3d769f Skip H@H on force retry (#762)
* Skip H@H on force retry

* Refine
2024-02-19 08:11:57 +00:00
GG Bond dd62571943 Apply padding for SearchBarScreen Fab 2024-02-19 15:55:41 +08:00
GG Bond 9edd33d88d Apply padding for GalleryCommentsScreen 2024-02-19 15:55:41 +08:00
GG Bond b2fded76d5 Extract a snackBarPadding Modifier 2024-02-19 15:55:41 +08:00
GG Bond 1761493c8e Apply padding to FabLayout 2024-02-19 15:29:33 +08:00
GG Bond 6aa6ee2810 LocalSnackbarFabPadding 2024-02-19 15:29:33 +08:00
GG Bond 84728a1490 Enable context receivers 2024-02-19 15:29:33 +08:00
GG Bond a1568467f0 Cleanup showTip usage 2024-02-19 15:29:33 +08:00
FooIbar 32e2a03c31 Make GalleryInfo.token non-null, upgrade db 2024-02-19 15:24:08 +08:00
GG Bond d4609593e2 Remove showTip usage in GalleryDetailScreen 2024-02-19 12:57:10 +08:00
GG Bond a2af7437c0 Remove showTip usage in GalleryCommentsScreen 2024-02-19 12:57:10 +08:00
FooIbar ab5af22fc3 Re-enable gradle configuration cache 2024-02-18 15:14:35 +08:00
FooIbar 39a159e5ca Optimize CI caching policy 2024-02-18 15:14:35 +08:00
FooIbar ec8a54906c Optimize CI caching policy 2024-02-18 11:59:27 +08:00
FooIbar 73c0ce02ea Separate build tasks to accelerate CI 2024-02-18 08:27:03 +08:00
FooIbar 7d2e0f7f7e Build with Android 15 preview SDK (#749)
* Build with Android 15 preview SDK

* Fix CI

* Don't set application as test-only
2024-02-17 19:05:12 +08:00
FooIbar 7515a049c2 Address cmake warning: "Policy CMP0077 is not set" 2024-02-17 15:03:28 +08:00
GG Bond a317d5303e Enable compiler nonSkippingGroupOptimization 2024-02-17 13:36:07 +08:00
Vladimir DostoyevskiyandGG Bond c4045ded70 Upstream Navigation (#744)
* Official Navigation

* Update snapshot

* Move navigation to snapshot

* Drop dead switch

* Bisect

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-02-17 12:16:05 +08:00
FooIbar 3cb1b1eee4 Migrate to Corrosion, rust-android-gradle is dead (#742)
* Migrate to Corrosion, rust-android-gradle is dead

This also allows us to enable gradle configuration cache.

* Disable gradle configuration cache
2024-02-17 08:04:28 +08:00
renovate[bot] 5423af46c5 Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json-okio to v1.6.3 2024-02-16 19:03:24 +00:00
FooIbar a2883840e0 Fix thumbnails not updating in grid view (#741)
* Fix 7735237 ("Remember ImageRequest")

* Refine
2024-02-16 11:21:11 +00:00
GG Bond 14810b4c2c Grab some RestrictedApi to make lint happy 2024-02-16 12:25:42 +08:00
GG Bond f5a9a41790 Introduce Result<T>.foldToLoadResult 2024-02-16 12:25:42 +08:00
Vladimir Dostoyevskiy 500d00d214 Update kotlin & compose compiler 2024-02-16 10:00:17 +08:00
Vladimir Dostoyevskiy 49810f8fd1 Update compose snapshot 2024-02-16 09:47:45 +08:00
renovate[bot] 6ad3ab228f Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-android to v1.8.0 2024-02-15 16:36:08 +00:00
renovate[bot] 3a29ce291b Update compose.destinations to v1.10.1 2024-02-15 16:35:33 +00:00
Vladimir DostoyevskiyandGG Bond 1e28a4c7ab Introduce delegateSnapshotUpdate dsl (#735)
* Introduce rememberSnapshotFlowAsState dsl

* Refine naming

* Cleanup

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-02-16 00:11:35 +08:00
FooIbar 645467d20f Implement random walk in search results 2024-02-15 18:20:42 +08:00
Vladimir Dostoyevskiy b2a5fe9f52 Update NDK 2024-02-15 09:23:38 +08:00
Vladimir Dostoyevskiy 2ea3c03360 Update compose snapshot (#731)
* Update compose snapshot

* Update
2024-02-14 04:15:24 +00:00
FooIbar 0c147967d2 Attempt to parse received keyword as URL first 2024-02-13 23:45:30 +08:00
FooIbar de1fab2595 Fix current page in goto dialog on ToplistScreen 2024-02-13 23:11:26 +08:00
FooIbar b86eebf0a7 Refactor Context.decodeBitmap to non-blocking 2024-02-13 22:07:36 +08:00
FooIbar 07345f90e6 Fix exported archive extension on older platform 2024-02-13 02:09:54 +08:00
FooIbar 5fe520e575 Cleanup Log usage and make logging configurable 2024-02-13 00:23:10 +08:00
FooIbar a9dd705ec5 Don't trim gallery detail cache, Resolve #710
It will only free about 1 MB memory
2024-02-12 23:42:01 +08:00
FooIbar e36520faad Replace printStackTrace with proper priority log (#722)
* Replace `printStackTrace` with proper priority log

* Fix
2024-02-12 14:40:45 +00:00
Vladimir DostoyevskiyandGG Bond edaf0a4275 Implement check ripple (#721)
* Implement check ripple

* Fix

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-02-12 14:21:18 +00:00
GG Bond 7735237ea7 Remember ImageRequest
ImageRequest is not Stable, each recompose will allocate an ImageRequest
2024-02-12 21:21:06 +08:00
FooIbar 7bbc4ea618 Fix failed to generate ComicInfo.xml on API < 33 2024-02-12 21:10:46 +08:00
GG Bond db99392082 Simplify GalleryList state a bit 2024-02-12 19:32:54 +08:00
FooIbar 7bf6a9f545 Add animation for DownloadsScreen grid view switch 2024-02-12 18:54:01 +08:00
FooIbar 51c0efebc4 Support grid view in DownloadsScreen (#714)
* Support grid view in DownloadsScreen

* Fix aspect

* Refine
2024-02-12 09:37:45 +00:00
FooIbar 7ef70aa16e Generate ComicInfo.xml on archive download 2024-02-11 21:01:16 +08:00
FooIbar c5c0c6c4bd Initial support for third-party download manager 2024-02-11 18:43:59 +08:00
GG Bond b26cba8ea9 Update compose snapshot 2024-02-10 22:46:08 +08:00
GG Bond 90b4c16166 Lock drawer on SignInScreen 2024-02-10 15:01:53 +08:00
GG Bond 9b0f6fe433 Lock drawer on all Webview Screen 2024-02-10 15:01:53 +08:00
GG Bond e24735c341 Relax GalleryCommentsScreen recompose 2024-02-10 15:01:53 +08:00
GG Bond 9680ada9ee Lift a Modifier.layout usage 2024-02-10 15:01:53 +08:00
GG Bond 028a7c2352 ListUrlBuilder.asDst 2024-02-10 15:01:53 +08:00
GG Bond 80e5f36c4e Long.asDstWith -> GalleryDetailScreenDestination 2024-02-10 15:01:53 +08:00
GG Bond e0b65184e2 BaseGalleryInfo.asDestination() 2024-02-10 15:01:53 +08:00
GG Bond 395a48ddeb Implement random walk in localFav 2024-02-10 15:01:53 +08:00
GG Bond e22a39f549 Refactor FavouritesScreen state management 2024-02-10 15:01:53 +08:00
renovate[bot] e17d934ebf Update dependency com.squareup.okio:okio-jvm to v3.8.0 2024-02-10 00:28:46 +00:00
FooIbar 10746417b6 Fix crash when visiting newer version galleries
(cherry picked from commit 9be19489a4)
2024-02-09 23:27:27 +08:00
FooIbar 3ef45ba0cc Refactor remaining dialogs to Compose 2024-02-09 14:45:26 +08:00
FooIbar a3e7b6ef43 Refactor select item dialog API to take List<T> 2024-02-08 12:39:04 +08:00
renovate[bot] c444a3b435 Update dependency androidx.compose.material3:material3 to v1.2.0 2024-02-08 00:26:23 +00:00
renovate[bot] 5161802465 Update androidx.navigation to v2.7.7 2024-02-07 21:41:33 +00:00
FooIbar 8c27feec7a Refine exporting downloaded gallery as cbz archive (#698) 2024-02-07 07:17:55 +00:00
FooIbar 37e895cdca Decouple hideHvEvents and requestNews settings (#697)
Visiting gallery page on e-hentai will show HV events as well.
2024-02-06 16:23:25 +00:00
FooIbar e1ad4e3b90 Rename .thumb to thumb.jpg so it can be previewed 2024-02-06 23:18:41 +08:00
FooIbar 5f0be5ae43 Move reading progress to database
In this way cbz archives can be read without SpiderInfo.
2024-02-06 21:33:24 +08:00
Vladimir Dostoyevskiy 9a7cabb221 Update snapshot 2024-02-06 20:33:20 +08:00
renovate[bot] 6acc552058 Update dependency sh.calvin.reorderable:reorderable to v1.3.1 2024-02-06 17:44:30 +08:00
FooIbar b4f4d442eb Ensure images use .jpg extension instead of .jpeg 2024-02-06 16:24:55 +08:00
Vladimir DostoyevskiyandGG Bond 21016dda53 Initial draft support export as cbz (#685)
* Initial draft support export as cbz

* Hint user progress

* Hint user result

* Emit comicInfo as well

* Write ComicInfo if not exist

* Use perFilename

* Print stacktrace

* Fix

* Refine

* Revert "Refine"

This reverts commit 2b368180fde00c7a8cfd4e895f1f2d5c29c3cf9f.

* Refine

* Refine

* Fix

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-02-06 06:44:11 +00:00
Vladimir Dostoyevskiy 576e5b1b58 Revert "Update dependency sh.calvin.reorderable:reorderable to v1.3.0"
This reverts commit 17437a6882.
2024-02-06 14:21:33 +08:00
renovate[bot] 17437a6882 Update dependency sh.calvin.reorderable:reorderable to v1.3.0 2024-02-05 21:49:27 +00:00
FooIbar 04f9f087da Refactor image saving to run on background thread 2024-02-05 07:10:35 +08:00
FooIbar c508947728 Lazily initialize image cache of PageLoader
`OSUtils.totalMemory` needs to read from disk
2024-02-04 23:27:54 +08:00
FooIbar ce1dc55d3c Add support for non-UTF-8 encoded archives (#682) 2024-02-04 22:24:32 +08:00
renovate[bot]andFooIbar e9f615819f Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-alpha04 (#677)
* Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-alpha04

* Revert "Fix delayed application of HTTP engine changes"

This reverts commit c82de0b779.

* Revert "No longer need restart to switch HC"

This reverts commit 7e8b0a58

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-02-03 21:24:59 +08:00
FooIbar 8da3546558 Add back GifDecoder as service loader is disabled 2024-02-03 20:05:56 +08:00
FooIbar d8f8dcffbd Update compose snapshot and remove workaround 2024-02-03 18:14:03 +08:00
FooIbar e79113b19e Lazily initialize image cache on background thread 2024-02-03 18:04:42 +08:00
renovate[bot] 2a7f65a1bd Update dependency gradle to v8.6 2024-02-02 20:27:41 +00:00
FooIbar e322878b95 Don't use app-specific dir as default download dir 2024-02-02 11:01:06 +08:00
FooIbar 11b09f187c Refactor some dialogs to Compose (#675)
* Refactor some dialogs to Compose

* Implement rating bar

* Cleanup
2024-02-01 06:42:39 +00:00
renovate[bot] 926309733c Update dependency io.github.fornewid:material-motion-compose-core to v1.2.0 2024-01-31 05:24:14 +00:00
FooIbar c4b2bcab66 Allow clearing igneous cookie without signing out 2024-01-30 20:16:39 +08:00
FooIbar b88c96894d Prepare to save downloaded gallery as cbz archive 2024-01-30 19:15:40 +08:00
FooIbar 8502671203 Drop CookieSignInScreen and SelectSiteScreen
Cookie-based login is useless due to new e-hentai cookie policy.

Simplify login process a bit since exhentai is preferred.
2024-01-30 10:20:22 +08:00
renovate[bot] 4a7d6f7489 Update dependency io.github.fornewid:material-motion-compose-core to v1.1.2 2024-01-29 20:42:45 +00:00
FooIbar aec34c81aa Make PageCount field optional 2024-01-27 21:22:31 +08:00
FooIbar 1d4fe30e04 Restore download from ComicInfo.xml if available 2024-01-27 20:21:11 +08:00
FooIbar a2cfecd922 Upstream SearchBar Predictive Back support 2024-01-27 20:19:59 +08:00
renovate[bot] d36aef3214 Update actions/upload-artifact action to v4 2024-01-27 09:23:06 +00:00
FooIbar c632231813 Update xz to v5.4.6 2024-01-27 17:00:01 +08:00
FooIbar d8dd68c9b6 Fix sad panda check false positive 2024-01-27 14:19:26 +08:00
FooIbar d6a58d5d34 Generate ComicInfo.xml on download 2024-01-27 13:43:08 +08:00
renovate[bot] 41f8168c28 Update gradle/gradle-build-action action to v3 2024-01-26 21:54:50 +00:00
renovate[bot] 4513ead30a Update compose.destinations to v1.10.0 2024-01-26 05:21:27 +00:00
renovate[bot] f4e23a5738 Update dependency dev.chrisbanes.compose:compose-bom to v2024.01.00-alpha03 2024-01-24 22:00:36 +00:00
FooIbar 79b167002c Use spotless's default ktlint version (#657)
* Use spotless's default ktlint version

* Suppress property naming rule for backing property
2024-01-24 08:32:01 +00:00
FooIbar a9a763ae5f Update Kotlin, KSP and Compose Compiler 2024-01-24 15:43:36 +08:00
FooIbar a5fc29bc66 Fix uploader chip not clickable in thumbnail mode 2024-01-24 14:52:51 +08:00
FooIbar 02c568fd7a Update issue template
[no ci]
2024-01-24 13:33:08 +08:00
renovate[bot] ce55891bc2 Update dependency com.android.application to v8.2.2 2024-01-23 18:58:25 +00:00
renovate[bot] 87b1160c72 Update plugin spotless to v6.25.0 2024-01-23 11:18:25 +00:00
GG Bond ccc6d004de Refactor FilterScreen dialog to Compose, animateItemPlacement 2024-01-23 12:49:12 +08:00
renovate[bot]andFooIbar 20b145bee5 Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-alpha03 (#648)
* Update dependency io.coil-kt.coil3:coil-bom to v3.0.0-alpha03

* Adapt coil3 changes

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2024-01-21 06:11:13 +00:00
renovate[bot] a37cc59a56 Update dependency org.chromium.net:cronet-api to v119 2024-01-17 18:54:41 +00:00
renovate[bot] 7cbffff12c Update compose.destinations to v1.9.62 2024-01-17 17:47:56 +00:00
renovate[bot] 4e5ae53775 Update actions/cache action to v4 2024-01-17 17:43:46 +00:00
renovate[bot] a53de63695 Update compose.destinations to v1.9.61 2024-01-17 14:54:53 +00:00
renovate[bot] 8020c139ec Update dependency io.github.fornewid:material-motion-compose-core to v1.1.1 2024-01-16 20:29:51 +00:00
FooIbar 3c5375a9a6 Prepare for next iteration 2024-01-15 23:41:08 +08:00
FooIbar 1d9008a1a6 Prepare for release 1.10.3 2024-01-15 23:39:56 +08:00
FooIbar fb577dc026 Update compose snapshot and r8 2024-01-15 20:01:11 +08:00
FooIbar 675eb1b7e2 Update compose-bom to v2024.01.00-alpha01 2024-01-15 17:41:46 +08:00
renovate[bot] 6a3d522dfa Update plugin spotless to v6.24.0 2024-01-15 02:54:24 +00:00
renovate[bot] 47aa5c64e7 Update compose.destinations to v1.9.60 2024-01-14 19:25:34 +00:00
FooIbar 5ecf5c41ca Don't use password type keyboard for number input
Some devices will use secure keyboard for password input.
2024-01-14 16:40:50 +08:00
FooIbar bc6d12a873 Fix typo 2024-01-13 18:26:42 +08:00
FooIbar 4d983830df Refine exception translation 2024-01-13 12:27:52 +08:00
FooIbar 2f1e0d030e Revert "Reduce image target size since we are using fill"
This reverts commit c07d9da7

Reason for revert: Coil provides more precise target size control
compared to `ImageDecoder.setTargetSampleSize`.
2024-01-12 15:03:38 +08:00
FooIbar b7c873a172 Minor cleanup 2024-01-12 14:16:38 +08:00
renovate[bot] 9d5eb55290 Update compose.destinations to v1.9.59 2024-01-11 12:08:16 +00:00
renovate[bot] 78ffb1c4fe Update dependency com.google.android.material:material to v1.12.0-alpha03 2024-01-11 00:37:42 +00:00
renovate[bot] 031d622d5d Update androidx.lifecycle to v2.7.0 2024-01-10 19:49:20 +00:00
renovate[bot] 34da120a43 Update compose.destinations to v1.9.58 2024-01-10 19:46:27 +00:00
FooIbar 5285e1ccf2 Update coil to 3.0.0-alpha02 2024-01-10 21:10:40 +08:00
FooIbar e28efc1f50 Fix request news 2024-01-09 22:52:21 +08:00
FooIbar 1c043a81a6 Adapt coil3 changes 2024-01-09 22:09:39 +08:00
Vladimir DostoyevskiyandGG Bond 9a769cc7b6 Rust refactor (#617)
* Introduce deref_direct_bytebuffer

* Cleanup

* Cleanup

* Cleanup

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-01-07 17:56:49 +00:00
FooIbar 045c6abe40 Revert "Always enable predictive nav" (#616)
* Revert "Always enable predictive nav"

This reverts commit 0333a8c679.

* Disable predictive nav animations by default
2024-01-07 13:45:28 +00:00
FooIbar 4ad5cef412 Fix unable to move to first page on first attempt 2024-01-07 14:24:31 +08:00
GG Bond c3ffab3c79 Move to official aboutlibraries m3 widget 2024-01-07 13:36:53 +08:00
FooIbar c82de0b779 Fix delayed application of HTTP engine changes 2024-01-07 13:36:41 +08:00
FooIbar 4e36cbabc0 Fix crash on get 509 and mDownloadReference > 1 2024-01-06 23:49:26 +08:00
FooIbar 94f87b14b7 Fix download state not updating 2024-01-06 23:49:26 +08:00
FooIbar 6bc80d1afa [Marshmallow] Archive support 2024-01-06 22:02:00 +08:00
FooIbar fe4d004083 Fix request news 2024-01-06 20:41:30 +08:00
FooIbar 28410befa3 Java 21 2024-01-05 17:36:03 +08:00
Vladimir Dostoyevskiy 515f7deb7e Update compose snapshot 2024-01-04 09:18:07 +08:00
renovate[bot] 800e66261e Update dependency com.android.application to v8.2.1 2024-01-03 19:15:18 +00:00
renovate[bot] 65658c4a02 Update dependency io.github.raamcosta.compose-destinations:core to v1.9.57 2024-01-03 17:09:11 +00:00
FooIbar 0488c7ebf4 Fix restartGalleryProvider being called on start 2024-01-03 22:09:53 +08:00
FooIbar c30c1b29ef Workaround loading images from file uri 2024-01-03 19:49:47 +08:00
GG Bond 876001ad99 Adapt coil3 changes 2024-01-03 19:13:55 +08:00
FooIbar 60dc59adbc Fix concurrent modification 2024-01-03 17:17:19 +08:00
FooIbar c994890f28 Don't retry too many times on the same request 2024-01-03 17:16:10 +08:00
FooIbar 76223a2cd2 Drop fixed workaround 2024-01-03 15:10:37 +08:00
FooIbar 6274b39b68 Kotlin 2.0.0-Beta2 2024-01-03 11:24:26 +08:00
FooIbar cca3a3e350 Lower crop border threshold
Some images have white edges on both left and right.
2024-01-02 21:39:59 +08:00
FooIbar 86ef8f2b48 Ensure cropped images meet minimum width/height 2024-01-02 18:41:53 +08:00
Vladimir DostoyevskiyandGG Bond 5d116d9477 Image wrap a CoilImage (#588)
* Image wrap a CoilImage

* Make ImageSource sealed

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-01-02 07:43:31 +00:00
Vladimir DostoyevskiyandGG Bond 6e73fcc8c9 Cleanup Image decode (#587)
* Move to coil snapshot

* Unify decode with coil

* Unify decode with coil

* Add AnimatedImageDecoderDecoder

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2024-01-02 06:48:15 +00:00
FooIbar 3bd12a3047 Fix typo 2024-01-01 22:40:27 +08:00
FooIbar c99d8e8275 [Marshmallow] Support crop image borders 2024-01-01 20:18:00 +08:00
FooIbar 4a12e71877 Fix crash in comment screen after leaving the app 2024-01-01 17:36:53 +08:00
GG Bond 3043901b5a Resolve #579, Resolve #581 2024-01-01 15:25:49 +08:00
renovate[bot] 7cc28955d6 Update dependency com.mikepenz.aboutlibraries.plugin to v10.10.0 2023-12-31 13:20:37 +00:00
FooIbar ef44bb4857 Prepare for next iteration 2023-12-31 19:50:55 +08:00
FooIbar 37660ef697 Prepare for release 1.10.2 2023-12-31 19:50:11 +08:00
FooIbar 9821b3aaab Fix lint 2023-12-31 18:55:48 +08:00
FooIbar 1f5331af5a Update lint plugin and fix some issues 2023-12-31 18:55:48 +08:00
Vladimir DostoyevskiyandGG Bond 3ea6c82a6d Don't unwind (#574)
* Don't unwind

* Fixes

* Abort in panic

* Refine

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-31 09:39:29 +00:00
FooIbar ba53d01fa1 Show tip if move favorites failed 2023-12-31 17:29:58 +08:00
FooIbar df8ae8d11a Refine crop border (#573)
* Refresh adapter instead of recreate viewer

* Convert crop broder icons to ImageVector

* Cleanup res
2023-12-31 07:42:01 +00:00
Vladimir DostoyevskiyandGG Bond c817726ab3 Use Cbor (#572)
* Track marshal/unmarshal performance

* Use Cbor

* Refine

* Drop logging

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-31 07:36:42 +00:00
FooIbar 9eb606810f Avoid detecting gallery URL copied from share menu 2023-12-31 14:10:16 +08:00
Vladimir DostoyevskiyandGG Bond fbb030ec8e Drop custom PtrCursor (#569)
* Drop custom PtrCursor

* Drop unused crate

* Fixup

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-31 05:51:14 +00:00
FooIbar 28afebefb1 Follow coil 3 API changes (#570)
* Follow coil 3 API changes

* Use coil 3.0.0-alpha01
2023-12-31 05:14:25 +00:00
FooIbar da2610657c Fix typo 2023-12-31 12:37:17 +08:00
Vladimir DostoyevskiyandGG Bond 6e3471ba1b Refactor Rust parser, decouple with JNI for better further KMP support (#568)
* Use serde & kotlinx serialization to marshal jni data

* Introduce unmarshalParsingAs

* Comments

* Introduce parse_marshal_inplace

* Convert parseLimit

* Aha, convert parseGalleryInfoList

* Drop cache_unwind

* Unwind manually

* Fixes

* Drop jnix, update jni

* Data class

* Cleanups

* Cleanups

* Optimize a copy

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-30 20:45:11 +00:00
FooIbar 5a9ab6c4eb Fix snackbar dismiss action color 2023-12-31 01:25:47 +08:00
1fe553d039 Initial crop Border using cpu (#530)
* Initial get crop rect for bitmap

* Adapt for RGBA8888

* Support crop with rect in SubsamplingScaleImageView

* Settings to control crop border

* BottomBar to control crop border

* Fix rgb detect

* Update border.c

* Update Image.kt

* Fix webtoon

* Don't copy if not isAtLeastQ

* Refine

* Avoid too large bitmap

* Fix grey calculation

* Revert "Avoid too large bitmap"

This reverts commit d58dbe12062586ffe4ce4b872aace48b23ad9fde.

* Use matrix to draw bitmap to bypass the size limit

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2023-12-30 13:04:58 +00:00
GG Bond 42e0b0aeab Drop explicitly fabbuilder reallocation, buildFab within snapshotFlow 2023-12-30 11:44:27 +08:00
GG Bond 9e0ea32296 Update snapshot 2023-12-29 23:59:09 +08:00
FooIbar d3f5274b7e Hide comment button in guest mode 2023-12-29 22:37:10 +08:00
FooIbar faff0733e9 Fix unintended spaces in comments 2023-12-29 22:11:47 +08:00
FooIbar 7b32cde7dd Reword current image limits to reduce confusion 2023-12-29 21:14:12 +08:00
FooIbar 648d1d10b3 Always retrieve gallery detail from cache
Serialization & deserialization will create a new copy
2023-12-29 21:10:34 +08:00
Vladimir DostoyevskiyandGG Bond 52727100a0 Use ParcelFileDescriptor.open for RawFile, SAF sucks! (#561)
* Use ParcelFileDescriptor.open for RawFile, SAF sucks!

* Refine

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-29 20:09:45 +08:00
FooIbar 8a2dbb99f0 Fix comments not showing after commenting 2023-12-29 13:22:36 +08:00
Vladimir DostoyevskiyandGG Bond d880b30ea9 Move to coil NetworkFetcher (#558)
* Move to coil NetworkFetcher

* Fixup

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-29 04:15:24 +00:00
renovate[bot] 0e2ca4e150 Update dependency org.jsoup:jsoup to v1.17.2 2023-12-29 03:48:18 +00:00
FooIbar e0eef82ed8 Fix crash when suggestions have the same keyword 2023-12-29 09:51:00 +08:00
FooIbar 09839086a2 Refactor drag reordering 2023-12-29 09:17:46 +08:00
renovate[bot] 3ca3ab7273 Update compose.destinations to v1.9.56 2023-12-28 05:09:40 +00:00
GG Bond 8386bf9c69 Fix regression again 2023-12-28 00:39:06 +08:00
GG Bond 99b8ee1f78 Adjust anim specs 2023-12-28 00:39:06 +08:00
GG Bond 0333a8c679 Always enable predictive nav 2023-12-28 00:39:06 +08:00
GG Bond e0bb09e902 Update compose snapshot, Resolve #413 2023-12-28 00:39:06 +08:00
GG Bond 77677cead3 Fix regression 2023-12-27 22:39:35 +08:00
GG Bond d4b2ff7de9 New nav anim motion 2023-12-27 22:39:35 +08:00
GG Bond b81bae09d1 Update Predictive Back for NavHost, use SeekableTransitionState 2023-12-27 22:39:35 +08:00
Vladimir DostoyevskiyandGG Bond 846e66a56c UniFile Refactors (#546)
* Use DocumentsContractCompat

* Make UniFile.imageSource a extension

* Make UniFile.openFileDescriptor a extension

* Use appCtx

* Use appCtx

* Use appCtx

* Use appCtx

* Drop saveImageToLauncher

* Cleanup

* Use operator resolve

* Simplify

* Fix Toast

* Fixup

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-27 08:00:32 +00:00
FooIbar 5cec635e52 Update lock-threads.yml
[no ci]
2023-12-27 15:45:35 +08:00
Vladimir DostoyevskiyandGG Bond 8d0dc88125 Implement lookup cache for UniFile (#545)
* Implement lookup cache for RawFile

* Implement lookup cache for TreeDocumentFile

* Drop unused UriHandler

* UniFile.subFile never return null

* Nonnull UniFile.fromFile

* SingleDocumentFile use appCtx

* TreeDocumentFile use appCtx

* MediaFile use appCtx

* Refine

* Refine

* Refine

* optimize TreeDocumentFile cache

* optimize RawFile cache

* Take care of dir lookup cache cause memleak

* Fixup

* Fixup

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-27 04:30:20 +00:00
FooIbar 51b58bb797 Convert MainActivity dialogs to use DialogState (#544)
* Convert MainActivity dialogs to use DialogState

* Always open settings if the button is clicked
2023-12-26 14:58:00 +00:00
Vladimir DostoyevskiyandGG Bond f79aa2350c Refactor UniFile, allow all image format, Resolve #529 (#543)
* Refactor UniFile, allow all image format, Resolve #529

* Refine

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-26 14:50:28 +00:00
FooIbar 719dddeab9 Fix search bar hint not updating 2023-12-26 21:12:32 +08:00
FooIbar c1522568fd Cleanup legacy code 2023-12-26 20:50:31 +08:00
FooIbar 3ad6b9106b Merge ConfigureActivity into MainActivity 2023-12-26 20:45:22 +08:00
FooIbar 549387ac91 Strip okhttp's public suffix database (#539)
As cookies are handled by ktor now
2023-12-25 20:24:42 +08:00
Vladimir DostoyevskiyandGG Bond 7d2f985ffa Introduce DownloadThumbInterceptor (#538)
* Introduce DownloadThumbInterceptor

* Fixup

* Update DownloadInfoMagics.kt

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-25 09:27:49 +00:00
GG Bond 7e8b0a5800 No longer need restart to switch HC 2023-12-23 15:23:45 +08:00
FooIbar 69252ae8a4 Fix old download label not displayed when renaming 2023-12-22 14:53:45 +08:00
FooIbar eeed56b211 Fix crash when suggestions have the same keyword 2023-12-22 14:44:06 +08:00
renovate[bot] 8aaad071ea Update dependency com.google.devtools.ksp to v2.0.0-Beta2-1.0.16 2023-12-20 00:51:14 +00:00
FooIbar 7ef67e1bf9 Update CHANGELOG.zh-CN.MD
[no ci]
2023-12-19 19:05:16 +08:00
FooIbar 1c15d9a956 Prepare for next iteration 2023-12-19 18:36:49 +08:00
FooIbar 70082090a1 Prepare for release 1.10.1 2023-12-19 18:34:50 +08:00
FooIbar dbc1a32496 Update changelog for 1.10.1 (#526)
[no ci]
2023-12-19 18:34:04 +08:00
FooIbar e8c9ee5dd0 Cleanup obsolete logs 2023-12-19 16:41:33 +08:00
FooIbar 5c3657736b Dump heap on OOM 2023-12-19 16:41:33 +08:00
FooIbar 5191408d06 Provide dismiss action for snackbars with actions 2023-12-19 14:09:33 +08:00
FooIbar 347ce6854d Fix missing content warning cookie in guest mode 2023-12-19 11:17:58 +08:00
FooIbar f86dec9b2e Workaround unable to exit search field on API < 28 2023-12-19 09:46:24 +08:00
FooIbar c74b128b1a Debounce slider value changes 2023-12-19 09:46:13 +08:00
FooIbar 8ee28a4b4f Update history regardless of availability
In case the gallery is taken down by DMCA.
2023-12-18 13:56:01 +08:00
renovate[bot] 3b07b6997d Update dependency com.squareup.okhttp3:okhttp-bom to v5.0.0-alpha.12 2023-12-17 16:15:10 +00:00
FooIbar f59023ed03 Disable some unnecessary logging 2023-12-17 23:05:47 +08:00
FooIbar 3fc13e61c3 Refine download delay 2023-12-17 22:52:04 +08:00
FooIbar ae22f448a8 Revert to use OkHttp as fallback engine
This partially reverts commit 7b67210876

Reason for revert: `setApplicationProtocols` used by Apache 5 HC is not
available until API 29.
2023-12-17 19:12:56 +08:00
renovate[bot] 450c15d51e Update dependency com.squareup.okio:okio-jvm to v3.7.0 2023-12-17 01:17:50 +00:00
FooIbar d9e5bb4399 Fix unreleased lock 2023-12-17 01:03:57 +08:00
FooIbar 369904f659 Don't update page state on force retry 2023-12-16 16:35:49 +08:00
FooIbar 96302b2344 Log before making requests instead of after 2023-12-16 16:26:13 +08:00
FooIbar eeffb12e3b Cleanup code 2023-12-15 15:42:03 +08:00
FooIbar 57c12f7df0 Prepare for next iteration 2023-12-14 22:54:08 +08:00
FooIbar 37eb2f1aed Prepare for release 1.10.0 2023-12-14 22:50:41 +08:00
renovate[bot] c70ec5f354 Update dependency dev.chrisbanes.compose:compose-bom to v2023.12.00-alpha04 2023-12-14 14:42:27 +00:00
FooIbar 7139af4629 Update renovate.json
[no ci]
2023-12-14 22:25:27 +08:00
FooIbar a2bac029f5 Update renovate.json
[no ci]
2023-12-14 22:21:04 +08:00
FooIbar 6c68074e8b Update CHANGELOG.zh-CN.MD (#503)
[no ci]
2023-12-14 22:12:55 +08:00
FooIbar 991caf73f4 Fix ReaderPageSheet padding and ripple 2023-12-14 20:18:40 +08:00
FooIbar 0ba11641fa Update compose compiler 2023-12-14 19:45:32 +08:00
FooIbar b51120e914 Drop deprecated Accompanist libraries (#500)
* Migrate XML themes to Compose

* Vendor Accompanist WebView
2023-12-14 18:04:51 +08:00
GG Bond b02fb2d1d7 PagingSourceFactory capture mutableState only, Resolve #491 2023-12-14 12:46:42 +08:00
renovate[bot] c6247230da Update androidx.navigation to v2.7.6 2023-12-14 04:43:19 +00:00
renovate[bot] d64be78b4e Update dependency androidx.activity:activity-compose to v1.8.2 2023-12-14 04:19:48 +00:00
renovate[bot] e75f633165 Update androidx.lifecycle to v2.7.0-rc02 2023-12-14 04:18:36 +00:00
GG Bond 27c5598133 Fix build 2023-12-14 12:00:02 +08:00
renovate[bot] a9449bfbc7 Update dependency sh.calvin.reorderable:reorderable to v1.2.0 2023-12-13 07:32:39 +00:00
GG Bond 4fecbe259b Update compose snapshot, drop outdated workaround 2023-12-13 11:51:12 +08:00
GG Bond 81d72edbf0 Update compose snapshot 2023-12-12 16:04:32 +08:00
GG Bond ea7e6e4624 Support OutgoingContent.WriteChannelContent in CronetEngine 2023-12-10 21:40:27 +08:00
GG Bond 6335d5bca4 Fix search image 2023-12-10 21:40:27 +08:00
GG Bond 227b430dbb Animate comments update, Resolve #450 2023-12-10 11:36:14 +08:00
GG Bond 0bba56a29f Let GalleryList aware of favSlot update 2023-12-10 11:21:16 +08:00
FooIbar c07d9da7b0 Reduce image target size since we are using fill 2023-12-09 17:04:54 +08:00
Vladimir DostoyevskiyandGG Bond 900c5ed007 Remove unnecessary Image -> Drawable (#484)
* Remove unnecessary Image -> Drawable

* Refine

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-09 08:11:22 +00:00
Vladimir DostoyevskiyandGG Bond ba0788f6df Move to Coil 3 (#482)
* Move to Coil 3

* Fix R8

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-09 07:37:44 +00:00
Vladimir DostoyevskiyandGG Bond c517856e89 Convert ReaderPageSheet to Compose (#481)
* Convert ReaderPageSheet to Compose

* Cleanup unused

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-09 06:39:46 +00:00
Vladimir DostoyevskiyandGG Bond 791ee0ddbf Drop icon recompose fix (#480)
* Update snapshot and drop unused workaround

* Drop unnecessary fix

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-09 02:27:28 +00:00
Vladimir DostoyevskiyandGG Bond 0746938cb9 Compose bottom reader menu (#479)
* Migrate bottom reader menu to Compose

* Use Compose to animate bottom reader menu bars

* Cleanup unused

* Refine

* Cleanup to use DropdownMenu

* Cleanup unused

* Refine BottomReaderBar layout

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-08 17:23:51 +00:00
FooIbar bbae24aba9 Follow API rate limit to avoid IP ban (#478)
* Follow API rate limit to avoid IP ban

* Delay for bulk favorite adding to prevent flooding

* Revert "Delay for bulk favorite adding to prevent flooding"

This reverts commit 0c175453101aab2d6d200a661259906291ceac36.

* Make requests in parallel
2023-12-08 16:09:40 +00:00
FooIbar 677edb0e02 Make blur radius discrete to reduce overhead (#476)
* Make blur radius discrete to reduce overhead

* Refine
2023-12-08 14:22:51 +00:00
GG Bond a4328c5111 Workaround rating icon 2023-12-08 21:46:06 +08:00
GG Bond 27cf341fef Drop paging runtime 2023-12-08 21:46:06 +08:00
GG Bond bc654e98b8 Drop explicitly coordinatorlayout usage 2023-12-08 21:46:06 +08:00
FooIbar 588f78e598 Fix search bar padding in landscape mode 2023-12-08 16:40:42 +08:00
FooIbar 70f952285a Don't scroll to top on refresh in local favorites 2023-12-08 16:08:55 +08:00
GG Bond a6f5e4f98d Make sure computeIfAbsent inlined 2023-12-08 13:27:01 +08:00
FooIbar 6fe5c1d666 Use commit author name instead of login name
Fix parse error caused by invalid GitHub account
2023-12-08 13:08:31 +08:00
GG Bond 1dba12ec94 Cache VectorPainter for MetaRatingWidget 2023-12-08 12:50:19 +08:00
GG Bond aeb3f689d1 Fix to provide it with setMD3Content 2023-12-08 12:50:19 +08:00
GG Bond 0a2268d4de Allow VectorPainter to be cached 2023-12-08 12:50:19 +08:00
GG Bond 9a32b020cf Let GalleryTags prefer next column not multiple lines 2023-12-08 00:35:20 +08:00
GG Bond c5b01a7089 Update compose snapshot for lazygrid performance 2023-12-08 00:00:28 +08:00
GG Bond 0634fbb724 Optimize to use constant ConstraintSet 2023-12-07 22:48:06 +08:00
FooIbar 445e9511a0 Flatten layout 2023-12-07 20:20:10 +08:00
renovate[bot] ac532acb5b Update Rust crate once_cell to 1.19 2023-12-07 12:03:34 +00:00
FooIbar 7a8e21fbef Keep search bar state across configuration changes 2023-12-07 15:09:59 +08:00
GG Bond 58b0f3a41e Avoid graphicsLayer overhead 2023-12-07 13:24:31 +08:00
GG Bond ab373990cd Following tachiyomi 4146c4c31d069ce9fb7ab36d72f1f8fa2be1e050 2023-12-07 12:48:50 +08:00
GG Bond 272c157fe0 Compose PageIndicatorText, revert 3744018af8 2023-12-07 12:48:50 +08:00
GG Bond e5e047ee10 Move to Compose ReaderContentOverlay 2023-12-07 12:48:50 +08:00
renovate[bot] bf0b529018 Update dependency com.google.android.material:material to v1.12.0-alpha02 2023-12-06 19:19:11 +00:00
FooIbar acf2392406 Avoid progress indicator recomposing in background 2023-12-07 00:05:50 +08:00
FooIbar cecd6fb359 [no ci] Remove deprecated JCenter repository 2023-12-06 13:31:00 +08:00
Vladimir DostoyevskiyandGG Bond 7b67210876 Fallback engine should be Apache5 HC (#456)
* Drop explicitly okhttp dependency

* Move to Apache5 HC instead

* Fix build

* Credit to Ktor instead

* Refactor Cronet Preference

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-06 04:42:17 +00:00
Vladimir DostoyevskiyandGG Bond e40c4f2c71 Save body for ByteBuffer as well (#455)
* Save parseErrorBody for ByteBuffer as well

* Fix

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-05 13:52:08 +00:00
GG Bond b0717b38b1 Cleanup okhttp urlbuilder usage 2023-12-05 18:17:33 +08:00
GG Bond 18c9b95b9b Convert FavListUrlBuilder to use ktor UrlBuilder 2023-12-05 18:17:33 +08:00
GG Bond fc63c41ab0 Cleanup okhttp usage 2023-12-04 20:30:24 +08:00
GG Bond d1c7434993 Drop CloudflareInterceptor to synchronize behaviour 2023-12-04 20:30:24 +08:00
GG Bond da15ba8b9a Always use KtorHttpUriFetcher 2023-12-04 20:30:24 +08:00
GG Bond 1d2a2a3608 Fix to copy to FileChannel directly 2023-12-04 20:30:24 +08:00
renovate[bot] 145cd7a7c0 Update plugin spotless to v6.23.3 2023-12-04 08:06:29 +00:00
FooIbar 048415f3e0 Readd QUIC hints as cronet engine is now preferred 2023-12-04 12:41:39 +08:00
GG Bond 95ccabc756 Fix download origin image 2023-12-04 01:18:25 +08:00
FooIbar 1f08c0e08c Fix ProgressScreen layout 2023-12-04 01:09:49 +08:00
GG Bond b036aeef23 Refine 2023-12-04 00:46:58 +08:00
GG Bond d469a8404c Refine 2023-12-04 00:46:58 +08:00
GG Bond 5b16b6aed9 Hint the scheduler that we are mostly non-blocking 2023-12-04 00:46:58 +08:00
GG Bond 151949aecf Move SpiderDen to use ktor directly
Should have no performance regression, though benchmark is unavailable

Cache should be managed on ktor layer anyway
2023-12-04 00:46:58 +08:00
FooIbar de2c4ca3f5 Move category filters below search bar 2023-12-03 23:03:52 +08:00
FooIbar e5bebcfe80 [no ci] Update renovate.json 2023-12-03 21:50:00 +08:00
FooIbar 0080a482e4 [no ci] Don't update to SNAPSHOTs 2023-12-03 21:48:41 +08:00
FooIbar 756867416b Fix crash on clicking gallery link with page number 2023-12-03 21:43:05 +08:00
FooIbar 124ff2f190 Fix intent emitted before collection being missed 2023-12-03 21:16:16 +08:00
FooIbar 828a3d09b6 Move advanced options below search bar 2023-12-03 19:39:58 +08:00
FooIbar fc3b9d73ec Add language filter for search (#428)
* Add language filter for search

* Refine

* Refine
2023-12-03 06:44:00 +00:00
FooIbar ba943a31d4 [no ci] Update ci.yml 2023-12-03 13:35:29 +08:00
renovate[bot] 8ee1ac7617 Update dependency sh.calvin.reorderable:reorderable to v1.1.0 2023-12-03 05:30:30 +00:00
FooIbar 113f2a1794 Fix NPE (#433)
* Fix NPE

* Enable strict mode in debug environment
2023-12-03 05:14:09 +00:00
GG Bond f6028813e2 Limit CronetEngine to use 1 thread since we are totally async & non-blocking 2023-12-03 11:57:40 +08:00
GG Bond b094a32d12 Convert to use async Channel for reuse of CancellableContinuation 2023-12-03 11:57:40 +08:00
FooIbar fd3e4bdc60 Fix search bar offset on label change 2023-12-02 22:10:06 +08:00
FooIbarandVladimir Dostoyevskiy 142092d930 Add missing inline modifier (#426)
* Add missing inline modifier

* Update EhRequestBuilder.kt

* Update EhRequestBuilder.kt

---------

Co-authored-by: Vladimir Dostoyevskiy <99822064+VDostoyevskiy@users.noreply.github.com>
2023-12-02 12:15:30 +00:00
FooIbar 75e3e78ecb Update history when viewing downloaded galleries 2023-12-02 17:11:16 +08:00
FooIbar 053832681f Add search suggestion item placement animation 2023-12-02 15:54:20 +08:00
Vladimir DostoyevskiyandGG Bond 29e33d6e69 Initial CronetEngine (#421)
* Initial CronetEngine without UploadDataProvider support

* Support ByteArrayContent

* Cleanup

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-02 07:50:47 +00:00
FooIbar 2d878e2f1c Migrate to kotlinx datetime [1/2] 2023-12-02 15:34:51 +08:00
Vladimir DostoyevskiyandGG Bond 0fdbfbb1ae Move to Ktor Cookie handle, Part 2 (#419)
* Migration

* Migration

* Migration

* Migration

* Make EhCookieStore a CookiesStorage

* Drop CookieDB migration

* Drop one Okhttp cookie usage

* Drop one Okhttp cookie usage

* Remove typealias

* Move EhTagDatabase to use ktor

* Make cronet just use Dispatchers.IO

* Make all okhttpClient internally used

* Cleanup

* Refine

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-02 05:42:02 +00:00
Vladimir DostoyevskiyandGG Bond 52f314f6b0 Move to Ktor, Part 1 (#415)
* Ktor 3.0.0-beta-1

* Drop chunker since we no more se okhttp

* Move getGalleryDetail to ktor

* Migration

* Migration

* Migration

* Migration

* Migration

* Migration

* Migration

* Migration

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-02 09:33:46 +08:00
renovate[bot] ff8d8916aa Update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.5.0 2023-12-01 19:02:36 +00:00
FooIbar b2368b312f Prepare for next iteration 2023-12-01 22:41:12 +08:00
FooIbar 3cade906d6 Prepare for release 1.9.0 (#406)
* Prepare for release 1.9.0

* Add known issues

* Bump version

* [no ci] Rename CHANGELOG.MD
2023-12-01 22:35:47 +08:00
FooIbar e7cb33ef6f Fix calling Activity.recreate from IO thread 2023-12-01 22:25:12 +08:00
Vladimir DostoyevskiyandGG Bond 8c331c9577 Fix BottomSheet (#414)
* Fix BottomSheet

* Predictive Back for ModelBottomSheet

* Naming

* Naming

* Naming

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-12-01 22:13:03 +08:00
FooIbar 8560a050ba Make CheckBox/RadioButton text clickable and refine layout (#416)
* Make CheckBox/RadioButton text clickable

* Introduce LabeledCheckbox and refine layout
2023-12-01 13:59:28 +00:00
FooIbar 583637b692 Fix IME not hiding after performing search (#412)
* Fix IME not hiding after performing search

Regression of https://android.googlesource.com/platform/frameworks/support/+/8f81d46e2c3f37564d0b7515ec9411314645e187

* Add comment
2023-12-01 06:31:02 +00:00
FooIbar 791359e949 Fix last item placement animation 2023-12-01 13:30:17 +08:00
FooIbar e238b6aec0 Fix touch slop 2023-12-01 12:27:16 +08:00
renovate[bot] 17a143c4de Update dependency com.android.application to v8.2.0 2023-11-30 19:36:10 +00:00
FooIbar dfb0aa823e Fix crash when deleting downloads 2023-12-01 01:57:18 +08:00
renovate[bot] b5cad36967 Update kotlinx.serialization to v1.6.2 2023-11-30 15:53:13 +00:00
tehcneko 86378630bb Fix searchLayout close icon (#404)
* Fix searchLayout close icon

* Update GalleryListScreen.kt
2023-11-30 12:35:43 +00:00
Vladimir DostoyevskiyandGG Bond 730035aff7 Refine Fablayout (#403)
* Fix read page

* Refine FabLayout

* Let Fablayout have consistent animation state, walk consistently

* Let Fablayout collapse when secondaryFab updated

* Move animation delay out of FabLayout, should not handle that within FabLayout

* Refine predictive back

* Refine predictive back

* Introduce waitCollapse

* Refine

* Simplify

* Simplify

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-11-30 11:02:58 +00:00
renovate[bot] 64ac770c56 Update dependency dev.chrisbanes.compose:compose-bom to v2023.12.00-alpha03 2023-11-30 09:04:05 +00:00
FooIbar 557a5599e2 Make release build profileable 2023-11-30 16:47:41 +08:00
FooIbar ffd24015ac Update renovate.json
skip-checks: true
2023-11-30 13:19:25 +08:00
renovate[bot] 5eb1f12113 Update dependency androidx.work:work-runtime-ktx to v2.9.0 2023-11-30 04:48:06 +00:00
renovate[bot] 8425fed5a7 Update plugin spotless to v6.23.2 2023-11-30 03:01:33 +00:00
GG Bond 1e34aa4d9a Enable picker mode
Seems fixed by https://github.com/androidx/androidx/commit/4cf31c1a2c2a1f65fcb842490391c8a91fe44a84
2023-11-30 11:01:11 +08:00
GG Bond f383594050 Update snapshot 2023-11-30 11:01:11 +08:00
FooIbar 086db7572d Fix FAB not collapsing with no selected items 2023-11-30 09:28:26 +08:00
FooIbar 082e05584a Fix FAB animation 2023-11-30 09:28:14 +08:00
renovate[bot] fb20f899e2 Update dependency androidx.compose.ui:ui-text-android to v1.6.0-beta02 2023-11-29 22:58:17 +00:00
renovate[bot] c0c07ff2cf Update androidx.room to v2.6.1 2023-11-29 18:15:46 +00:00
renovate[bot] 2f67b741ff Update actions/setup-java action to v4 2023-11-29 16:26:11 +00:00
renovate[bot] 5a96048051 Update dependency gradle to v8.5 2023-11-29 14:58:30 +00:00
FooIbar 5d8b38ecf9 Fix HistoryScreen tip padding 2023-11-29 22:56:38 +08:00
FooIbar 2941ac8285 Add error tip for local favorites 2023-11-29 22:48:55 +08:00
FooIbar 07e316d9a9 Refine DownloadsScreen (#392)
* Fix downloads reorder and delete

* Fix download label edit and delete

* Fix changing download label
2023-11-29 14:15:37 +00:00
GG Bond 5bd9fa3a62 Drop compose viewbinding dependency 2023-11-29 18:25:23 +08:00
GG Bond 0b5da2b2dd Drop explicitly fragment dependency 2023-11-29 18:25:23 +08:00
GG Bond 714a8ccf65 Drop swiperefreshlayout dependency 2023-11-29 18:25:23 +08:00
GG Bond 5c731cc6b2 Drop rv selection dependency 2023-11-29 18:25:23 +08:00
GG Bond eda8115fe5 Revert "Drop fixed workaround"
Revert reason: BTF2 still not fixed
This reverts commit 3c988c63f244f0ec1bf027cc84d49c3e1c404aba.
2023-11-29 18:25:23 +08:00
GG Bond cf0a408b90 Drop fixed workaround 2023-11-29 18:25:23 +08:00
GG Bond f9786377a5 Update compose snapshot, new PullToRefreshContainer style 2023-11-29 18:25:23 +08:00
renovate[bot] 93f234b16d Update dependency com.google.devtools.ksp to v2.0.0-Beta1-1.0.15 2023-11-29 03:39:16 +00:00
GG Bond afb986937b Defer searchBarOffsetY read to minimize recompose scope 2023-11-29 11:38:54 +08:00
Vladimir DostoyevskiyandGG Bond 61fecaffe1 Workaround Infinity recompose (#387)
* Workaround Infinity recompose

* Observe all Snapshot apply that may trigger recompose when debug mode

* Continue to fix things up

* Fix things up

* Fix things up

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-11-28 17:03:37 +00:00
FooIbar 6f87afc1bf Fix navigation drawer padding 2023-11-28 23:35:43 +08:00
FooIbar 2e5950a1a8 Disable haptic feedback if ticks are too dense 2023-11-28 18:01:44 +08:00
FooIbar 4bf0c4ecec Minimize unnecessary network requests 2023-11-28 17:41:45 +08:00
FooIbar 3a8dbcdb32 Disallow empty gallery list result
It has to be a parse error
2023-11-28 16:10:22 +08:00
GG Bond 1f3546f3cc Fix remove fav 2023-11-28 15:12:17 +08:00
GG Bond f864d65d98 Don't collect If isInFavScene 2023-11-28 15:12:17 +08:00
GG Bond 3479498c6c optimize detailScreen state collect 2023-11-28 14:53:26 +08:00
GG Bond ac319330be Reduce allocation 2023-11-28 14:53:26 +08:00
GG Bond 9b3595e45f Reduce allocation 2023-11-28 14:53:26 +08:00
GG Bond d855858543 Refactor DownloadManager NotifyFlow 2023-11-28 14:53:26 +08:00
GG Bond ada52f1687 Reduce allocation 2023-11-28 13:42:59 +08:00
GG Bond ef68374f52 Reduce allocation on anim path 2023-11-28 13:42:59 +08:00
Vladimir DostoyevskiyandGG Bond 0bf8049021 Reduce allocation for getCategoryColor (#379)
* Reduce allocation for getCategoryColor

* refine

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-11-28 05:09:12 +00:00
GG Bond 3cff3f837a Reduce allocation in NavDrawer 2023-11-28 12:25:22 +08:00
GG Bond ca94a63762 Drop unused SimpleRatingView 2023-11-28 12:25:22 +08:00
GG Bond 81b8bc9029 Fixup 2023-11-28 12:25:22 +08:00
GG Bond 9d38520b85 Rename to *Screen 2023-11-28 12:25:22 +08:00
FooIbar 800e09adad Use relative links in READMEs 2023-11-28 11:40:30 +08:00
FooIbar 30d6c11220 Move showDatePicker to CommonOperations.kt 2023-11-28 01:36:55 +08:00
FooIbar e465356df8 Use large heap on API < 26 2023-11-28 00:52:18 +08:00
FooIbar ff8e1b7d28 Fix downloads and favorites selection 2023-11-27 23:34:01 +08:00
GG Bond 175e1d7df9 Convert TimePicker to use a dialogState 2023-11-27 23:05:00 +08:00
FooIbar 271c1b1390 Fix downloads filter and search 2023-11-27 23:02:24 +08:00
GG Bond a128356fc4 Cleanup unused 2023-11-27 22:33:16 +08:00
FooIbar 2ed957b5f2 Compose DatePicker 2023-11-27 22:12:01 +08:00
FooIbar 85bb9b9f97 Fix crash when TextField with focus is scaled to 0 2023-11-27 21:18:03 +08:00
GG Bond 050b5c0451 Kill EditTextDialogBuilder 2023-11-27 21:10:41 +08:00
GG Bond a14df3fc0c Fix bigicon tint in nightmode 2023-11-27 21:01:17 +08:00
GG Bond 939136476e Fix tip 2023-11-27 20:19:59 +08:00
GG Bond 7e2af653ee Cleanup unused 2023-11-27 20:19:59 +08:00
GG Bond d357a55307 Cleanup unused 2023-11-27 20:19:59 +08:00
GG Bond 23509ac2c9 Fix activity transition style 2023-11-27 20:19:59 +08:00
FooIbar 118a4f75c0 Fix crash info collector 2023-11-27 19:56:47 +08:00
renovate[bot] 2b8a7fafe6 Update plugin spotless to v6.23.0 2023-11-27 08:09:14 +00:00
Vladimir DostoyevskiyandGG Bond 10eda7e5f3 Introduce LockDrawerHandle (#360)
* Introduce LockDrawerHandle

* refine

* Ensure SearchBar PredictiveBackHandler is latest when enabled

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-11-27 08:08:54 +00:00
FooIbar c23cadec8a Cleanup snackbar usage
`SnackbarDuration.Short` is already longer than `Snackbar.LENGTH_LONG`
2023-11-27 15:16:11 +08:00
FooIbar 0114081a2b Fix search bar scroll-away offset 2023-11-27 14:14:59 +08:00
GG Bond 2611601fb9 Optional Predictive NavAnim 2023-11-27 13:56:36 +08:00
FooIbar 4194087f0b Fix GalleryInfoBottomSheet content padding 2023-11-27 13:27:42 +08:00
renovate[bot] 673adc41ba Update dependency org.jsoup:jsoup to v1.17.1 2023-11-27 03:09:59 +00:00
FooIbar b195ae25a8 Fix LazyList items jumping during scroll
https://issuetracker.google.com/issues/312025159
2023-11-27 02:19:22 +08:00
GG Bond 556c49fbfd Check meteredNetworkWaring 2023-11-27 00:37:19 +08:00
GG Bond 358a5249a4 Cleanup 2023-11-27 00:37:19 +08:00
GG Bond d5b837e6af CheckClipboard within Composables 2023-11-27 00:37:19 +08:00
GG Bond 61100d0c83 Upgrade lifecycle for new compose utils 2023-11-27 00:37:19 +08:00
GG Bond 8473ca9fff Observe Intent within Composables 2023-11-27 00:37:19 +08:00
FooIbar 37a2227c5c Fix OOB in DownloadsScreen 2023-11-27 00:16:05 +08:00
Vladimir DostoyevskiyandGG Bond d6a4ab7471 CompositionLocal Sheet State (#351)
* CompositionLocal Sheet State

* Fix typo

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-11-26 15:43:30 +00:00
GG Bond 6291288c42 Lowering default navAnim duration to 500ms 2023-11-26 23:25:22 +08:00
Vladimir DostoyevskiyandGG Bond 6c926419e9 Compose Era!!! (#346)
* Initial Kill Fragment!

* Cleanup

* Cleanup

* Convert to use Compose ModalBottomSheet

* Ignore insets

* Navigate

* Fixes

* Cleanup

* Fix navToWebview

* Fix navToWebview

* showtip

* Refine

* Fixes

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-11-26 15:02:03 +00:00
FooIbar f292f31ac1 Refine DownloadsScreen icons (#349)
* Convert big download icon to ImageVector

* Tweak download label icons
2023-11-26 14:54:29 +00:00
FooIbar 86a49f764e Add haptic feedback for drag and drop in Downloads 2023-11-26 22:32:04 +08:00
FooIbar 5dad21f4ea Fix download label drag and drop 2023-11-26 21:57:21 +08:00
FooIbar a4e9291bf9 Implement LoadStateIndicator 2023-11-26 21:08:18 +08:00
Vladimir DostoyevskiyandGG Bond 2a667e62f4 Compose DownloadScreen (#343)
* Initial Compose DownloadScreen

* Cleanup namespace

* Reorderable

* Reorderable

* Fixes

* Fix layout

* Fixes

* State labelList

* Fixes

* SwipeToDismiss

* RenameLabel

* Rewrite renameLabel to notify

* Fix name shadow

* Fixes

* Fixes

* SelectMode

* Drop unused

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-11-26 20:12:01 +08:00
FooIbar 6bd8063976 Replace thumb size setting with thumb column count 2023-11-26 15:09:43 +08:00
FooIbar 0aba5907b0 Fix title overflow 2023-11-26 01:05:57 +08:00
FooIbar 32182a7791 Fix keyword and title not updating 2023-11-26 01:05:57 +08:00
Vladimir DostoyevskiyandGG Bond 198960f93c Compose DownloadCard (#339)
* Cleanup res

* Compose DownloadCard

* Refine

* Fix CI

* Fixes

* Fix recompose

* Fix textStyle

* Fixes

* Fixes

* Restore design specs and clean up

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-11-25 16:46:07 +00:00
FooIbar 618f14a732 Reset search bar offset on loading 2023-11-26 00:09:44 +08:00
FooIbar fec2c39364 Extract common part of GalleryList and Favorites (#338)
* Extract common part of GalleryList and Favorites

* Scroll to top after refreshing
2023-11-25 15:15:28 +00:00
FooIbar dd06d82cd9 Refine side sheet layout 2023-11-25 16:38:30 +08:00
GG Bond 4c98ee5350 Refine CheckBox dialog design 2023-11-25 15:53:36 +08:00
GG Bond 2800a7bc15 Kill CheckBoxDialogBuilder 2023-11-25 15:53:36 +08:00
FooIbar 04818e5afb Fix IME won't pop up after dismissing dialog (#334)
* Fix IME won't pop up after dismissing dialog

* Add keep rule for reflection
2023-11-25 14:17:21 +08:00
Vladimir DostoyevskiyandGG Bond 122089eb1e Predictive Back for NavHost (#335)
* Grab navigation-compose

* Initial SeekableTransitions

* Refine

* Fixes

* Fix anim again

* Easeout Predictive Back

---------

Co-authored-by: GG Bond <whatever@tagkong.com>
2023-11-25 14:11:00 +08:00
GG Bond b991e5d70a Cleanup ActionBuilder 2023-11-24 22:21:03 +08:00
GG Bond 0d00ae207a Drawer blurs behind 2023-11-24 21:51:22 +08:00
GG Bond 9e451c18d9 Simplify GalleryInfoListItem placeholder 2023-11-24 21:32:36 +08:00
GG Bond 71ebd99115 Stateful listThumbSize 2023-11-24 21:22:08 +08:00
GG Bond 116dbead4b Stateful thumbSizeDp 2023-11-24 21:22:08 +08:00
FooIbar ef8adb00f4 Fix invisible FAB being clickable 2023-11-24 20:47:20 +08:00
FooIbar 7d74781f96 Collect debug info when dumping logs 2023-11-24 20:17:12 +08:00
Vladimir Dostoyevskiyandskymkmk b7627dc576 Fix GalleryList to use FastScrollLazyVerticalGrid when listMode (#324)
* Fix GalleryList to use FastScrollLazyVerticalGrid when listMode

* Fix recompose

* Initial PrefDelegate -> State<T>, MutableState<T>

* Migrate

* Optimize

---------

Co-authored-by: skymkmk <whatever@tagkong.com>
2023-11-24 10:44:38 +00:00
FooIbar cf42acd65c Lock side drawer as well 2023-11-24 18:31:34 +08:00
skymkmk 4163c895df Tweak SearchTab Design 2023-11-24 17:44:06 +08:00
FooIbar 63ddd5ea89 Fix side sheet padding 2023-11-24 17:17:33 +08:00
FooIbar 216dfded4b Fix downloads FAB animation 2023-11-24 16:50:29 +08:00
FooIbar 08b5eac6bd Restore history item delete animation 2023-11-24 16:14:53 +08:00
FooIbar 6e541be6ca Restore quick search item drag and drop animation 2023-11-24 15:48:47 +08:00
FooIbar 17a9c02f96 [Marshmallow] Fix OOM when decoding images 2023-11-24 13:22:23 +08:00
Vladimir Dostoyevskiyandskymkmk ed640ab00e Enhanced swipe-edge-oriented PredictiveBack (#317)
* Enhanced swipe-edge-oriented PredictiveBack

Following MDC NavigationDrawer design specs

* Cleanups

---------

Co-authored-by: skymkmk <whatever@tagkong.com>
2023-11-23 18:01:58 +00:00
skymkmk d69df5f7ab PredictiveBack for ModalNavigationDrawer, SideDrawer 2023-11-24 00:47:36 +08:00
FooIbar 6f6461e855 Fix disowned gallery uploader parsing 2023-11-24 00:06:59 +08:00
skymkmk 682d959688 All Easing for animateFloatMergePredictiveBackAsState 2023-11-23 23:31:02 +08:00
skymkmk 179686de16 Reimplement animateFloatMergePredictiveBackAsState 2023-11-23 23:31:02 +08:00
FooIbar 32e35622bd Kotlin 2.0.0-Beta1 (#312)
* Kotlin 2.0.0-Beta1

* Cleanup
2023-11-23 14:21:43 +00:00
c9c06202bb Compose GalleryListScene (#301)
* Initial Migrate

* Cleanup

* Search

* Refine

* Initial searchLayout

* Cleanup

* Margins

* Animated State

* Animated State

* Fixes

* ShowSearchFab

* Refine

* Log

* Refine naming

* Update

* Scroll to hide FAB

* Cleanups

* Initial side sheet

* Refine side sheet

* Refine layout

* Refine transition

* Refine padding

* Refine ProvideSideSheetContent to handle multiple screen on composition

* Let sidesheet container padding vec insets

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
Co-authored-by: skymkmk <admin@skymkmk.com>
2023-11-23 14:14:02 +00:00
FooIbar 42d17621f9 Fix advanced search not working 2023-11-23 21:42:55 +08:00
renovate[bot] 629044c241 Update dependency dev.chrisbanes.compose:compose-bom to v2023.12.00-alpha02 2023-11-23 12:48:58 +00:00
FooIbar 9be19489a4 Fix crash when visiting newer version galleries 2023-11-23 20:48:32 +08:00
FooIbar cde4f9e405 Fix refresh state 2023-11-23 20:48:21 +08:00
FooIbar 16fddcb377 Refine 2023-11-23 20:48:21 +08:00
FooIbar 35cff4647a Fix favorites refresh 2023-11-23 20:48:21 +08:00
renovate[bot] 80ad749fc2 Update compose.destinations to v1.9.55 2023-11-21 14:00:36 +00:00
FooIbar 1a1d444b20 Restore common actions in comment field 2023-11-21 22:00:18 +08:00
FooIbar bb2d500067 Refine FavouritesScreen layout 2023-11-21 21:53:44 +08:00
FooIbar c3c7e88c15 Fix pull request builds being pushed to users 2023-11-21 17:17:07 +08:00
FooIbar 8dc3b1f376 Restore secondary FAB fade 2023-11-21 16:53:49 +08:00
Lokesh Gidra b49a80bb35 Cleanup unused res 2023-11-20 21:45:40 +08:00
Lokesh Gidra 21bfd4dd2d Cleanup unused res 2023-11-20 21:45:40 +08:00
Lokesh Gidra 3551ed7c7a Refine ActionBuilder dsl 2023-11-20 21:45:40 +08:00
FooIbar 5f8ab98e9e Tweak settings transition animations 2023-11-20 17:48:56 +08:00
FooIbar 8c6b2f5366 Fix side sheet padding 2023-11-20 16:10:57 +08:00
Vladimir DostoyevskiyandLokesh Gidra bac60fbec8 Compose FavouriteScreen (#295)
* Restore FavouriteScene SideSheet dragToOpen

* Initial move to Compose FavScene

* Refine state

* Refine state

* Introduce ProvideSideSheetContent with extra checkers

* Make sideSheet activity private

* Dont allow provide a null AssistContent

* Restore trailingIcon to openSideSheet

* Refine

* Cleanup

* Implement searchBarConnection

* Reduce allocation for animation

* Initial compose FabLayout API

* Restore showGoToDialog

* Refine

* Refine

* Refine

* PullTORefresh

* PullTORefresh

* Refine Dsl

* Insetless placeholder

* let pullToRefresh use insetless padding as well

* Support drawer gestures

* Fix tip color and ripple

* Make pullToRefresh optional

* Composite container color

* Fix padding

* Fix misadd

* Fix gesture

* Fixes

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-20 07:09:35 +00:00
FooIbar 4eed03ebed Add configuration for lock bot 2023-11-20 11:37:38 +08:00
Lokesh Gidra e33295d0a6 Don't allow RecyclerView intercept ACTION_CANCEL TouchEvent as well 2023-11-19 16:22:21 +08:00
Vladimir DostoyevskiyandLokesh Gidra 07a495c499 Reimplement ModalNavigationDrawer to allow HistoryScreen gesture (#293)
* Reimplement ModalNavigationDrawer to allow HistoryScreen gesture

* Fix RTL, fix gesture disabled

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-19 07:53:54 +00:00
e69eba6023 Compose FabLayout (#290)
* ComposeFabLayout with Predictive Back

* Refine

* Fix padding

* Fix anim

* Fix scrim

* Cleanup

* Convert FavoritesScene to use ComposeFabLayout

* Convert DownloadsScene to use ComposeFabLayout

* Cleanup unused code

* Rename ComposeFabLayout to FabLayout

* Refine

* Refine

* Intercept MotionEvent.ACTION_CANCEL for rv have SelectionTracker attached

* Revert to old icons

* Revert FAB orders

* Cleanup resources

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
2023-11-19 09:21:52 +08:00
Lokesh Gidra 8be6ad84fc Get rid of IntList, LongList 2023-11-17 23:54:19 +08:00
Lokesh Gidra 59e46aeeea Navigate with GalleryDetailScreenArgs directly 2023-11-17 23:54:19 +08:00
renovate[bot] 4404531171 Update dependency com.android.application to v8.1.4 2023-11-16 19:51:03 +00:00
FooIbar 99db84fdd0 Cleanup code 2023-11-17 00:10:44 +08:00
FooIbar aa50b69754 Add rotate inertia for favSelectDialog 2023-11-16 23:15:02 +08:00
FooIbar fa2933df7c Workaround for BTF2 cursor not showing 2023-11-16 23:07:29 +08:00
FooIbar c51a26b9b7 Close drawer before navigating to another activity
Fix crash caused by activity recreate when it's invisible
2023-11-16 19:00:58 +08:00
FooIbar 9859a1eaac Fix amoled dark mode 2023-11-16 19:00:43 +08:00
Lokesh Gidra cd3858ace8 Rotatable fav select dialog 2023-11-16 14:27:51 +08:00
FooIbar 0c54e8b0b3 Allow setting search bar title 2023-11-16 12:47:33 +08:00
Lokesh Gidra e32a7b61b6 Workaround IME won't show again once hidden 2023-11-16 11:58:23 +08:00
FooIbar ea2977268b Follow upstream API changes 2023-11-16 11:21:20 +08:00
Vladimir Dostoyevskiy 6b529bcb18 Upgrade compose bom (#277)
* Upgrade compose bom

* Update settings.gradle.kts
2023-11-16 02:32:14 +00:00
FooIbar 941e7d18f3 Implement pull to refresh in GalleryCommentsScreen (#272)
* Use AndroidX snapshot builds

* Implement pull to refresh in GalleryCommentsScreen

* Don't use snapshot builds for other libraries
2023-11-16 09:34:29 +08:00
FooIbar d0fe9fac8c Fix crash when applying style to comment 2023-11-16 09:33:58 +08:00
FooIbar 8f37c5ba25 Fix favButton text not updating in gallery detail 2023-11-16 09:33:24 +08:00
renovate[bot] b63b36e6d2 Update dependency androidx.browser:browser to v1.7.0 2023-11-15 21:52:38 +00:00
renovate[bot] 081357cbb4 Update dependency androidx.activity:activity-compose to v1.8.1 2023-11-15 18:15:44 +00:00
renovate[bot] 0f7aa5f9ea Update kotlinx.serialization to v1.6.1 2023-11-15 16:07:25 +00:00
Lokesh Gidra a565b428e8 Apply blur to Compose Dialog 2023-11-15 21:05:45 +08:00
FooIbar 71f4df6f05 Fix download dialog checkbox ripple 2023-11-15 20:41:56 +08:00
FooIbar 5da2f91e6a Fix comment EditText height 2023-11-15 20:32:52 +08:00
FooIbar a6e9867596 Clear previous comment if it was in edit mode 2023-11-15 20:32:52 +08:00
FooIbar 9e1cff014d Minor cleanup 2023-11-15 20:32:52 +08:00
Lokesh Gidra 9c06f10d43 Drop explicitly androidx collection dependency
Since compose runtime depends 1.4.0a1 now
2023-11-15 20:11:56 +08:00
Lokesh Gidra 3f11df1dc6 Cleanup unused 2023-11-15 20:11:56 +08:00
Lokesh Gidra 6dd4505cec Convert download dialog to coroutine dialog 2023-11-15 20:11:56 +08:00
Lokesh Gidra 8faabd7759 Cleanup unused res 2023-11-15 19:03:40 +08:00
FooIbar 288e56d7e0 Fix search bar width 2023-11-15 15:23:15 +08:00
Vladimir DostoyevskiyandLokesh Gidra 7bcddb5f51 Initial limited support for BBCode editor (#260)
* Initial support edit

* Override LocalTextToolbar to reimpl BBCode editor: groundwork

* Impl

* Hacky

* Keep spans when editing

* Fix bold

* Fixes

* Initial AnnoStr to BBCode

* Implement edit with annotatedString

* Cleanup

* Cleanup

* Hack

* Some necessary comment

* Make url span a noop now

* Cleanup

* Cleanup

* Fix annotatedStr concat

* Fix toBBCode

* Clear focus as well

* Support Overlapped SpanStyle to BBCode

* Refine

* Cleanup code

* Fix algo

* Fix conflict

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-15 13:03:18 +08:00
FooIbar 7b0bd309e4 Fix light splash screen in dark theme on API >= 31 2023-11-15 01:19:53 +08:00
FooIbar 237938b1f0 Check temporary IP ban and refine error translation (#262)
* Check temporary IP ban and refine error translation

* Fix lint
2023-11-14 10:27:45 +00:00
FooIbar 07009f8bd6 Expose searchFieldState as workaround
Until we migrate GalleryListScene to compose
2023-11-14 16:09:23 +08:00
FooIbar f7ef768c8f Set default filter mode 2023-11-14 00:37:15 +08:00
FooIbar d1c3c9a37a Refine modifyFavorites 2023-11-13 18:23:58 +08:00
Lokesh Gidra 78f15860e0 Check sadpanda in cronet path 2023-11-13 18:23:58 +08:00
Lokesh Gidra 6b11773da9 ModifyFavoritesRange concurrently
Order?
2023-11-13 18:23:58 +08:00
Lokesh Gidra ed26cb8f35 Move modifyFavorites to use cronet 2023-11-13 18:23:58 +08:00
Lokesh Gidra 337f27dc38 Convert ghRequest to use stdlib Base64 impl 2023-11-13 18:23:58 +08:00
FooIbar 97fab45877 Avoid unnecessary overhead 2023-11-13 16:49:01 +08:00
FooIbar 8e8749ed6e Fix crash when initial composition hasn't been performed 2023-11-13 15:04:02 +08:00
Lokesh Gidra a0e999576e Fix comment textfield cursor color 2023-11-13 12:07:44 +08:00
Lokesh Gidra b29802c260 Keep GalleryDetail comments in sync 2023-11-13 11:32:24 +08:00
Lokesh Gidra 665e5a3d39 Immutable GalleryComment 2023-11-13 11:32:24 +08:00
Lokesh Gidra c2a2dafb47 Resolve #251 2023-11-13 11:32:24 +08:00
Lokesh Gidra 1d12a16e3d Resolve #250 2023-11-13 11:32:24 +08:00
Vladimir DostoyevskiyandLokesh Gidra f3fe5f0a75 Support cronetRequest with body (#248)
* Initial Add RequestBody support for cronetRequest

* Convert modifyFavorites to use cronet

* Code refactor

* Avoid some unnecessary copy

* Suppress NewApi for all managed usage

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-12 15:45:02 +00:00
Vladimir DostoyevskiyandLokesh Gidra 3bad1d06f4 Migrate more to cronet directly (#247)
* Convert GalleryListParser to parse a DirectByteBuffer

* Convert FavoritesParser to parse a DirectByteBuffer

* Limit buffer size

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-12 19:29:31 +08:00
FooIbar 70f2bfb760 Fix fab animation 2023-11-12 16:06:36 +08:00
Lokesh Gidra 9e86d42972 Predictive Back for Compose SearchBar
https://android-review.googlesource.com/c/platform/frameworks/support/+/2721593
2023-11-12 15:41:41 +08:00
FooIbar c8ade4d750 Fix recyclerview item disappearing 2023-11-12 01:39:16 +08:00
FooIbar 11b7bbd7ef Fix search bar text missing 2023-11-11 23:51:48 +08:00
Lokesh Gidra 513bce51ea Avoid unnecessary recompose in ReaderProgressIndicator 2023-11-11 22:57:04 +08:00
FooIbar f2c8c5d66d Mitigate OOM for API < 26 2023-11-11 22:44:55 +08:00
4e08f4f962 Compose Searchbar (#237)
* Migrate to Compose SearchBar

* Fix searchbar padding

* Fix content padding

* Implement scroll away behaviour

* Reset searchBarOffsetY when expand

* Fix multiple listener

* Fix cursor position

* Fix spotless

---------

Co-authored-by: FooIbar <118464521+FooIbar@users.noreply.github.com>
Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-11 13:03:11 +00:00
FooIbar a9bd55dff5 Restore fab rotation when showing and hiding (#235)
* Restore fab rotation when showing and hiding

* Make it rotate in the same direction
2023-11-10 12:29:01 +00:00
FooIbar 5cec825dbe Clean up duplicate imports 2023-11-10 18:05:20 +08:00
FooIbar 14c5b28cdc Refactor visibility animation for FabLayout 2023-11-10 16:41:42 +08:00
nullArrayListandLokesh Gidra 7693b11e0a Fix wrong SideSheetDialog usage (#231)
* Fix wrong SideSheetDialog usage

* Do not assume fragmentView first composition earlier than drawerView's

Use MainActivity composition instead

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-10 05:47:14 +00:00
FooIbar f9cb49e4d3 Only show commit subjects in changelog 2023-11-10 02:14:56 +08:00
Lokesh Gidra 892a614246 Drop overloadaggressively
https://r8.googlesource.com/r8/+/04d49b152b624a437db46e17410bb1cb1e4dd809
2023-11-09 22:34:31 +08:00
FooIbar 4a482d996e Reduce category min width for small screen devices
Tested-on: 4.65" 720x1280
2023-11-09 20:19:41 +08:00
Lokesh Gidra af9baa8ce4 Convert to use enableEdgeToEdge 2023-11-09 19:39:48 +08:00
Lokesh Gidra 39a11525a9 Rename EMPTY_GALLERY_COMMENT_LIST 2023-11-09 18:20:00 +08:00
Lokesh Gidra 2337dda4eb Remove EMPTY_GALLERY_TAG_GROUP_ARRAY
There is no reason to keep it
emptyList() always return a singleton
2023-11-09 18:20:00 +08:00
Lokesh Gidra c0a610a02b Remove GalleryApiInfo
No user now
2023-11-09 18:20:00 +08:00
Lokesh Gidra 85f7b54719 Convert GalleryComment to data class
Generate equals method for compose
2023-11-09 18:20:00 +08:00
Lokesh Gidra e0aea2fedf Convert GalleryTagGroup to data class
Generate equals method for compose
2023-11-09 18:20:00 +08:00
Lokesh Gidra ee83dbb877 Convert GalleryDetail to data class
Generate equals method for compose
2023-11-09 18:20:00 +08:00
Lokesh Gidra 1de4bc11eb Keep primary constructor only 2023-11-09 18:20:00 +08:00
FooIbar 04a7656afa Fix gallery detail refresh 2023-11-09 16:36:14 +08:00
nullArrayListandLokesh Gidra 77ec7e76e9 Refactor out animateFloatMergePredictiveBackAsState (#221)
* Refactor out animateFloatMergePredictiveBackAsState

* Revert EditTextHeight to 80dp

* Fix

* Fix animation when content too long

* Fix double navbar padding

* Fix lazycolumn jumpping

* Fix padding

* Fix padding again

* Refine

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-09 05:24:42 +00:00
FooIbar 9ca7be081a Built-in proguard rules are obsolete, use our own
Fix regression of #216
2023-11-09 10:30:27 +08:00
FooIbar fb36346f0b Fix variable shadowing (regression of #218) 2023-11-09 09:35:46 +08:00
FooIbar 95679f3fb9 Append skip H@H key to original image url on retry
Since original images may be served by H@H now
2023-11-09 01:04:49 +08:00
nullArrayListandLokesh Gidra addd4124c1 Initial Predictive back animation support for commentFragment Edittext (#217)
* Initial Predictive back animation support for commentFragment Edittext

* Fix

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-08 14:47:24 +00:00
FooIbar 74b79d9faa Use built-in proguard rules and @Keep annotation
`-keepattributes LineNumberTable,SourceFile` is not needed since R8 v8.2
APK size is increased by 1.7% though
2023-11-08 22:45:24 +08:00
nullArrayListandLokesh Gidra 9daa05ef02 Enable Predictive Back (#214)
* Enable Predictive Back

Tested with UP1A.231005.007, no bugs

* Fix Wrong SDK behaviour

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-08 19:06:41 +08:00
FooIbar 5ee884e0a2 Update thanks and Traditional Chinese README (#213)
* Update thanks and Traditional Chinese README

* Credit to Compose Destinations
2023-11-08 10:12:33 +00:00
FooIbar dba7f4e6c0 Fix inconsistent refresh state
Don't save it as `onRestoreInstanceState` will be called after loading
state has settled
2023-11-08 16:55:30 +08:00
FooIbar 8221514805 Update README.md 2023-11-08 16:54:00 +08:00
FooIbar 2ae3effc0e Move updates check to MainActivity 2023-11-08 16:09:45 +08:00
Lokesh Gidra 5b450ff18f Fix not filter all comments 2023-11-08 12:33:26 +08:00
Lokesh Gidra 92be6e9340 Explicitly reallocate lambda by key, fix download not work due to composer skip local fun reallocation 2023-11-08 12:33:26 +08:00
Lokesh Gidra 8884aeec11 Fix filter comment 2023-11-08 12:33:26 +08:00
Lokesh Gidra 8e15eda4e3 Fix navigate on IO thread crash 2023-11-08 12:33:26 +08:00
Lokesh Gidra 0dbf220655 Enable some compose compiler optimization 2023-11-08 12:33:26 +08:00
renovate[bot] fe69d59ef1 Update dependency com.android.application to v8.1.3 2023-11-07 23:30:33 +00:00
renovate[bot] 1e1f8350b5 Update dependency androidx.compose.compiler:compiler to v1.5.4 2023-11-07 19:07:38 +00:00
FooIbar afa2d03b56 Fix local favorites list jumping (#206)
* Revert "Fix local favorites scroll state loss"

This reverts commit c4be269f

* Enable placeholders as workaround

* Remove TODO

* Bump minimum fast scroller handler height to 48 dp

Make it consistent with `VerticalFastScroller`
2023-11-07 14:56:46 +00:00
FooIbar 1293d7fe28 Fix history not updated 2023-11-07 18:22:31 +08:00
renovate[bot] 62e879f2de Update dependency io.ktor:ktor-io-jvm to v2.3.6 2023-11-07 09:13:33 +00:00
Lokesh Gidra a771994f6f Introduce ActionBuilder 2023-11-07 17:13:15 +08:00
Lokesh Gidra 8c2ba051a0 Various cleanup for GalleryDetailScene 2023-11-07 17:13:15 +08:00
FooIbar ae2f289122 Make TorrentResult immutable and do some cleanup 2023-11-07 16:35:05 +08:00
nullArrayListandLokesh Gidra 703d63d106 Fragmentless GalleryDetailScene (#202)
* Initial fragmentless port

* Compile it

* Refine

* Refine

* All

* Fix

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-07 15:39:59 +08:00
FooIbar 2d7b024293 Fix unused resources inspection not working in AS (#200)
* Fix unused resources inspection not working in AS

* Remove unused resources

* Update CI

* Fix CI

* Add baseline for lint

* Test CI
2023-11-06 22:18:56 +08:00
Lokesh Gidra 26906f6709 Fix GalleryDetailScene comment ellipsize 2023-11-06 18:29:48 +08:00
Lokesh Gidra e9ec97403f Fix with missing ComposeWithMD3 2023-11-06 18:29:48 +08:00
Lokesh Gidra 34fb72707b Drop BaseToolbarScene since no user now 2023-11-06 18:29:48 +08:00
Lokesh Gidra fb7eb64c3a Drop unused xml layout 2023-11-06 18:29:48 +08:00
Lokesh Gidra ef65720999 Drop leakcanary since we will totally migrate to compose 2023-11-06 18:29:48 +08:00
Lokesh Gidra 3bc71d6798 Fix comment display limits 2023-11-06 18:29:48 +08:00
FooIbar c4be269fb7 Fix local favorites scroll state loss 2023-11-06 16:18:25 +08:00
nullArrayListandLokesh Gidra 1238edfe2b Compose GalleryCommentsScreen (#187)
* Initial Stub Compose GalleryCommentsScreen

* Initial Fab and edittext

* Refine comment edittext

* Support load more comments

* Animated loading state

* Refine, cleanup migrated things

* Initial comment dialog

* Refine

* Introduce buildAction dsl

* Impl voteComment

* Refine and cleanup migrated things

* Impl check vote status

* Refine

* Refine

* Padding a ime

* Support send commnet

* Cleanup all the code

* Let edittext and sendButton padding a navbar

* Let LazyColumn padding a ime

* Let LazyColumn contentPadding a edittext and fab

* Handle unresolved span with onCardClick

* Modify how LinkifyTextView works

* Adjust padding

* Adjust comment textstyle

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-06 03:19:59 +00:00
FooIbar 747fd23b96 Add experimental option to tweak swipe sensitivity 2023-11-05 10:57:20 +08:00
FooIbar 022f7a3ef1 Fix crash when clicking retry button in favorites 2023-11-04 23:59:40 +08:00
FooIbar e0cad8600c Fix crash caused by drawer state deserialization 2023-11-04 18:50:52 +08:00
renovate[bot] 9510ebbc31 Update dependency com.mikepenz.aboutlibraries.plugin to v10.9.2 2023-11-04 09:31:51 +00:00
FooIbar b63f2fd393 Limit request concurrency 2023-11-04 15:32:08 +08:00
FooIbar 95a0e9f03b Cleanup crash info collector 2023-11-04 14:25:01 +08:00
renovate[bot] 8265dd7f02 Update dependency com.google.devtools.ksp to v1.9.20-1.0.14 2023-11-03 03:58:14 +00:00
FooIbar 67feb19cab Fix unable to open drawer after double clicked 2023-11-03 00:46:10 +08:00
FooIbar 614e847de0 Fix incorrect favorite states in search results 2023-11-02 23:29:41 +08:00
renovate[bot] c2ff4b6a0b Update dependency com.android.tools:desugar_jdk_libs_nio to v2.0.4 2023-11-02 10:08:47 +00:00
FooIbar b273f1039c [Reader] Hide slider ticks if they are too dense 2023-11-02 18:08:31 +08:00
Lokesh Gidra bea0c6a1f0 Simplify with Fragment.ComposeWithMD3 2023-11-02 16:46:35 +08:00
Lokesh Gidra dcfaa361ec Extract a fragmentless ProgressScreen
ProgressScene.KEY_ACTION is always ProgressScene.ACTION_GALLERY_TOKEN, thus remove it
2023-11-02 16:03:03 +08:00
Lokesh Gidra 9904e166d2 Extract a fragmentless HistoryScreen 2023-11-02 15:13:52 +08:00
Lokesh Gidra 5f02769012 Extract a fragmentless GalleryPreviewScreen 2023-11-02 13:42:21 +08:00
nullArrayListandLokesh Gidra 19e5636dd2 Migrate ConfigureActivity to compose-destinations (#178)
* Add compose-destinations lib, prepare to drop fragment

* Move ConfigureActivity to compose destinations

* Restore navAnims

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-02 11:40:13 +08:00
renovate[bot] 9a220f89d9 Update androidx.navigation to v2.7.5 2023-11-01 18:01:33 +00:00
FooIbar 1c76ec813c Fix crash when clicking download notification 2023-11-02 02:01:16 +08:00
FooIbar d36c189430 Update xz to v5.4.5 2023-11-01 23:29:48 +08:00
FooIbar 61e2ace5c8 Fix insets on API < 29 2023-11-01 23:17:46 +08:00
Lokesh Gidra d6a3f21754 Fix a weird NPE 2023-11-01 22:12:07 +08:00
Lokesh Gidra 4e54d7f66f Refine FavouriteStatusRouter observable stateFlow 2023-11-01 22:12:07 +08:00
Lokesh Gidra f2dff038cd Global, CompositionLocal DialogState
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-01 19:37:22 +08:00
Lokesh Gidra a7b30640e0 Drop DrawerView
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
2023-11-01 19:37:22 +08:00
FooIbar 45048b1f46 [Marshmallow] Fix crash when saving images 2023-11-01 16:26:06 +08:00
FooIbar 498129314a Refine storage permission request 2023-11-01 15:42:55 +08:00
Officer 3ee4b4a61e Cleanup ReaderActivity & Fix activity not finish when no archive passwd available 2023-11-01 15:41:23 +08:00
FooIbar ee59c0f22e Convert ReaderActivity dialog to use a DialogState 2023-11-01 12:30:36 +08:00
FooIbar c56134cd92 Fix API results parsing error on certain galleries 2023-11-01 12:17:48 +08:00
renovate[bot] b3d1b66a06 Update dependency com.google.devtools.ksp to v1.9.20-1.0.13 2023-11-01 03:49:48 +00:00
renovate[bot] c9bb81bf63 Update kotlin to v1.9.20 2023-11-01 02:41:28 +00:00
FooIbar d176810dae Update compose compiler for kotlin 1.9.20 2023-11-01 10:38:36 +08:00
FooIbar 17bdca71b1 Reduce drawer and history item gesture sensitivity 2023-11-01 09:50:25 +08:00
FooIbar 22fd3730df Sync with upstream changes and cleanup code 2023-11-01 02:37:34 +08:00
FooIbar 23d1271949 Prepare for next iteration 2023-10-31 13:30:29 +08:00
FooIbar bf6aa3e8ae Release 1.8.11.0 2023-10-31 12:49:53 +08:00
FooIbar 75fcfde892 Always enable gestures if drawer is open 2023-10-31 11:58:13 +08:00
FooIbar 89be27995e Fix #154 regression (#158)
* Revert "Fix crash when deleting filters"

This reverts commit 717d3717ba.

* Revert "Update dependency dev.chrisbanes.compose:compose-bom to v2023.11.00-alpha02"

This reverts commit 38c18149

Reason for revert: https://issuetracker.google.com/issues/295745063#comment57
2023-10-31 03:45:25 +00:00
FooIbar 6738dc6cdc Partially enable drawer gestures for now 2023-10-31 11:34:14 +08:00
renovate[bot] 9ff0decb98 Update dependency io.coil-kt:coil-bom to v2.5.0 2023-10-30 23:02:14 +00:00
FooIbar 717d3717ba Fix crash when deleting filters 2023-10-31 03:25:25 +08:00
FooIbar fdbca869a8 Allow hiding comments below custom threshold 2023-10-31 00:44:32 +08:00
Astesia aafa750ca3 change runnable to coroutine job, and fix fragment compose memory leak (#152) 2023-10-30 22:39:29 +08:00
Astesia afe2bac672 Fix fragment compose view memory leak (#151)
* fix fragment compose view memory leak

* chang wildcard import
2023-10-30 20:07:37 +08:00
FooIbar b6f5d72db5 Fix NPE when evicting cache but Image was recycled
But why was it recycled?
2023-10-30 18:00:37 +08:00
FooIbar f0021a7601 Fix tag filters not working in thumbnail mode 2023-10-30 17:22:31 +08:00
FooIbar ea5bfbb346 Fix ViewModel memory leak 2023-10-30 12:32:11 +08:00
FooIbar 38fbcf4457 Update issue template 2023-10-30 00:48:24 +08:00
FooIbar 7c43e8f349 Avoid uncaught exceptions crashing entire app 2023-10-30 00:30:01 +08:00
FooIbar 93df4e3dd9 Revert "Scroll to top after refreshing" (#139)
* Revert "Fix progress not showing after clicking error tip"

This reverts commit bc914566dd.

* Revert "Try to fix recyclerview disappearing after refresh (#61)"

This reverts commit f9a3c3d266.

* Revert "Scroll to top after refreshing"

This reverts commit b0896ea465.
2023-10-29 14:44:42 +00:00
fricyo f7d45a52a7 Fix a strange word 2023-10-29 21:01:21 +08:00
FooIbar 328f96d115 Fix GalleryPreviewScreen insets 2023-10-29 20:57:01 +08:00
fricyo 22338a72d8 Complete the missing translations (#131)
* Complete the missing translations

* Remove the duplicate

* Update ""settings_eh_force_eh_thumb_summary""
2023-10-29 17:18:03 +08:00
FooIbar 256dedcb7c Add note for forceEhThumb 2023-10-29 16:36:49 +08:00
FooIbar 95d2438b84 Fix state recalculation after recompose 2023-10-29 16:19:59 +08:00
FooIbar f8d27e165e Update UI state on main thread and fix weight 2023-10-29 16:19:59 +08:00
FooIbar e2f024ae29 Fix reader not loading under certain circumstances (#128)
* Revert "Fix reader bug on certain orientation settings"

This reverts commit 6e59583dea.

* Revert "Skip `buildProvider` if the activity will restart"

This reverts commit a880f801fb.

* Preserve gallery provider in view model
2023-10-29 03:24:24 +08:00
FooIbar 9c28fbeaf8 Allow custom user agent string 2023-10-28 22:34:00 +08:00
FooIbar 6458eb090a Add missing color filter modes 2023-10-28 20:39:16 +08:00
FooIbar f1ca2b6958 Add animations for category chips 2023-10-28 19:34:32 +08:00
FooIbar 60f031e7e3 Fix crash when navController is not initialized 2023-10-28 13:43:32 +08:00
FooIbar e6a44ee0e1 Clarify system requirement for Marshmallow flavor 2023-10-28 02:49:27 +08:00
FooIbar 7a3a641a07 Fix crash when copying cookies 2023-10-28 02:10:13 +08:00
FooIbar 1021efb239 Fix NPE caused by coroutine cancellation 2023-10-27 23:35:23 +08:00
FooIbar edbe6509e1 Remember last viewed toplist 2023-10-27 20:37:20 +08:00
FooIbar 44a6253bfc Sync with upstream API changes 2023-10-27 19:40:41 +08:00
FooIbar 3d6e5df71e Leave 56 dp minimum edge gap for navigation drawer 2023-10-27 13:09:11 +08:00
FooIbar 2733d2e58c Convert more icons to ImageVector 2023-10-27 11:43:47 +08:00
FooIbar 0c78673870 Fix unexpected touch scale behavior in PageViewer 2023-10-27 03:11:00 +08:00
FooIbar d618948429 Set min width and max items in each row (#99)
* Set category chip to fixed width

* Set min width and max items in each row
2023-10-26 17:54:56 +00:00
FooIbar 7584704d22 Avoid race condition when updating tag database
`updateInternal` and `issueUpdateInMemoryData` will try to create tag
database directory at the same time on first launch and one of them will
fail, causing app crash
2023-10-27 00:10:59 +08:00
FooIbar 4a4658cc54 Dispatch and apply system bars insets separately 2023-10-26 22:43:43 +08:00
FooIbar e9875f1a24 Use lazy initialization instead 2023-10-26 21:01:01 +08:00
FooIbar cc11257d80 Suppress lint 2023-10-26 20:17:28 +08:00
FooIbar 4fd64601ef Use ImageVector icons 2023-10-26 19:45:29 +08:00
FooIbar 7eea490adf Drop RikkaX 2023-10-26 19:29:57 +08:00
FooIbar b2b12f7b93 Migrate from RikkaX Insets to Insetter 2023-10-26 13:22:23 +08:00
renovate[bot] 66d026cffa Update kotlin to v1.9.20-RC2 2023-10-26 04:12:31 +00:00
FooIbar 5a15a20dd6 Update compose compiler for kotlin 1.9.20-RC2 2023-10-26 12:09:43 +08:00
renovate[bot] 70450a9725 Update dependency com.google.devtools.ksp to v1.9.20-RC2-1.0.13 2023-10-26 00:43:46 +00:00
FooIbar 470a3c6a09 Move search fab to GalleryListScene 2023-10-26 00:03:04 +08:00
FooIbar 15f8b2f15d Cleanup code 2023-10-26 00:02:20 +08:00
FooIbar 717cbe7630 Request recomposition after view gets created 2023-10-25 23:51:09 +08:00
FooIbar d34075d29d Apply ime padding to suggestion list 2023-10-25 23:51:09 +08:00
FooIbar 80d4d66fb5 Dispatch insets from compose to android view 2023-10-25 23:51:09 +08:00
FooIbar 6b20b46761 Revert "Set bar style correctly"
This reverts 216a043094.

Reason for revert: Incorrect status bar color when app's night mode
setting is different from system's
2023-10-25 21:29:26 +08:00
FooIbar cd764a4a3c Fix spotless 2023-10-25 18:29:44 +08:00
FooIbar 5422b3d8bd Disable edge to edge temporarily 2023-10-25 17:42:32 +08:00
FooIbar 0273390d79 Flatten layout 2023-10-25 15:36:30 +08:00
FooIbar 8f7242b939 Bring search fab in front of search layout 2023-10-25 15:26:43 +08:00
FooIbar 246dee63b4 Move Context.findActivity to separated file 2023-10-25 13:24:28 +08:00
FooIbar 697918a73a Move navItems to top level 2023-10-25 13:11:21 +08:00
FooIbar 67e480220e Refine navigation drawer 2023-10-25 12:58:44 +08:00
FooIbar 5784eb008e Migrate navigation drawer to compose (#80)
* Drop AboveSnackerLayout

* Migrate navigation drawer to compose

* Suspend until logged in before loading

* Use AndroidViewBinding

* fixup! Migrate navigation drawer to compose

* Cleanup AboveSnackView usage

* Cleanup res

* Cleanup dependencies
2023-10-25 01:53:44 +08:00
FooIbar 82d66c4d57 Prepare for next iteration 2023-10-25 01:53:13 +08:00
FooIbar ab8671cc3b Revert "Exclude some libraries from aboutLibraries"
This reverts commit bc34f25a3c.

Reason for revert: Licenses should be included as per Apache 2.0
2023-10-24 23:53:25 +08:00
FooIbar 2e52dda208 Downgrade AGP to stable version but use newer lint (#81)
* Downgrade AGP to stable version but use newer lint

* Downgrade Java to 17 and use newer r8
2023-10-24 13:08:23 +00:00
renovate[bot] 1ab08d0ae1 Update Rust crate quick-xml to 0.31 2023-10-23 20:22:16 +00:00
FooIbar 702be0ed43 Use eh API as well if forceEhThumb is enabled 2023-10-23 22:37:55 +08:00
FooIbar 4067543701 Cleanup code 2023-10-23 16:03:01 +08:00
FooIbar 074689c60e Fall back if failed to retrieve data from API 2023-10-23 15:10:18 +08:00
FooIbar 2beb715df3 Cleanup code 2023-10-23 14:36:28 +08:00
FooIbar 7ea2597899 Fix large torrent list parsing 2023-10-23 02:25:17 +08:00
FooIbar 34a8f92865 Show meaningful error message if it's available 2023-10-23 02:25:17 +08:00
FooIbar 6e2a2de13f Reformat imports alphabetically
https://developer.android.com/kotlin/style-guide#import_statements
2023-10-22 22:13:45 +08:00
FooIbar e073232352 Fix cronet support detection 2023-10-22 17:52:16 +08:00
FooIbar 6f49b4d23e Fix deprecated 2023-10-21 18:22:45 +08:00
FooIbar 97cad20ab1 It's affected by AGP and NDK versions as well 2023-10-21 17:38:29 +08:00
FooIbar 9300a3d9ce Don't write cmake cache every time 2023-10-21 16:26:14 +08:00
FooIbar 28b7f80a8f Fix content behind navigation bar 2023-10-21 16:13:27 +08:00
FooIbar a06d23753a Lock navi drawer on where doesn't have navi icon 2023-10-21 13:10:46 +08:00
FooIbar 98d66b3e6c Release 1.8.10.1 2023-10-21 00:14:03 +08:00
FooIbar 6e59583dea Fix reader bug on certain orientation settings
Resolve #68
2023-10-21 00:12:52 +08:00
FooIbar 2f0571e384 Implement splash screen 2023-10-20 17:36:59 +08:00
renovate[bot] 64a6074e02 Update dependency org.jsoup:jsoup to v1.16.2 2023-10-20 06:11:31 +00:00
renovate[bot] 0b7cb4cf41 Update dependency com.android.application to v8.3.0-alpha09 2023-10-20 01:48:36 +00:00
renovate[bot] e620832e33 Update dependency com.google.android.material:material to v1.11.0-beta01 2023-10-19 23:03:41 +00:00
renovate[bot] f82e4af0e3 Update dependency com.android.application to v8.3.0-alpha08 2023-10-19 20:36:34 +00:00
FooIbar 02baa793f8 Release 1.8.10.0 2023-10-19 21:31:08 +08:00
FooIbar 9311a9e7f9 Implement download timeout 2023-10-19 21:15:55 +08:00
renovate[bot] 00a60ad6ab Update actions/checkout digest to b4ffde6 2023-10-19 11:51:36 +00:00
FooIbar e740c25211 Implement LoadStateAdapter for append/prepend load 2023-10-19 19:51:19 +08:00
FooIbar 79c6b63c56 Refactor image download and improve retry strategy 2023-10-19 14:50:22 +08:00
FooIbar bc914566dd Fix progress not showing after clicking error tip 2023-10-19 14:50:22 +08:00
FooIbar 2c6ccfb23d Enable showGalleryPages by default 2023-10-19 14:50:22 +08:00
FooIbar 646767e712 Add back cronet option for debugging 2023-10-19 14:50:22 +08:00
FooIbar 754b14d349 Simplify Java toolchain configuration 2023-10-19 14:50:22 +08:00
renovate[bot] 38c18149aa Update dependency dev.chrisbanes.compose:compose-bom to v2023.11.00-alpha02 2023-10-19 00:42:42 +00:00
renovate[bot] 35b448a274 Update dependency androidx.recyclerview:recyclerview to v1.3.2 2023-10-18 22:25:52 +00:00
renovate[bot] c1e63b5a5d Update androidx.room to v2.6.0 2023-10-18 18:31:20 +00:00
FooIbar 37f984829a Update docs to explain flavors (#64)
* Update README.md

* Update zh-cn.md
2023-10-18 09:45:33 +00:00
FooIbar 65942021d0 Kotlin 1.9.20-RC and Java 21 2023-10-18 02:06:09 +08:00
FooIbar ecef20d52b Use stable version of ktlint since 1.0.1 is out 2023-10-18 00:31:19 +08:00
FooIbar 1a092bb200 Fix total pages not updating for new archives 2023-10-18 00:22:37 +08:00
FooIbar a880f801fb Skip buildProvider if the activity will restart 2023-10-18 00:22:37 +08:00
FooIbar f00360e81c Fix stable channel update check 2023-10-18 00:06:10 +08:00
FooIbar 1737163364 Use product flavors for OSS and GMS variants (#62)
* Use product flavors for OSS and GMS variants

* Move code to kotlin directory

* Temporarily disable lint

* Fix CI

* Fix release

* Tweak release asset names
2023-10-17 10:11:59 +00:00
FooIbar f9a3c3d266 Try to fix recyclerview disappearing after refresh (#61)
* Try to fix recyclerview disappearing after refresh

* Another attempt

* Workaround: Use RefreshLayout's progress indicator
2023-10-17 04:49:20 +00:00
FooIbar 7db04e4359 Fix unable to show content in cutout area 2023-10-16 00:28:24 +08:00
FooIbar 934629d829 Add lint check for marshmallow (#58)
* Add lint check for marshmallow

* Treat some warnings as errors

* Fix attribute unused on older versions
2023-10-15 09:16:50 +00:00
FooIbar cd65bb057d Fix inlined constants on older versions 2023-10-15 15:45:00 +08:00
FooIbar f2d94f1ed6 Use product flavors to provide marshmallow support (#57)
* Use product flavors to provide marshmallow support

Fix crashing when opening archives

* Fix artifacts upload

* Change artifact names

* Fix app updater
2023-10-14 19:14:19 +00:00
FooIbar e29281ce39 Generate and upload native debug symbols 2023-10-15 01:09:44 +08:00
FooIbar 1e719a8738 Use local variable instead 2023-10-15 00:05:43 +08:00
FooIbar 92926487b6 Check if the image is GIF before doing mmap 2023-10-14 21:30:10 +08:00
FooIbar 69f744131a Use custom decoder factory instead
`ImageDecoderDecoder.Factory` is only applicable for animated images.
2023-10-14 19:59:17 +08:00
FooIbar 83cd9bdd00 Revert "Remove coil-gif library"
This reverts commit 1130f4f114.
2023-10-14 19:59:17 +08:00
FooIbar 1130f4f114 Remove coil-gif library
We only use coil for thumbnails, which are all static, and
`ImageDecoderDecoder` is only applicable for animated images.
2023-10-14 15:25:33 +08:00
FooIbar d99d9008dd Do not modify the original file when rewriting GIF
Make it a decode-time thing.
2023-10-14 15:25:33 +08:00
FooIbar 78f61b2396 Tweak the error message of getting a blank page 2023-10-14 14:48:47 +08:00
FooIbar 32829bbf15 Implement image subsampling on API < 28 2023-10-13 15:36:28 +08:00
FooIbar a2d3046070 Fix unable to hide hentaiverse notification
Resolve #51
2023-10-13 00:10:29 +08:00
FooIbar 95641e398a Refactor download delay to mitigate request flood 2023-10-12 22:30:53 +08:00
FooIbar 97c39d07e8 Update e-hentai / exhentai API URLs 2023-10-12 21:16:10 +08:00
FooIbar 14fa2fab71 Remove GIF support on API < 28 2023-10-12 19:29:57 +08:00
FooIbar ef8c31ae52 Upgrade ndk to 26.1.10909125
Fix ndk-stack
2023-10-12 15:04:29 +08:00
FooIbar 353080867a Build x86_64 apk for emulator 2023-10-12 14:29:39 +08:00
FooIbar 4d09b895d4 Refactor areContentsTheSame to compare entire objects 2023-10-11 01:08:46 +08:00
FooIbar 6c00d66334 Cleanup sad panda check 2023-10-10 22:43:35 +08:00
FooIbar 77de187207 Refine GalleryPageApiParser exception handling 2023-10-10 22:38:35 +08:00
FooIbar 79eec13856 Wrap exceptions thrown by native methods 2023-10-10 21:59:37 +08:00
FooIbar 562c6fa9a4 Fix tag database download on API < 24 2023-10-10 19:06:58 +08:00
FooIbar 9fa3ddd254 Downgrade minSdk to 23 (#48)
* Revert "Drop webp icon since minSdk is 28"

This reverts commit 9f77a4ce0a.

* Upgrade AGP and use K2 lint

* Enable core library desugaring and minSdk 23

* Fix some new API usage

* Add fallback image decoder for API < 28
2023-10-08 10:04:40 +00:00
FooIbar d11a0b9b8a Move AGP version to version section 2023-10-06 23:15:47 +08:00
FooIbar 41cf3fbe89 Cleanup version catalog 2023-10-06 15:54:43 +08:00
FooIbar ac12ab93e5 Add compose compiler to version catalog for renovate 2023-10-06 15:02:20 +08:00
FooIbar 8b4e978cf4 Migrate to version catalog 2023-10-06 14:39:47 +08:00
FooIbar c15f22400e Migrate to auto-mirrored icons 2023-10-05 23:36:07 +08:00
FooIbar 1773116313 Fix spotless not working 2023-10-05 23:23:39 +08:00
renovate[bot] 62424fbad1 Update dependency androidx.constraintlayout:constraintlayout-compose to v1.1.0-alpha13 2023-10-05 11:39:49 +00:00
renovate[bot] d07bd1aa29 Update ktor to v2.3.5 2023-10-05 10:25:27 +00:00
FooIbar 8433df09e3 Update compose-bom to v2023.11.00-alpha01 2023-10-05 15:11:35 +08:00
FooIbar 0634898cb6 Update gradle wrapper 2023-10-05 15:11:01 +08:00
renovate[bot] 2ebafc3eeb Update dependency gradle to v8.4 2023-10-05 05:59:33 +00:00
FooIbar 8288559e44 Drop GIF workaround on API 34 and above
https://android.googlesource.com/platform/frameworks/base/+/2be87bb707e2c6d75f668c4aff6697b85fbf5b15
2023-10-05 13:30:33 +08:00
renovate[bot] 2caf3f0174 Update navigation to v2.7.4 2023-10-05 04:36:23 +00:00
renovate[bot] e88e48906d Update dependency androidx.fragment:fragment-ktx to v1.7.0-alpha06 2023-10-05 00:53:42 +00:00
renovate[bot] 8fb5153983 Update dependency androidx.collection:collection-ktx to v1.3.0 2023-10-04 23:43:31 +00:00
renovate[bot] 03725b0ab4 Update dependency androidx.activity:activity-compose to v1.8.0 2023-10-04 19:07:04 +00:00
FooIbar b0896ea465 Scroll to top after refreshing 2023-10-04 21:24:28 +08:00
FooIbar 654e9a79c5 Don't append when all results were filtered out 2023-10-04 21:04:20 +08:00
FooIbar 7f541e2623 Fix side sheet not showing after swiped off 2023-10-04 15:43:26 +08:00
FooIbar 198e905050 Change block uploader icon 2023-10-03 22:42:31 +08:00
FooIbar 3744018af8 Revert "Move PageIndicatorText to Compose"
This reverts commit 7c987ec8
2023-10-03 18:41:16 +08:00
FooIbar a21ba04e95 Initialize Settings as early as possible 2023-10-02 19:50:13 +08:00
FooIbar bf4d39421b Cleanup code 2023-10-02 16:29:04 +08:00
renovate[bot] 2e4935715f Update dependency com.squareup.okio:okio-jvm to v3.6.0 2023-10-02 03:15:22 +00:00
FooIbar cf8ce9642a Make changelog scrollable 2023-10-02 00:02:48 +08:00
FooIbar cac65d9030 Fix insets for pre API 30 2023-09-30 23:19:52 +08:00
FooIbar 4a83829dfd Fix padding for scrollable 2023-09-30 23:19:52 +08:00
FooIbar c0348484fe Fix padding for the IME 2023-09-30 23:19:52 +08:00
FooIbar 213133ab45 Fix SignInScreen drawing behind the system bars 2023-09-30 23:19:52 +08:00
renovate[bot] 8469eac18c Update plugin com.diffplug.spotless to v6.22.0 (#33)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-29 07:35:40 +00:00
FooIbar 5aaa1bb5b3 Fix spotless 2023-09-29 15:20:43 +08:00
renovate[bot] 9f500b85e6 Update plugin com.android.application to v8.1.2 2023-09-28 18:40:08 +00:00
FooIbar 0d6fd8d7ad Workaround for SideSheetDialog (#31) 2023-09-27 14:05:21 +00:00
FooIbar 7e4b6dbf31 Fix memory leak 2023-09-27 19:47:57 +08:00
renovate[bot] 8bf3f0f094 Update plugin com.mikepenz.aboutlibraries.plugin to v10.9.1 2023-09-27 01:41:01 +00:00
renovate[bot] 198acef666 Update dependency com.mikepenz:aboutlibraries-core to v10.9.1 2023-09-26 21:03:06 +00:00
FooIbar 1d0c76b2b2 Fix OOB access when no results found 2023-09-26 19:26:32 +08:00
FooIbar 567875cf00 Apply quick search in place if not in Popular (#30) 2023-09-26 08:50:07 +00:00
FooIbar 58069e8925 Fix cmake cache for CI 2023-09-26 01:35:37 +08:00
FooIbar a90cf3c72b Update issue template 2023-09-26 01:28:01 +08:00
FooIbar 2fbf226ccd Update author summary in about 2023-09-26 01:23:11 +08:00
FooIbar d674672ce2 Update libarchive to v3.7.2 2023-09-26 00:28:54 +08:00
FooIbar dab7968ce3 Update liblzma to v5.4.4 2023-09-26 00:28:54 +08:00
FooIbar 510719f890 Convert libnettle build to FetchContent 2023-09-26 00:27:48 +08:00
renovate[bot] 96b92239b0 Update plugin com.mikepenz.aboutlibraries.plugin to v10.9.1-debug01 2023-09-25 08:06:51 +00:00
FooIbar 363029cbdd Upgrade r8 (#27) 2023-09-24 15:55:51 +00:00
FooIbar 7783a8de15 Cleanup build cache for CI 2023-09-24 17:52:06 +08:00
FooIbar 26a589fc1d Add native build cache for CI (#26)
* Add rust cache for CI

* Add cmake cache for CI

* Use cache for release as well

* Add build cache for CI
2023-09-24 08:10:17 +00:00
FooIbar 4c467c304f NDK will be installed automatically 2023-09-24 03:17:12 +08:00
FooIbar 9496b9396a Upgrade ndk to 26.0.10792818 (#24) 2023-09-23 18:52:46 +00:00
FooIbar 669a9ee1e3 Use spotless for ktlint integration 2023-09-24 02:12:39 +08:00
FooIbar d08b7c2d94 Update README 2023-09-23 22:32:54 +08:00
FooIbar 534f6aa22c Merge pull request workflow to CI 2023-09-23 19:13:43 +08:00
FooIbar 8ea731159f Prevent unnecessary regeneration of BuildConfig 2023-09-23 18:59:29 +08:00
renovate[bot] 7704fa9318 Update plugin com.mikepenz.aboutlibraries.plugin to v10.9.0 2023-09-23 09:34:12 +00:00
renovate[bot] d0e3de7121 Update dependency com.mikepenz:aboutlibraries-core to v10.9.0 2023-09-23 07:37:51 +00:00
renovate[bot] 40af1862a0 Update actions/checkout digest to 8ade135 2023-09-23 05:50:16 +00:00
FooIbar 33e24aa46c Fix CI for renovate 2023-09-23 13:49:34 +08:00
FooIbar 5a97561389 Upgrade gradle wrapper 2023-09-22 16:24:48 +08:00
FooIbar 26701d84f7 Cleanup redundant .gitignore 2023-09-22 15:56:27 +08:00
FooIbar d13b09aaf3 Fix swipe-to-refresh 2023-09-22 15:46:57 +08:00
FooIbar 6a65b61785 Store SearchLayout state in ViewModel 2023-09-22 15:02:18 +08:00
FooIbar 2b8bfab44b Fix minRating advanced search 2023-09-22 13:41:22 +08:00
FooIbar b9e1d79be6 Switch to branch automerging 2023-09-21 21:33:21 +08:00
renovate[bot] 0f9e1819c1 Update room_version to v2.6.0-rc01 2023-09-21 10:23:31 +00:00
renovate[bot] eda97347fc Update nav_version to v2.7.3 2023-09-21 08:09:21 +00:00
renovate[bot] 2bd24b6a8b Update dependency com.google.android.material:material to v1.11.0-alpha03 2023-09-21 04:56:54 +00:00
renovate[bot] 8306342ab6 Update dependency androidx.fragment:fragment-ktx to v1.7.0-alpha05 2023-09-21 00:45:03 +00:00
renovate[bot] 6b6ba91721 Update dependency androidx.activity:activity-compose to v1.8.0-rc01 2023-09-20 22:32:00 +00:00
FooIbar 68155e6a6b Refine modify favorites dialog layout 2023-09-16 18:36:44 +08:00
FooIbar bfbceefef2 Fix respectDefaultWidth not working 2023-09-16 17:08:13 +08:00
FooIbar 21b39135fe Tweak modify favorites dialog layout 2023-09-15 21:10:51 +08:00
FooIbar 6adc7f7221 Add option to disable category color harmonization 2023-09-13 20:21:06 +08:00
FooIbar 6bfa8d1ea4 Fix crashing when reordering downloads 2023-09-10 21:18:23 +08:00
FooIbar 6f22269d93 Disable swiping and dragging when in selection mode 2023-09-10 21:18:05 +08:00
FooIbar b68dc98ae0 Fix drawer lock states saving 2023-09-10 19:58:12 +08:00
FooIbar f9ad1f724b Don't show search fab when search view is expanded 2023-09-10 18:30:46 +08:00
FooIbar afd22635bd Update releases.yml 2023-09-10 16:41:46 +08:00
FooIbar a9f9706be3 Migrate from intFromStrPref to intPref 2023-09-09 17:39:29 +08:00
FooIbar 41f35498fe Update syn to v2.0 2023-09-09 16:06:46 +08:00
FooIbar 58628b6556 Update jni_fn to v0.1.2 2023-09-09 16:05:17 +08:00
FooIbar 875858618e Maintenance mode 2023-09-08 21:39:56 +08:00
FooIbar 70b7bf390a Sync with 1.8.9.x versionCode 2023-09-08 18:24:00 +08:00
FooIbar de3d6de4cf Revert "Sync rootProjName with repo name"
This reverts commit de9fa5be5a.
2023-09-08 18:01:58 +08:00
FooIbar e3b4caa37d Ignore expunged torrents 2023-09-08 17:15:46 +08:00
renovate[bot] f8e19f7772 Update paging to v3.2.1 2023-09-08 16:52:03 +08:00
renovate[bot] ea5dd8b1bf Update nav_version to v2.7.2 2023-09-08 16:51:29 +08:00
renovate[bot] bd7db1a016 Update dependency io.arrow-kt:arrow-stack to v1.2.1 2023-09-08 15:30:07 +08:00
renovate[bot] 02ac048d74 Update dependency androidx.lifecycle:lifecycle-process to v2.6.2 2023-09-08 15:26:41 +08:00
renovate[bot] 9a3c9b9cbd Update dependency androidx.fragment:fragment-ktx to v1.7.0-alpha04 2023-09-08 14:55:29 +08:00
renovate[bot] 80c77c740e Update dependency androidx.core:core-ktx to v1.12.0 2023-09-08 14:55:05 +08:00
renovate[bot] 0f62662963 Update dependency androidx.collection:collection-ktx to v1.3.0-rc01 2023-09-08 14:54:23 +08:00
renovate[bot] 576d6515db Update dependency androidx.activity:activity-compose to v1.8.0-beta01 2023-09-08 14:53:55 +08:00
FooIbar 30d29bfa80 Fix torrent parsing 2023-09-08 14:52:04 +08:00
FooIbar c7c0446f23 Tweak ParseException 2023-09-08 14:49:28 +08:00
FooIbar 134777584d Merge branch 'Ehviewer-Overhauled:1.8.x.x' into 1.8.x.x 2023-09-06 16:52:10 +08:00
renovate[bot] 0b64eadb0c Update actions/checkout action to v4 2023-09-04 16:52:00 +00:00
FooIbar ea93960bf4 Fix pages fields in AdvancedSearch 2023-09-01 19:30:21 +08:00
renovate[bot] 71032e3010 Update ktor to v2.3.4 2023-08-31 21:07:43 +00:00
FooIbar d6a3a351f5 Fix UI not updating after download state changed 2023-08-30 16:37:37 +08:00
FooIbar a574bca48e Kotlin 1.9.10 2023-08-30 16:22:18 +08:00
FooIbar 785faf1bf4 Upgrade ndk to r26 RC 1 2023-08-30 16:20:32 +08:00
FooIbar fbcc32b3ee Merge remote-tracking branch 'upstream/1.8.x.x' into 1.8.x.x
# Conflicts:
#	app/build.gradle.kts
2023-08-25 13:28:07 +08:00
renovate[bot] 46b19a9de5 Update room_version to v2.6.0-beta01 2023-08-24 15:49:05 +00:00
renovate[bot] d2f47d51f9 Update plugin com.google.devtools.ksp to v1.9.10-1.0.13 2023-08-24 10:15:46 +00:00
renovate[bot] db380507f5 Update nav_version to v2.7.1 2023-08-24 07:03:27 +00:00
renovate[bot] 84cf67d21a Update dependency composeOptions to v1.5.2 2023-08-24 03:49:47 +00:00
renovate[bot] 8f53591800 Update dependency androidx.fragment:fragment-ktx to v1.7.0-alpha03 2023-08-24 01:47:24 +00:00
renovate[bot] 65ffd78844 Update dependency androidx.activity:activity-compose to v1.8.0-alpha07 2023-08-23 23:18:25 +00:00
renovate[bot] c00b5e6635 Update serialization to v1.6.0 2023-08-22 23:06:02 +00:00
FooIbar 8160991086 Don't respond to touch events when scrolling 2023-08-22 19:27:44 +08:00
FooIbar f0c933d97a Replace deprecated method 2023-08-22 18:55:39 +08:00
renovate[bot] 3fb8d3e73b Update plugin com.android.application to v8.1.1 2023-08-22 06:12:17 +00:00
renovate[bot] d8efff9921 Update accompanist_version to v0.32.0 2023-08-21 14:07:10 +00:00
FooIbar 32170688b6 Support clearing image cache for specific gallery 2023-08-21 18:39:35 +08:00
FooIbar ca74bfe2e4 Merge branch 'Ehviewer-Overhauled:1.8.x.x' into 1.8.x.x 2023-08-17 22:52:55 +08:00
renovate[bot] 41767f0fd7 Update dependency gradle to v8.3 2023-08-17 14:50:21 +00:00
FooIbar c62ca4dd23 Fix DownloadsScene crash
java.lang.LinkageError: Method com.hippo.ehviewer.databinding.ActivityMainBinding com.hippo.ehviewer.ui.scene.DownloadsScene.getBinding() overrides final method in class Lcom/hippo/ehviewer/ui/scene/SearchBarScene
2023-08-17 20:24:34 +08:00
FooIbar 9c5eddb903 Remove embedded Cronet library 2023-08-17 17:51:44 +08:00
FooIbar 4a0df07805 Set User-Agent in CronetEngine.Builder 2023-08-17 00:03:13 +08:00
FooIbar 37a3edd44b Revert "Add quichint"
This reverts commit 4e427f27
2023-08-16 23:50:20 +08:00
FooIbar f117abd483 Revert "Add option for QUIC support"
This reverts commit 861c05db
2023-08-16 23:27:38 +08:00
FooIbar 4593714298 Cleanup DownloadManager 2023-08-16 23:12:18 +08:00
FooIbar a148fd6ec3 Use flow for DownloadsScene UI updates 2023-08-16 23:12:18 +08:00
FooIbar 23a44e2f3b Migrate DownloadAdapter to ListAdapter 2023-08-16 20:23:57 +08:00
FooIbar 01e03ec0f0 Support search in DownloadsScene 2023-08-15 23:03:52 +08:00
FooIbar 4594ac592c Merge branch 'Ehviewer-Overhauled:1.8.x.x' into 1.8.x.x 2023-08-15 17:44:38 +08:00
FooIbar eee0f2dded Fix FavoritesScene crash 2023-08-15 17:24:21 +08:00
FooIbar b4080302c3 Refine GalleryListParser 2023-08-15 16:22:55 +08:00
renovate[bot] 337e210b5b Update dependency com.google.android.material:material to v1.11.0-alpha02 2023-08-15 05:08:26 +00:00
FooIbar a05b9174d4 Tweak EhScreen layout 2023-08-14 23:12:39 +08:00
FooIbar aa8adfb6f7 Use LazyColumn in showSelectItem() 2023-08-14 23:10:32 +08:00
FooIbar 1034fcd7b0 Fix favorite button color 2023-08-14 21:11:55 +08:00
FooIbar 69a26aeedb Implement swipe-to-remove in Downloads and Favorites 2023-08-14 21:11:55 +08:00
FooIbar dd607b41e9 Show search fab in FavoritesScene 2023-08-13 19:13:08 +08:00
FooIbar fd45319715 Fix toplist 2023-08-13 00:14:44 +08:00
FooIbar c34ba56896 Start a new fragment if search was performed from Popular or Toplist 2023-08-12 22:47:20 +08:00
FooIbar 6e00a4133c Fix nav checked item 2023-08-12 17:51:52 +08:00
FooIbar 9924b6ec0b Cleanup layout 2023-08-11 13:49:16 +08:00
FooIbar 4d09504abc Fix swipe-to-refresh 2023-08-11 13:49:15 +08:00
FooIbar f901bd2336 Fix navigation transitions 2023-08-11 13:49:13 +08:00
FooIbar 187c35fe88 Fix "Copied to clipboard" message not showing in API 32 and lower 2023-08-11 13:48:51 +08:00
FooIbar cc94bed772 Fix error message when no hits found 2023-08-11 13:48:51 +08:00
FooIbar 8c9cdf46db Remove predictive back support
Reland after #1322 resolved
2023-08-11 13:48:51 +08:00
FooIbar 09dd200655 Migrate right drawer to side sheet 2023-08-11 13:38:17 +08:00
FooIbar 38294e8cfc Fix deprecated function 2023-08-11 13:38:17 +08:00
FooIbar 87a42cf53d Revert obsolete Workaround
This reverts commit 576ff1b0

Reason for revert: Fixed in `androidx.core:core:1.12.0-beta01`.
https://android.googlesource.com/platform/frameworks/support/+/8f7e02550620919fafb4c7fef8743f8c20562945
2023-08-11 13:38:15 +08:00
renovate[bot] 2adf2c15fa Update dependency androidx.browser:browser to v1.6.0 2023-08-10 15:31:44 +00:00
renovate[bot] 99ac2a287e Update room_version to v2.6.0-alpha03 2023-08-10 13:08:56 +00:00
renovate[bot] 371ccab596 Update nav_version to v2.7.0 2023-08-10 11:39:12 +00:00
renovate[bot] 590c505f33 Update dependency androidx.fragment:fragment-ktx to v1.7.0-alpha02 2023-08-10 06:27:27 +00:00
renovate[bot] 01c2f3ea69 Update dependency androidx.core:core-ktx to v1.12.0-rc01 2023-08-10 04:29:43 +00:00
renovate[bot] 4c4eec118d Update dependency androidx.constraintlayout:constraintlayout-compose to v1.1.0-alpha12 2023-08-10 01:27:55 +00:00
renovate[bot] 310be050d8 Update dependency androidx.collection:collection-ktx to v1.3.0-beta01 2023-08-09 22:24:00 +00:00
FooIbar 181e0301aa Fix onBackPressed callbacks order 2023-08-07 08:48:21 +08:00
FooIbar a86ca2e82c Move favorite button below header 2023-08-06 22:38:34 +08:00
FooIbar 85c911cf35 Tweak GalleryDetailScene button layout 2023-08-06 22:38:34 +08:00
FooIbar db57e2dde6 Use mobile UA for Cloudflare bypass
Allow custom UA in the future?
2023-08-05 18:25:39 +08:00
FooIbar c163ad42a6 Remove experimental status of Cloudflare bypass 2023-08-05 17:14:06 +08:00
FooIbar a2af3a4652 Manually resolve Cloudflare challenge if failed to bypass 2023-08-05 17:14:06 +08:00
FooIbar 59a9448d70 Restore default favorite slot 2023-08-04 17:37:26 +08:00
FooIbar 22b87de29d Don't show cloud favorites when not logged in 2023-08-04 17:37:26 +08:00
FooIbar d98292da1d Refine Cloudflare challenges detection 2023-08-04 05:46:51 +08:00
renovate[bot] 5422c04c53 Update plugin com.android.application to v8.1.0 2023-08-03 21:39:26 +08:00
FooIbar 0a5783de89 Fix compatibility with AGP 8.1.0 2023-08-03 21:39:14 +08:00
renovate[bot] 717e2191b0 Update plugin com.google.devtools.ksp to v1.9.0-1.0.13 2023-08-03 10:20:10 +08:00
FooIbar eedc3ba5eb Drop CheckableComposeView
It was required by EasyRecyclerView
2023-08-03 10:18:22 +08:00
renovate[bot] 30ee1816df Update dependency com.squareup.okio:okio-jvm to v3.5.0 2023-08-02 18:03:57 +00:00
FooIbar 940047de11 Refine Cloudflare challenge detection 2023-08-02 17:21:40 +08:00
tarsin c0e2041efe Cleanup code 2023-08-02 10:25:09 +08:00
tarsin 8f9d2adcfe Fixup to use compose FontFamily 2023-08-02 10:19:39 +08:00
tarsin 1bfda83665 Introduce DialogState.awaitInputText 2023-08-02 10:14:41 +08:00
tarsin 39b896e1b9 Cleanup dialog api 2023-08-02 09:18:27 +08:00
tarsin cfe7ee7f9c Convert to use tachiyomi fastscroller impl 2023-08-02 08:42:55 +08:00
FooIbar 2a95d6707a Implement Context.createReaderThemeContext() 2023-08-02 07:07:30 +08:00
renovate[bot] f4fe5f1783 Update ktor to v2.3.3 2023-08-01 18:57:09 +00:00
FooIbar 10040b2923 Minor tweaks 2023-08-01 21:04:22 +08:00
tarsin 42c56616fb Apply compose compiler report plugin 2023-08-01 09:55:35 +08:00
tarsin f8c926e1cd Cleanup unused res 2023-08-01 09:38:08 +08:00
tarsin 2adf620059 Let suggestion content padding a navbar 2023-08-01 09:30:31 +08:00
tarsin 4bdc182520 Revert "Optimize suggestion data fetch"
Revert reason: Fix OOB
This reverts commit bc4c7f62a0.
2023-08-01 09:23:40 +08:00
tarsin bc4c7f62a0 Optimize suggestion data fetch 2023-08-01 09:17:41 +08:00
tarsin b2d0c59913 Fixup suggestion color 2023-08-01 09:03:58 +08:00
tarsin ceb5424772 Cleanup SuggestionProvider 2023-08-01 08:54:46 +08:00
tarsin 5a5a5da2d9 Convert SearchBarScene SuggestRV to LazyColumn 2023-08-01 08:42:15 +08:00
tarsin 0ff9b03596 Convert TaskPreferenceDialog to compose 2023-08-01 07:37:30 +08:00
FooIbar acbe4eafa9 Support clearing search history 2023-08-01 06:36:00 +08:00
FooIbar 0a5600d949 Cleanup code 2023-08-01 06:36:00 +08:00
tarsin 63a83257fe Revert category text color to onSurface 2023-07-31 13:07:37 +08:00
tarsin d115e28403 Fix DownloadsScene category 2023-07-31 12:52:08 +08:00
tarsin 3d1ae0acfc Introduce harmonizeWithRole to keep target role chroma and tone 2023-07-31 12:35:38 +08:00
tarsin a3a01065c0 Harmonize category color 2023-07-31 11:13:16 +08:00
tarsin ae33d692bf Clip category a small corner 2023-07-31 10:46:54 +08:00
tarsin 39f55d7db1 Upgrade r8 2023-07-29 20:27:03 +08:00
tarsin a86f8d6096 Upgrade accompanist to v0.31.6rc (#1301)
* Upgrade accompanist to v0.31.6rc

* Update build.gradle.kts
2023-07-29 19:14:39 +08:00
tarsin b28fc3ffc4 Make cronetRequest.execute(..., () -> R): R 2023-07-28 18:28:07 +08:00
tarsin 5d4f544b94 No more content length validation 2023-07-28 18:18:01 +08:00
tarsin b0f0686821 Convert HomeParser to use a bytebuffer 2023-07-28 17:49:41 +08:00
tarsin b7c8afe7d2 Initial fetchCompat okhttp layer 2023-07-28 17:42:17 +08:00
tarsin 02855b68e6 Initial let parser use bytebuffer 2023-07-28 17:24:42 +08:00
tarsin cf8097babc Don't truncate fc, receivedByteCount is unreliable 2023-07-28 16:54:46 +08:00
tarsin 2d5a2022b4 Convert all GalleryListParser to rust 2023-07-28 15:30:57 +08:00
tarsin 2fac22970e Fixup! Cleanup TorrentParser 2023-07-28 12:31:44 +08:00
tarsin 8c10836e6e Cleanup TorrentParser 2023-07-28 12:30:43 +08:00
tarsin 69bba560f0 Convert to use regex-lite 2023-07-28 11:56:16 +08:00
tarsin a9d5c15bd9 Fixup codestyle 2023-07-28 11:37:59 +08:00
tarsin 1d0812ddaf Fixup codestyle 2023-07-28 11:15:48 +08:00
tarsin 02bdc9c1a3 Refine rust glist parser, do not allocate subhtml 2023-07-28 10:41:44 +08:00
tarsin 6a08460e8e Fix thumbnail mode parser 2023-07-28 10:02:04 +08:00
tarsin 091ad5cf0f Cleanup GalleryListParser 2023-07-28 09:25:56 +08:00
tarsin f911e4629c Drop jnix net extension 2023-07-28 07:18:28 +08:00
tarsin 0265ddc6e1 Introduce CronetRequest.copyToChannel 2023-07-27 12:02:30 +08:00
tarsin ead2300d90 Refactor package layout 2023-07-27 11:56:22 +08:00
tarsin b3a8547527 Drop okhttptransport since most file download job use cronet directly now 2023-07-27 11:52:31 +08:00
tarsin 37a5dbd20d Fix animated CoilImageGetter 2023-07-27 11:31:54 +08:00
tarsin c20dc66db3 Fix GalleryDetailScene comment ripple 2023-07-27 10:43:46 +08:00
tarsin 31c32123c9 Drop URLImageGetter 2023-07-27 10:25:08 +08:00
tarsin 14faa38de3 Fix SegmentedButton shape 2023-07-27 07:59:02 +08:00
tarsin 4827b7e077 Convert to use SingleChoiceSegmentedButtonRow 2023-07-27 07:53:55 +08:00
renovate[bot] 2d9a17bd25 Update dependency androidx.core:core-ktx to v1.12.0-beta01 2023-07-27 07:38:36 +08:00
renovate[bot] ce3ad45c09 Update dependency dev.chrisbanes.compose:compose-bom to v2023.07.00-alpha02 2023-07-27 07:38:27 +08:00
renovate[bot] 44fcc21d9c Update paging to v3.2.0 2023-07-27 07:38:17 +08:00
renovate[bot] 5c1a6808d7 Update dependency androidx.recyclerview:recyclerview to v1.3.1 2023-07-27 07:24:58 +08:00
renovate[bot] d461b1b8b6 Update dependency composeOptions to v1.5.1 2023-07-27 07:24:44 +08:00
renovate[bot] d74b0448d5 Update dependency androidx.constraintlayout:constraintlayout-compose to v1.1.0-alpha11 2023-07-26 21:24:28 +00:00
renovate[bot] ed2a37c615 Update dependency androidx.navigation:navigation-compose to v2.7.0-rc01 2023-07-26 19:49:59 +00:00
tarsin 34c51d3115 Cleanup CronetHttpUriFetcher 2023-07-26 17:25:41 +08:00
tarsin f85d36d14d Cleanup CronetHttpUriFetcher 2023-07-26 17:17:31 +08:00
tarsin 9818f227d7 Initial Jvmheapless IO for Coil 2023-07-26 17:01:15 +08:00
tarsin 01353e05cc Cleanup CronetRequest 2023-07-26 16:16:32 +08:00
tarsin 02eaedd6a0 Lazy borrow cronet bytebuffer 2023-07-26 15:52:55 +08:00
renovate[bot] c71c872aa2 Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-android to v1.7.3 2023-07-25 21:52:29 +00:00
renovate[bot] d79dc0c630 Update Rust crate quick-xml to 0.30 2023-07-24 07:30:53 +08:00
FooIbar 46cf695bde Fix gallery detail error tip not showing 2023-07-22 21:45:44 +08:00
FooIbar c913a7eb9e Fix NPE in H@H archive download 2023-07-22 18:07:22 +08:00
tarsin 887c46c87f Hide LA symbols 2023-07-22 17:53:00 +08:00
tarsin e4d3501f93 Use fat lto 2023-07-22 17:18:45 +08:00
FooIbar add98bb630 Unescape gallery info fetched from API 2023-07-22 16:36:59 +08:00
tarsin 05651584dc Fixup install ndk 2023-07-22 10:56:00 +08:00
tarsin 37171840d3 Fixup install ndk 2023-07-22 10:55:06 +08:00
tarsin 4ee8fbedbf Fixup install ndk 2023-07-22 10:52:48 +08:00
tarsin 274e6a0666 Switch to ndk r26b1 2023-07-22 10:48:01 +08:00
tarsin b26686823e Do not build libarchive test 2023-07-22 10:27:50 +08:00
tarsin 64354ea511 Xz 5.4.3 2023-07-22 10:16:27 +08:00
tarsin 07cce5bbad Libarchive 3.7.0 2023-07-22 09:59:33 +08:00
FooIbar bbab9522df Fix category badge not showing 2023-07-22 06:28:51 +08:00
FooIbar 1a6d839ca0 Partly revert 0d666a6 to reduce network requests 2023-07-22 06:27:09 +08:00
FooIbar 0d666a633f Add dirname field for DownloadInfo 2023-07-21 20:36:19 +08:00
tarsin b24679adbd Update r8 2023-07-21 09:12:55 +08:00
tarsin 90b4d643d4 Cleanup dependencies 2023-07-21 08:59:18 +08:00
tarsin 469f2871f7 Revert to use quick-xml for url unescape 2023-07-21 08:54:06 +08:00
tarsin c7766de766 Strip unused features 2023-07-21 08:22:28 +08:00
tarsin 314de6a6a7 Set opt-level to 's', we need vectorize html parser 2023-07-21 07:48:01 +08:00
tarsin 9c148dd58d Set rust codegen units to 1 for release profile 2023-07-21 07:34:31 +08:00
tarsin 1ae469facc Drop obsolete workaround (#1274)
* Drop obsolete workaround

* Update build.gradle.kts
2023-07-21 07:05:51 +08:00
renovate[bot] eada6641e4 Update plugin com.google.devtools.ksp to v1.9.0-1.0.12 2023-07-21 06:19:24 +08:00
FooIbar 2eb50803b5 Fix downloads import order 2023-07-21 06:19:10 +08:00
FooIbar 29e3e876c7 Upgrade db, add foreign key for download label 2023-07-21 06:19:10 +08:00
FooIbar 1c38dbaa0b Upgrade db, add unique index for download label 2023-07-21 06:19:10 +08:00
FooIbar 31dcd349df Fix delete download not working 2023-07-20 19:00:57 +08:00
FooIbar ee504e3361 Upgrade db, extract common gallery info 2023-07-20 19:00:57 +08:00
FooIbar 11426e1c4c Upgrade db, add galleries table 2023-07-20 19:00:57 +08:00
tarsin 13346f1124 Drop explicitly copy constructor 2023-07-19 17:28:27 +08:00
FooIbar f38f3989e7 Tweak db migration, cleanup code
Keep the time field in DownloadInfo for future sort by start / complete time function
2023-07-19 07:17:21 +08:00
FooIbar 5c33ca1c9a [DO NOT USE] Refine drag and drop reordering, part 3/3 2023-07-19 07:17:21 +08:00
FooIbar 3599ffb805 [DO NOT USE] Refine drag and drop reordering, part 2/3 2023-07-19 07:17:21 +08:00
FooIbar 344cd1305c [DO NOT USE] Refine drag and drop reordering, part 1/3 2023-07-19 07:17:21 +08:00
renovate[bot] 84fe0b9cb7 Update dependency composeOptions to v1.5.0 2023-07-18 21:56:53 +00:00
tarsin e5963208b1 Fixup codestyle 2023-07-18 18:28:27 +08:00
tarsin 8bc84b404d Reimplement groupByToObserved 2023-07-18 18:23:40 +08:00
tarsin 80d75661c1 Fixup! Refactor EhFilter to fix concurrency modification 2023-07-18 18:14:58 +08:00
tarsin 1c74a422bc Refactor EhFilter to fix concurrency modification 2023-07-18 17:34:51 +08:00
FooIbar f06c2d6805 Adjust default aspect in grid mode 2023-07-18 14:22:41 +08:00
FooIbar fdbe06e8c5 Use handle instead of long press for drag 2023-07-18 07:05:13 +08:00
FooIbar 15a9c4ee45 Move to recyclerview-selection, part 2/2 2023-07-18 07:05:13 +08:00
FooIbar 38c90f35f2 Move to recyclerview-selection, part 1/2 2023-07-18 07:05:13 +08:00
renovate[bot] bf3ee4cce2 Update plugin com.mikepenz.aboutlibraries.plugin to v10.8.3 2023-07-17 15:52:59 +00:00
renovate[bot] 9553491040 Update dependency com.mikepenz:aboutlibraries-core to v10.8.3 2023-07-17 13:29:54 +00:00
tarsin 0253d92c7f Cleanup code 2023-07-16 22:28:07 +08:00
tarsin e2ac340b6f Refine SelectableGalleryInfoRecyclerView 2023-07-16 22:22:29 +08:00
tarsin 44b60185cc Refine SelectableGalleryInfoRecyclerView 2023-07-16 22:12:15 +08:00
tarsin 9b3ffd1f2c Refactor EasyRecyclerView 2023-07-16 21:59:48 +08:00
tarsin 935c8e7d15 Remove easyrv usage in GalleryCommentsScene 2023-07-16 21:15:58 +08:00
tarsin 8f5094efef Cleanup EasyRv 2023-07-16 18:45:12 +08:00
tarsin 91accb6655 Cleanup all unnecessary easyrv usage, prepare to drop easyrv 2023-07-16 18:38:54 +08:00
FooIbar 4f23cf5d8d Fix local favorite count not updating 2023-07-16 16:33:29 +08:00
FooIbar 39f76246c8 Fix favorites move from local to cloud 2023-07-16 16:33:29 +08:00
FooIbar 8ac2b027ec Remove deprecated hosts 2023-07-16 16:33:29 +08:00
FooIbar 919d22ebf1 Gradle configuration cache compatibility 2023-07-16 16:33:29 +08:00
FooIbar 14a28c681a Do db migration, drop history favorite slot trick 2023-07-15 17:39:43 +08:00
FooIbar 388bccc468 Make QuickSearch name non-null 2023-07-15 17:39:43 +08:00
FooIbar 639d94795c Check initialization of mSpiderQueen 2023-07-15 14:20:38 +08:00
FooIbar 51e2f44868 Fix swipe refresh and error tip click refresh 2023-07-15 06:44:59 +08:00
FooIbar 92b9b9879c Fix sad panda check on login 2023-07-14 18:18:58 +08:00
FooIbar c867a74aea Tweak original image download 2023-07-14 18:18:45 +08:00
FooIbar e9a1bf22b1 Tweak archive download and image limit reset 2023-07-14 18:18:45 +08:00
FooIbar 46271fb0d2 Subscribe reading mode and orientation type changes 2023-07-13 07:00:18 +08:00
renovate[bot] 7438b17366 Update dependency io.arrow-kt:arrow-stack to v1.2.0 2023-07-12 18:38:41 +00:00
FooIbar 8306640ed6 Don't intercept on Varnish errors 2023-07-12 18:33:01 +08:00
tarsin 39b7623688 Flatten layout 2023-07-12 17:21:22 +08:00
tarsin 41b46035e4 Fix DownloadsScene leak 2023-07-12 16:22:20 +08:00
tarsin 10045494b8 Fix GalleryCommentsScene binding leak 2023-07-12 16:11:28 +08:00
tarsin ea67a022d8 Fix leaking 2023-07-12 15:56:20 +08:00
tarsin 203c89e3a8 Fixup! Fix a itemTouchHelper rv leak 2023-07-12 15:51:07 +08:00
tarsin 1c88be6f82 Fix a itemTouchHelper rv leak 2023-07-12 15:47:40 +08:00
tarsin 2a19bcd73b Fix a rv adapter leak 2023-07-12 15:34:07 +08:00
tarsin 9f29594ad6 Fix paging3 dependency 2023-07-12 15:22:27 +08:00
tarsin 9677e6ac80 Add leakcanary debug impl 2023-07-12 15:20:43 +08:00
tarsin 1590ca4b80 Convert DownloadService to use a deferred DownloadManager 2023-07-12 15:04:40 +08:00
tarsin effe7530ed Fixup! suspend db query 2023-07-12 12:24:31 +08:00
tarsin 19f270e320 Fixup! suspend db query 2023-07-12 12:22:55 +08:00
tarsin 25d876f8b9 Initial suspend all db query
TODO: Cleanup DownloadManager
2023-07-12 12:21:05 +08:00
tarsin 179e470154 Make DownloadScreen scrollable 2023-07-12 11:08:02 +08:00
tarsin 5cf122c30c Suspend more db 2023-07-12 10:41:56 +08:00
tarsin 36895de83b Introduce runAssertingNotMainThread as workaround 2023-07-12 10:37:00 +08:00
tarsin fed5285a31 Suspend more db query 2023-07-12 10:30:46 +08:00
tarsin b1fbefc09e Cleanup DownloadManager 2023-07-12 10:20:41 +08:00
tarsin 2fd9982c37 Cleanup EHDB nullability 2023-07-12 10:07:26 +08:00
tarsin 89a108574a Suspend DownloadLabelDao delete 2023-07-12 10:05:24 +08:00
tarsin 28ce6ee13e Suspend DownloadDirnameDao 2023-07-12 10:01:26 +08:00
tarsin 4441ea2c5d Suspend DownloadDirnameDao load 2023-07-12 09:58:31 +08:00
tarsin 02489893ec Suspend DownloadDirnameDao update insert 2023-07-12 09:46:09 +08:00
tarsin 62c3e9290e Suspend DownloadDirnameDao deleteByKey 2023-07-12 09:35:32 +08:00
tarsin 3f53710c5b Restore allowMainThreadQueries, prepare to suspendize DownloadManager 2023-07-12 09:31:16 +08:00
tarsin 389f27dfa1 Cleanup unused dao method 2023-07-12 09:30:13 +08:00
tarsin e2d03eb928 Purify SearchDao 2023-07-12 09:26:20 +08:00
tarsin 37ec49ed69 Suspend parser 2023-07-12 09:22:24 +08:00
tarsin 4694245b51 Suspend more db queries, part of #629 2023-07-12 09:15:01 +08:00
tarsin 60b77145a9 Prepare to drop allowMainThreadQueries 2023-07-12 08:37:46 +08:00
tarsin 28a6f8cd2b Refine package layout 2023-07-12 08:34:55 +08:00
tarsin 02a3c1c54b Cleanup kt style builder 2023-07-12 08:32:43 +08:00
tarsin 09df7cc39b Cleanup kt style builder 2023-07-12 08:27:33 +08:00
tarsin a4ce60c849 Refactor package layout 2023-07-12 08:03:45 +08:00
tarsin d74f18012b Refactor package layout 2023-07-12 07:55:54 +08:00
tarsin 3609379284 Refactor package layout 2023-07-12 07:48:21 +08:00
tarsin 19f9105640 Fixup AboutScreen edgeToEdge 2023-07-11 19:43:05 +08:00
tarsin 24664d4e83 Merge EhPreviewItem and its placeholder 2023-07-11 17:42:32 +08:00
tarsin e16b5b0437 Cleanup layout 2023-07-11 16:29:02 +08:00
FooIbar 94747da3d0 Tweak the layout of the favorite dialog 2023-07-11 14:43:37 +08:00
tarsin df8c70d8e6 Move GalleryListScene to paging3 (#1245)
* Initial WIP move GalleryListScene to paging3

* Refine

* Refine

* Refine

* Refine

* Refine

* Refine

* Typesafe State

* Refine

* Refine

* Refine

* Refine

* Cleanup code

* Cleanup code
2023-07-11 10:40:03 +08:00
tarsin 7fd3361608 Refine FavoritesScene 2023-07-11 07:35:13 +08:00
FooIbar d9522e4e89 Implement automatic update checks 2023-07-11 06:53:09 +08:00
FooIbar a8c96fa7df Introduce AppUpdater 2023-07-11 06:53:09 +08:00
renovate[bot] 5570933be4 Update dependency gradle to v8.2.1 2023-07-10 15:27:02 +00:00
FooIbar fb6cb8d3fb Generate repo name at build time 2023-07-10 22:13:55 +08:00
FooIbar 4ca7b6b11c Show changelog for CI build 2023-07-10 22:13:55 +08:00
renovate[bot] 5c377d346e Update dependency com.mikepenz:aboutlibraries-core to v10.8.2 2023-07-10 19:34:30 +08:00
tarsin 1dd0eeb2ed Rename rememberMemorized to rememberInVM 2023-07-10 19:28:42 +08:00
tarsin 3f6abd6380 Cleanup rememberMemorized 2023-07-10 19:27:44 +08:00
tarsin 407c55dbdc Properly store GalleryPreviewScreen data 2023-07-10 18:36:38 +08:00
tarsin 74afa6c764 Cleanup FavoritesScene 2023-07-10 18:27:31 +08:00
tarsin 60ccd988cb Introduce lazyMut 2023-07-10 18:26:15 +08:00
tarsin 505ba6e4e3 Move some persistent data to VM as in-memory storage 2023-07-10 18:02:40 +08:00
tarsin d4d6fe56a9 Move FavouriteScene to paging3 (#1238)
* Initial move favScene to paging3

* Refine

* Refine

* Refine

* Refine

* Implement goto bottom

* Refine

* Implement Jumpto

* Refine

* Refine

* Refine

* Refine

* Refine

* Cleanup code

* Cleanup code

* Refine

* Refine

* Do load in IOContext
2023-07-10 14:00:45 +08:00
tarsin 740fff2178 Add paging3 runtime dependency 2023-07-10 08:34:47 +08:00
tarsin 54a2ea64bc Cleanup GalleryAdapter, prepare migrate to paging3 2023-07-10 08:30:38 +08:00
FooIbar 200882e13c Log details of bad response code error 2023-07-10 06:43:44 +08:00
FooIbar dac28b9b6a Refactor e-hentai API response parsing 2023-07-10 06:43:44 +08:00
renovate[bot] 7a8ae183da Update plugin com.mikepenz.aboutlibraries.plugin to v10.8.2 2023-07-09 18:32:08 +00:00
tarsin c163e24434 Refine ComposeFavScene 2023-07-09 17:14:04 +08:00
tarsin eed30084bc Refine ComposeFavScene 2023-07-09 16:55:39 +08:00
tarsin 137a51dad0 Refine ComposeFavScene SearchBar 2023-07-09 16:29:31 +08:00
tarsin b71d326620 Refine ComposeFavScene 2023-07-09 16:21:57 +08:00
tarsin 371622770b Refine ComposeFavScene 2023-07-09 16:18:23 +08:00
tarsin 2b6bcf6698 Refactor ComposeFavScene 2023-07-09 16:05:45 +08:00
tarsin bc33ea84f2 Initial load Fav source 2023-07-09 16:00:57 +08:00
tarsin 3d7210ec08 Prepare to rewrite FavScene with Compose 2023-07-09 15:40:37 +08:00
tarsin e7bed5f5eb Remove redundant TODO 2023-07-09 15:29:03 +08:00
tarsin a3237a024e Cleanup ComposeFragment 2023-07-09 15:28:29 +08:00
tarsin 662fc6859b Fix GalleryPreviewScreen page load 2023-07-09 13:27:20 +08:00
tarsin 5bb61959bd Add jumping support 2023-07-09 12:52:57 +08:00
tarsin 8ae75101ef Add LazyGridScrollbar for preview jump 2023-07-09 11:54:13 +08:00
tarsin 95fcab0980 Inline LazyColumnScrollbar 2023-07-09 11:36:37 +08:00
tarsin d2b141e218 Fix jump crash 2023-07-09 11:21:10 +08:00
tarsin 73eb91f4b4 Cleanup GalleryPreviewScreen 2023-07-09 10:49:43 +08:00
tarsin 61c51f8882 Fix MergeInterceptor 2023-07-09 10:49:00 +08:00
tarsin cb9f36dd52 Rewrite GalleryPreviewScreen Pager, Resolve #1152 2023-07-09 10:14:13 +08:00
tarsin 80b0203af2 Fix ci failed 2023-07-09 08:16:48 +08:00
tarsin 66155eed1c Fix crash when r8 shrink aboutlibraries json 2023-07-09 07:36:39 +08:00
renovate[bot] 144e8a2951 Update dependency com.mikepenz:aboutlibraries-core to v10.8.1 2023-07-09 06:48:37 +08:00
renovate[bot] 7c1f521960 Update plugin com.mikepenz.aboutlibraries.plugin to v10.8.1 2023-07-08 22:01:29 +00:00
tarsin dbe528269d Fix FavoritesScene crash again 2023-07-08 20:25:33 +08:00
tarsin 9b843e84b2 Fix FavoritesScene crash 2023-07-08 19:49:22 +08:00
tarsin c9ef0e5406 Fix read download button text maxline 2023-07-08 18:49:23 +08:00
tarsin 1a49b3d00b Cleanup unused field 2023-07-08 18:41:08 +08:00
tarsin 33502c88db Fix FavDrawer ListItem style 2023-07-08 18:32:41 +08:00
tarsin 6554735c63 Make Favscene drawer aware of Settings fav changes 2023-07-08 18:07:53 +08:00
tarsin 2360e6376e Convert FavSceneDrawer to Compose 2023-07-08 17:22:20 +08:00
tarsin b1e186a5f1 Bump MCA 2023-07-08 16:24:17 +08:00
tarsin ffd2b5a342 Fixup GalleryInfoBottomSheet impl 2023-07-08 16:21:28 +08:00
tarsin d5a16f50c5 Revert GalleryInfoBottomSheet to BottomSheetDialogFragment impl for predictive back 2023-07-08 16:12:03 +08:00
tarsin 5b03e67108 Drop unused code 2023-07-08 15:39:52 +08:00
tarsin eac5b2641b Fix galleryProvider init crash 2023-07-08 15:36:03 +08:00
tarsin e46008df55 Cleanup: Move ReaderProgressIndicator to compose 2023-07-08 14:36:42 +08:00
tarsin 07b1f39796 Move ReaderProgressIndicator to compose 2023-07-08 14:34:12 +08:00
tarsin 64d3849b62 Fixup PageSlider haptic feedback 2023-07-08 14:22:53 +08:00
tarsin 9d766f47c5 Fixup PageSlider theme 2023-07-08 14:20:22 +08:00
tarsin 64841e6e3b Move PageSlider to Compose 2023-07-08 14:11:47 +08:00
tarsin 571fbabf4f Restore PageIndicator padding 2023-07-08 13:54:38 +08:00
tarsin 12c3ad6d5f Fixup tachiyomi theme 2023-07-08 13:53:21 +08:00
tarsin 7c987ec868 Move PageIndicatorText to Compose 2023-07-08 13:47:39 +08:00
tarsin 27686e952a Resolve #1227 2023-07-08 06:58:24 +08:00
renovate[bot] de06c24924 Update dependency com.squareup.okio:okio-jvm to v3.4.0 2023-07-07 20:11:02 +00:00
tarsin 4e1b4ddf28 Kotlin 1.9.0 2023-07-07 07:12:07 +08:00
FooIbar ca21b5e713 Introduce <T> Request.executeAndParseAs() 2023-07-06 06:22:46 +08:00
FooIbar 5a6a01f813 Use kotlinx.serialization for json handling 2023-07-06 06:22:46 +08:00
FooIbar 16c6353459 Show changelog for release 2023-07-05 19:31:28 +08:00
FooIbar d1623d411a Show confirm dialog before downloading updates 2023-07-05 19:31:28 +08:00
tarsin 4e4b072c16 No more UIContext needed to modifyFav 2023-07-05 11:01:35 +08:00
tarsin f2601fb672 Refine check updates 2023-07-05 10:53:36 +08:00
tarsin 125c467c1b Fixup! Support install CI apk 2023-07-05 10:48:44 +08:00
tarsin 0b95c340d6 Support install CI apk 2023-07-05 10:47:36 +08:00
tarsin 79e0b33aad Extract the apk 2023-07-05 10:19:22 +08:00
tarsin f1f7b8dc88 Add no-op token to download CI 2023-07-05 10:04:47 +08:00
tarsin e97e539f92 Get CI archive url 2023-07-05 09:22:42 +08:00
tarsin 4b562f98f0 Get workflow url 2023-07-05 09:07:04 +08:00
tarsin bd06d76656 Cleanup code 2023-07-05 08:43:02 +08:00
tarsin 38ddca2342 Initial get latest version using github restful api 2023-07-05 08:39:22 +08:00
tarsin 1119798ce8 Initial get latest commitSha using github restful api 2023-07-05 08:32:21 +08:00
tarsin 1eeab2f03d Introduce preference to use CI update channel 2023-07-05 07:51:29 +08:00
FooIbar bfbe6b8e6a Translate tags when saving to quick search 2023-07-05 07:20:50 +08:00
FooIbar 4905c955bc Max characters limit is for ASCII characters 2023-07-05 07:20:36 +08:00
FooIbar 4cf698a10a Cleanup unused res 2023-07-04 21:20:24 +08:00
FooIbar 4b66f58fd3 Support adding favorite notes 2023-07-04 21:20:24 +08:00
FooIbar 325909401c Use named constant instead of magic number 2023-07-04 21:20:24 +08:00
FooIbar 652d6a2f28 Support displaying favorite notes 2023-07-04 21:20:24 +08:00
tarsin 7672a82260 Convert non-close callbackFlow to MutableSharedFlow 2023-07-04 11:22:01 +08:00
tarsin 0f37d17bf3 Cleanup HistoryScene 2023-07-04 10:54:56 +08:00
tarsin c923d74fec Drop explicated recompose 2023-07-04 10:49:30 +08:00
tarsin 2ba8640996 Let FavouriteStatusRouter handle historyDB as well 2023-07-04 10:39:03 +08:00
tarsin 0b1a0cade8 Cleanup FavouriteStatusRouter implementation 2023-07-04 10:24:08 +08:00
tarsin 78aab4f6c7 Cleanup FavouriteStatusRouter stateFlow 2023-07-04 10:18:14 +08:00
tarsin 77502e1a7c No need to query local db fav info 2023-07-04 10:14:30 +08:00
tarsin b90f221ede Drop isFavorited field 2023-07-04 10:11:54 +08:00
tarsin ee68b421d6 Cleanup FavouriteStatusRouter 2023-07-04 10:06:10 +08:00
tarsin 88be232e70 Drop a notifyDataSetChanged 2023-07-04 09:08:29 +08:00
FooIbar da9de7a823 Truncate file to the size actually written 2023-07-04 07:08:18 +08:00
FooIbar f08e124df6 Support downloading original images in reader 2023-07-03 22:55:05 +08:00
FooIbar ce888a0982 Unwrap IOException in getReadableString() 2023-07-03 22:55:05 +08:00
tarsin f59789a11e Fixup! Only emit info being add 2023-07-03 21:04:29 +08:00
tarsin c8a3db8a3e Fixup! Workaround ComposeView in RVView 2023-07-03 20:45:01 +08:00
tarsin 23366c8ea1 Workaround ComposeView in RVView 2023-07-03 20:35:04 +08:00
tarsin 6e65afa7e2 Share DownloadManager callback flow 2023-07-03 20:24:22 +08:00
tarsin 29b81aa90e Fix GalleryInfoListItem to use produceState 2023-07-03 20:13:25 +08:00
tarsin d85090787f Fix GalleryDetailScene DownloadInfoListener callbackFlow 2023-07-03 20:09:42 +08:00
tarsin 0eb3cc9073 Cleanup DownloadInfoListener callbackFlow 2023-07-03 20:03:48 +08:00
tarsin dfd9af8ee3 Convert DownloadInfoListener to callbackFlow 2023-07-03 19:57:28 +08:00
tarsin 1120c23709 Do db migration, make DownloadLabel nonnull 2023-07-03 18:46:43 +08:00
tarsin 975421044c Cleanup toMutable* usage 2023-07-03 18:37:50 +08:00
tarsin 802b63ed5a Cleanup DownloadManager nullability 2023-07-03 18:33:13 +08:00
tarsin d32a0d6b7f Cleanup DownloadManager 2023-07-03 18:32:20 +08:00
tarsin 0c5a1a6533 Cleanup DownloadManager 2023-07-03 18:30:35 +08:00
tarsin 61796f4cd3 Cleanup DownloadManager init code 2023-07-03 18:22:06 +08:00
tarsin 80726a7ff0 Cleanup DownloadManager 2023-07-03 18:04:34 +08:00
tarsin a2fdcc57f8 Cleanup DownloadManager 2023-07-03 17:57:05 +08:00
tarsin bffb32eafd Reduce allocation 2023-07-03 17:40:44 +08:00
tarsin 2c452d236c Cleanup mAllInfoMap init code 2023-07-03 17:37:58 +08:00
tarsin e7e036f7c6 Convert mAllInfoMap to LinkedHashMap and do query in composer thread 2023-07-03 17:25:28 +08:00
tarsin fbb702cacd Fix Deferred implementation, Resolve #1213 2023-07-03 17:13:12 +08:00
FooIbar 598438a5f9 Avoid rust jni log spam 2023-07-03 16:34:05 +08:00
FooIbar 24a1c94f04 Wrap exception as IOException in CloudflareInterceptor 2023-07-03 15:51:51 +08:00
tarsin e4e053a49b Clip CircularLayout item ripple 2023-07-03 10:29:43 +08:00
tarsin 8c0e217117 Refactor showSelectItemWithIcon layout 2023-07-03 10:24:31 +08:00
tarsin 174e899ead Fix cannot remove localFav 2023-07-03 09:23:28 +08:00
tarsin 84cc915d95 Avoid cascade column 2023-07-03 09:01:57 +08:00
tarsin 7668f568f0 Refactor to use ListItem 2023-07-03 08:38:40 +08:00
tarsin 35a7cc2067 Unify isCronetSupported 2023-07-03 08:09:37 +08:00
tarsin efa0823293 Don't respect cache headers, Resolve #1211 2023-07-03 07:56:28 +08:00
FooIbar 1473f6326d Refactor addToFavorites() 2023-07-03 07:16:44 +08:00
FooIbar 861c05db44 Add option for QUIC support 2023-07-03 07:16:44 +08:00
tarsin 09b92cc709 Reduce allocations 2023-07-02 12:46:18 +08:00
tarsin a2d9113be2 Remove unused defensive code 2023-07-02 12:42:02 +08:00
tarsin a64c7d9f22 Make GalleryTagGroup groupName immutable and nonnull 2023-07-02 12:09:09 +08:00
tarsin 97090a4dc6 Refactor out GalleryTag 2023-07-02 12:01:21 +08:00
tarsin cf2c5b7e82 Drop snapshot maven 2023-07-02 11:25:02 +08:00
tarsin 6ee5b636c2 Upgrade dependencies 2023-07-02 11:04:08 +08:00
tarsin de9fa5be5a Sync rootProjName with repo name 2023-07-02 10:51:29 +08:00
FooIbar ffc3693674 Use the same UA for ehRequest and cronetRequest 2023-07-02 07:20:46 +08:00
FooIbar a3abd224e8 Use interceptor to handle cookies instead 2023-07-02 07:20:46 +08:00
FooIbar ac680afad3 Add cookie header and handle redirect for cronetRequest 2023-07-02 07:20:46 +08:00
FooIbar 52c21319d6 Move error tip below header in gallery detail 2023-07-01 20:00:24 +08:00
FooIbar 7b38171a9d Replace cascade if with when 2023-07-01 20:00:24 +08:00
tarsin c9ef60db67 Regen gradle wrapper 2023-07-01 16:28:20 +08:00
FooIbar aff75c2dec Add option for bypassing Cloudflare 2023-07-01 14:56:27 +08:00
FooIbar 63fcca3c7d Bypass Cloudflare with webview 2023-07-01 14:56:27 +08:00
tarsin 2e3a148c7a Convert to typesafe FilterMode 2023-07-01 12:46:03 +08:00
tarsin a7b239f0b9 Drop unused coroutineScope 2023-07-01 12:21:46 +08:00
tarsin 227cbd6fba Cleanup EhDB nullability 2023-07-01 12:08:18 +08:00
tarsin 8d19dffa01 Ensure Filter DB modification never on main thread 2023-07-01 12:07:23 +08:00
tarsin f3e1400d4c Refine EhFilter API 2023-07-01 11:37:00 +08:00
tarsin ef891ea23d Cleanup EhFilter 2023-07-01 11:29:10 +08:00
tarsin 043a1d8fe7 Cleanup with HtmlCompat.parseAsHtml 2023-07-01 11:21:24 +08:00
tarsin e428695052 Cleanup filter 2023-07-01 11:07:29 +08:00
tarsin 459dd50e91 Cleanup filter 2023-07-01 10:58:36 +08:00
tarsin 4c286a279f Fix FilterScreen nullability 2023-07-01 10:53:36 +08:00
tarsin 88c394480e Upgrade DB, Filter nullability changes 2023-07-01 10:51:13 +08:00
tarsin cdd5585124 Cleanup EhFilter 2023-07-01 10:46:34 +08:00
tarsin b0346b4e9d Revert guava 2023-07-01 10:30:09 +08:00
tarsin beecd6b109 Update r8 2023-07-01 10:08:58 +08:00
tarsin 54d7abd880 Update guava 2023-07-01 10:08:14 +08:00
FooIbar 9f77a4ce0a Drop webp icon since minSdk is 28 2023-07-01 07:12:49 +08:00
renovate[bot] 754a20ee3c Update dependency gradle to v8.2 2023-06-30 22:45:38 +00:00
FooIbar b5b096aeae Add option to force e-hentai thumb server 2023-06-30 17:42:30 +08:00
FooIbar d0ecac07aa Lofi domain is deprecated 2023-06-30 17:42:30 +08:00
FooIbar 67e6387fa8 Fix settings profile cookie since 55b3753 2023-06-30 15:47:17 +08:00
FooIbar bc34f25a3c Exclude some libraries from aboutLibraries 2023-06-30 15:47:17 +08:00
FooIbar afc38c2de8 Add back press handler in select site screen 2023-06-30 15:47:17 +08:00
renovate[bot] c020af3083 Update dependency com.pinterest:ktlint to v0.50.0 2023-06-30 00:41:16 +00:00
renovate[bot] 3f509f8c11 Update dependency com.google.android.material:material to v1.10.0-alpha05 2023-06-29 22:14:41 +00:00
renovate[bot] 75eb25db18 Update chunker to v4 2023-06-30 00:24:09 +08:00
renovate[bot] 79d173cb0d Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-android to v1.7.2 2023-06-29 21:43:44 +08:00
tarsin f3eb2c8c17 Optimize GalleryInfo composer path calculation 2023-06-29 19:02:24 +08:00
FooIbar d15685e1ca Add rustfmt and clippy check to CI 2023-06-29 16:06:54 +08:00
renovate[bot] 11535f7d7b Update nav_version to v2.7.0-beta02 2023-06-29 07:53:43 +08:00
FooIbar 0b526040a3 Add interceptor to store cookies for cronet 2023-06-29 07:11:57 +08:00
FooIbar 15696f4e6e Fix duplicate getUConfig() call 2023-06-29 07:11:57 +08:00
FooIbar 0c560518c8 Clean remaining code from 2d20da7 2023-06-29 07:11:57 +08:00
renovate[bot] 302cba9f61 Update ktor to v2.3.2 2023-06-28 19:41:46 +00:00
tarsin 3a33a2425f Cargo fmt 2023-06-28 18:27:22 +08:00
tarsin a5df907bbe Cargo clippy fix 2023-06-28 18:26:29 +08:00
tarsin 6879a02a63 Fix AdvancedSearch pages behaviour 2023-06-28 13:31:35 +08:00
tarsin d86d72212f Fix AdvancedSearch minrating textfield behaviour 2023-06-28 13:21:00 +08:00
tarsin de528ec277 Fix AdvancedSearch minrating textfield style 2023-06-28 12:43:47 +08:00
FooIbar 6f41ddda51 Don't retry on unrecoverable errors 2023-06-27 23:09:57 +08:00
tarsin ffaf8b9c46 Fix SearchLayout insetPadding 2023-06-27 22:18:49 +08:00
tarsin aab1c12aed Fix SearchLayout padding 2023-06-27 22:10:01 +08:00
tarsin 4e427f2761 Add quichint 2023-06-27 22:04:37 +08:00
tarsin 2a6247a89d Cleanup unused res 2023-06-27 22:04:00 +08:00
tarsin 62c3e9fd99 Restore pageRange advanced options 2023-06-27 22:00:17 +08:00
tarsin 1690651428 Restore three more advanced options 2023-06-27 21:44:05 +08:00
tarsin ea95b1c525 Fixup! Restore minRating advanced search 2023-06-27 19:58:29 +08:00
tarsin f67c80a3a3 Restore minRating advanced search 2023-06-27 19:55:15 +08:00
tarsin 6c1ffeacb2 Fixup! Initial compose advanced search 2023-06-27 19:07:26 +08:00
tarsin 753206c2fb Initial compose advanced search 2023-06-27 19:05:59 +08:00
tarsin 2ae8265d05 Fix SearchLayout title font 2023-06-27 18:37:45 +08:00
tarsin 7df7a783f6 Initial migrate SearchLayout to Compose
TODO: advanced options
2023-06-27 18:33:08 +08:00
tarsin 2829d081cc Cleanup with bundleOf ext 2023-06-27 12:20:05 +08:00
tarsin bb3a88813b Cleanup BaseScene 2023-06-27 12:00:27 +08:00
tarsin 2da8cfde01 Unify MainActivity nav behaviour 2023-06-27 11:54:09 +08:00
tarsin 2e23167e94 Enable httpcache for cronet 2023-06-24 19:03:16 +08:00
tarsin 9131f6f8cb Cleanup ListUrlBuilder 2023-06-24 16:48:19 +08:00
tarsin a77a1fd3e1 Drop UrlBuilder 2023-06-24 16:15:52 +08:00
tarsin 9dfc1324ad Flush cookies after signin 2023-06-24 16:05:35 +08:00
tarsin c84e86a5a1 Cleanup HttpUrl usage 2023-06-24 16:02:18 +08:00
tarsin be867d5d07 Cleanup HttpUrl usage 2023-06-24 15:49:00 +08:00
tarsin 5457044dd5 Cleanup a HttpUrl usage 2023-06-24 15:44:29 +08:00
tarsin be2330f1b6 Prepare to drop UrlBuilder 2023-06-24 15:36:31 +08:00
tarsin eb18e74884 Prepare to drop UrlBuilder 2023-06-24 15:28:37 +08:00
renovate[bot] fd05d03bca Update plugin com.mikepenz.aboutlibraries.plugin to v10.8.0 2023-06-24 07:02:05 +08:00
renovate[bot] 69db5bd400 Update dependency com.mikepenz:aboutlibraries-core to v10.8.0 2023-06-23 22:00:15 +00:00
FooIbar a87d720ae3 Support tag suggestion under operators and qualifiers 2023-06-22 18:51:27 +08:00
FooIbar 7b81a9aa50 Cleanup code 2023-06-22 15:40:20 +08:00
FooIbar b07fd2bc4f Remove all unnecessary jvm annotations 2023-06-22 15:40:20 +08:00
FooIbar 3c64486c3b Convert all unifile classes to kotlin 2023-06-22 15:40:20 +08:00
FooIbar 8cb4045589 Rename .java to .kt 2023-06-22 15:40:20 +08:00
FooIbar 7edac11d53 Rename UniFile.kt to UniFileExtensions.kt 2023-06-22 15:40:20 +08:00
tarsin 838f8ac98c Fix galleryTag layout 2023-06-22 11:39:27 +08:00
tarsin 3a57d43aa4 Fixup! Kotlin 1.9.0-RC 2023-06-22 10:26:42 +08:00
tarsin 69870803f7 Kotlin 1.9.0-RC 2023-06-22 10:23:27 +08:00
renovate[bot] eef5e5485a Update dependency androidx.paging:paging-compose to v3.2.0-rc01 2023-06-22 10:03:31 +08:00
renovate[bot] ebbe26e5e6 Update room_version to v2.6.0-alpha02 2023-06-22 10:01:56 +08:00
FooIbar 0cd83d3e4c Convert all legacy view classes to kotlin 2023-06-22 10:01:41 +08:00
FooIbar 1c07c61307 Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar b602fa1204 Convert AddDeleteDrawable, HandlerDrawable and WrapDrawable to kotlin 2023-06-22 10:01:41 +08:00
FooIbar 273bed9ba1 Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar 028405ecce Convert MarginItemDecoration, SimpleSmoothScroller and WindowInsetsAnimationHelper to kotlin 2023-06-22 10:01:41 +08:00
FooIbar ada4158c8e Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar fc99c611a6 Convert ViewTransition and BringOutTransition to kotlin 2023-06-22 10:01:41 +08:00
FooIbar fce4a2751a Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar 557818e59f Drop DialogWebChromeClient and SimpleHolder 2023-06-22 10:01:41 +08:00
FooIbar a85f3cbe0b Do ktlint format 2023-06-22 10:01:41 +08:00
FooIbar 5d8acd9577 Drop ViewUtils 2023-06-22 10:01:41 +08:00
FooIbar e2bf887b94 Convert RadioGridGroup to kotlin 2023-06-22 10:01:41 +08:00
FooIbar 4a0893c573 Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar 839d074df1 Drop NumberUtils 2023-06-22 10:01:41 +08:00
FooIbar 9be7705050 Convert EasyRecyclerView to kotlin 2023-06-22 10:01:41 +08:00
FooIbar 470a2baa6a Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar fb8de517a0 Drop LayoutUtils 2023-06-22 10:01:41 +08:00
FooIbar 635de44299 Convert AboveSnackerLayout to kotlin 2023-06-22 10:01:41 +08:00
FooIbar 1d4bd9a294 Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar a0b48a5cc7 Drop MathUtils 2023-06-22 10:01:41 +08:00
FooIbar eb726ccbf4 Convert SimpleGridLayout to kotlin 2023-06-22 10:01:41 +08:00
FooIbar 3f484a49e8 Drop StringUtils and Utilities 2023-06-22 10:01:41 +08:00
FooIbar 09cd08bfaa Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar e6312a37c7 Convert LayoutManagerUtils to kotlin 2023-06-22 10:01:41 +08:00
FooIbar 862b3e5e46 Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar 0042482107 Convert SimpleHandler to kotlin 2023-06-22 10:01:41 +08:00
FooIbar 85bc215e00 Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar 2db5a749a0 Drop IOUtils 2023-06-22 10:01:41 +08:00
FooIbar 8c439b1167 Convert OSUtils to kotlin 2023-06-22 10:01:41 +08:00
FooIbar 4eb1a4141f Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar 4f47febc06 Convert AnimationUtils, ConcurrentPool, IntIdGenerator and SimpleAnimatorListener to kotlin 2023-06-22 10:01:41 +08:00
FooIbar c61afc7a04 Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar b59966e8a4 Convert FastScroller to kotlin 2023-06-22 10:01:41 +08:00
FooIbar 457cf2e856 Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar 4a7626c6f6 Convert FileUtils to kotlin 2023-06-22 10:01:41 +08:00
FooIbar 947452e3f1 Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar b6de84c369 Drop ObjectUtils 2023-06-22 10:01:41 +08:00
FooIbar 0adc43b243 Convert ReadableTime and TextUrl to kotlin 2023-06-22 10:01:41 +08:00
FooIbar 0c9a8624bc Rename .java to .kt 2023-06-22 10:01:41 +08:00
FooIbar 09e9d3ff5a Drop JsoupUtils and LogCat 2023-06-22 10:01:41 +08:00
renovate[bot] 7240ca4eba Update dependency androidx.activity:activity-compose to v1.8.0-alpha06 2023-06-22 00:41:41 +00:00
tarsin 0a2c29a693 Adjust GalleryInfo layout 2023-06-21 10:37:05 +08:00
tarsin bba875238c Rewrite GalleryInfo layout with ConstraintLayout dsl 2023-06-21 10:28:16 +08:00
FooIbar c33248b1bf Use file hash for cover search 2023-06-21 00:52:28 +08:00
FooIbar 24431051ae Make HV event notification clickable 2023-06-20 23:03:59 +08:00
FooIbar 1758e25388 Cleanup code 2023-06-20 23:03:59 +08:00
tarsin a27e8b99d9 Fix parse e-hentai failed 2023-06-20 22:18:19 +08:00
tarsin a06e76e934 Fix proguard and do cargo fmt 2023-06-20 21:53:48 +08:00
FooIbar 14609583b5 Show favorite name in gallery list 2023-06-20 21:49:28 +08:00
FooIbar 751a89c107 Refine rust gallery list parser 2023-06-20 21:49:28 +08:00
tarsin 619c8f6deb Update r8 2023-06-20 19:54:12 +08:00
tarsin c3835b8a65 Drop unused field in GalleryInfo 2023-06-20 19:43:42 +08:00
tarsin 5fd890cf9b Cleanup code 2023-06-20 19:40:32 +08:00
tarsin 40c6135214 Cleanup code 2023-06-20 19:37:06 +08:00
tarsin cfa1ce8ab6 Cleanup code 2023-06-20 19:34:38 +08:00
tarsin 260dafcd79 Fixup bytebuffer usage 2023-06-20 19:27:12 +08:00
tarsin 73b3cd4625 Add annotations 2023-06-20 17:36:44 +08:00
tarsin d895a07583 Cleanup code 2023-06-20 17:33:48 +08:00
tarsin b84872aca2 Format code 2023-06-20 17:16:41 +08:00
tarsin 0ef4bccb7c Intercept okhttp request to cronet 2023-06-20 17:15:48 +08:00
tarsin dfc6c6a030 Let okhttp cronet converter handle cookies 2023-06-20 17:15:26 +08:00
tarsin b62f1d0c9f Add copy of okhttp cronet converter 2023-06-20 17:02:02 +08:00
tarsin 8abb5d9fb4 Add SwitchPref switch padding 2023-06-20 12:24:33 +08:00
tarsin 5f13725173 Handle #1157 [2/2] 2023-06-20 11:55:25 +08:00
tarsin 7f8b41f998 Handle #1157 [1/2] 2023-06-20 11:51:46 +08:00
FooIbar 1319060311 Drop some ViewUtils methods 2023-06-20 00:51:49 +08:00
FooIbar d1f914c2fa Convert SearchLayout to view binding 2023-06-20 00:51:49 +08:00
FooIbar 46cd1013fb Convert GalleryDetailScene to view binding 2023-06-20 00:51:49 +08:00
FooIbar 2ed516cf85 Convert SuggestionHolder to view binding 2023-06-20 00:51:49 +08:00
FooIbar 2ce55b4aef Convert GalleryCommentsScene to view binding 2023-06-20 00:51:49 +08:00
FooIbar df7071a22c Convert FavoritesScene to view binding 2023-06-20 00:51:49 +08:00
tarsin 707529972e Cleanup code 2023-06-19 11:28:54 +08:00
tarsin cf2796ebaa Add cronet temporarily for testing usage
We temporarily add cronet implementation to test the wrapper stability
Drop it when Android 14 release
2023-06-19 10:38:36 +08:00
tarsin 9611d81969 Include ktor proguard file 2023-06-19 01:37:58 +08:00
tarsin fb31f627a1 Update build.gradle.kts 2023-06-18 17:51:15 +08:00
tarsin 4741e4f858 Validate content length 2023-06-18 16:39:04 +08:00
tarsin b44ddf980b Cleanup code 2023-06-18 16:35:55 +08:00
tarsin 47b97243c3 Refine polling recycle 2023-06-18 16:33:54 +08:00
tarsin b695b06507 Pooling the bytebuffer 2023-06-18 16:30:18 +08:00
tarsin 110fb9fb59 Refine HttpEngineCoroutinizer 2023-06-18 16:13:54 +08:00
tarsin fe7c979d78 Cleanup HttpEngineCoroutinizer 2023-06-18 15:25:19 +08:00
tarsin 0d10899417 Initial support Android14 HttpEngine 2023-06-18 15:09:50 +08:00
tarsin ff89afb8c1 Fix fragment predictive back 2023-06-17 23:40:10 +08:00
tarsin 188248c634 Fix searchview predictive back 2023-06-17 23:30:01 +08:00
tarsin 0d3c942984 Fix navigation drawer predictive back 2023-06-17 23:26:22 +08:00
tarsin 2b520be693 Upgrade androidx activity 2023-06-17 23:22:34 +08:00
tarsin 4b831a2ee1 Support fragment predictive back 2023-06-17 23:19:32 +08:00
tarsin 59037d60e2 Revert "Revert "Revert "Update README.md"""
This reverts commit 61917285d5.
2023-06-17 22:01:57 +08:00
tarsin 61917285d5 Revert "Revert "Update README.md""
This reverts commit 6ccb59957d.
2023-06-17 17:56:45 +08:00
tarsin 453f77dd3e Upgrade androidx fragment 2023-06-17 17:42:18 +08:00
tarsin b40004d9ba Fix download crash on Android 14 2023-06-17 17:37:03 +08:00
tarsin f8f2d020eb Upgrade mdc for searchbar predictive back 2023-06-17 17:32:08 +08:00
tarsin 4f09de8a69 Refine warning 2023-06-17 16:51:37 +08:00
tarsin 2d20da70b8 Drop domain fronting and other network hacks since #1147 2023-06-17 16:37:51 +08:00
tarsin cf95e7b034 Upgrade compileSdk to 34 2023-06-17 15:01:33 +08:00
tarsin b5709a49f4 Fix padding 2023-06-16 20:59:46 +08:00
tarsin 75a7143442 Tweak GalleryDetailScene button layout 2023-06-16 20:57:52 +08:00
tarsin 3e47d82713 Spilt galleryList parser 2023-06-16 16:58:03 +08:00
tarsin 62f9361d25 Cleanup code 2023-06-16 16:52:19 +08:00
tarsin 3a97b93b6d Parse gid and token 2023-06-16 16:48:24 +08:00
tarsin 3b9850b90d Trim title 2023-06-16 16:26:30 +08:00
tarsin c0636e93c6 Refine rust gd parser 2023-06-16 16:22:55 +08:00
tarsin 5ff1131dee Improve home parser, avoid iter over whole text 2023-06-16 15:35:34 +08:00
tarsin 8aca589b0f Cleanup rust gd parser 2023-06-16 15:07:00 +08:00
tarsin 10f6bd4bf6 Refine rust gd parser 2023-06-16 15:01:11 +08:00
tarsin dbe84e8bda Refine rust gd parser 2023-06-16 14:29:44 +08:00
tarsin f4de403cdd Refresh libraries 2023-06-16 12:34:03 +08:00
tarsin 9024afed19 Strip unused regex feature 2023-06-16 12:21:51 +08:00
tarsin d8921377b3 Cleanup rust implementation 2023-06-16 01:35:16 +08:00
tarsin b80deafaa8 Cleanup home.rs 2023-06-16 00:22:54 +08:00
tarsin 506c63380a Spilt home.rs 2023-06-16 00:19:22 +08:00
tarsin 9e4fc2e7af Spilt torrent.rs 2023-06-16 00:16:58 +08:00
tarsin 0a8df26549 Add stub rust BaseGalleryInfo binding 2023-06-16 00:09:35 +08:00
tarsin d2bbd1b842 Tweak BaseGalleryInfo layout 2023-06-16 00:07:38 +08:00
tarsin 5974ce11a1 Build arm64 only if debug 2023-06-15 22:47:28 +08:00
tarsin 3ec700da56 Add f32 jni binding support 2023-06-15 20:33:14 +08:00
tarsin cb7b601f58 Revert "Drop fromJava impl and unused std impl"
This reverts commit 8e08a4881f.
2023-06-15 18:25:18 +08:00
tarsin 8e08a4881f Drop fromJava impl and unused std impl 2023-06-15 17:41:43 +08:00
tarsin 2fac1c8e4c Step to globally update to jni-rs 0.20.0 2023-06-15 15:43:37 +08:00
tarsin d240fb7e05 Add jnix for jni 0.21 upgrade 2023-06-15 14:43:50 +08:00
tarsin 326d378979 Cleanup package 2023-06-15 14:36:47 +08:00
tarsin 71f91bf054 Obtain jni_fn locally 2023-06-15 13:50:25 +08:00
tarsin 40e4d40683 Fix dependencies 2023-06-15 13:44:58 +08:00
tarsin c9d439e748 Obtain catch_panic, catch_panic_macros locally 2023-06-15 13:32:33 +08:00
tarsin 0ec90655c0 Specific jni-rs version 2023-06-15 13:13:47 +08:00
tarsin c6949cd09b Update rustup before compile 2023-06-15 13:00:32 +08:00
tarsin 1e47170c3b Refine rust jni parseLimit 2023-06-15 12:22:30 +08:00
tarsin b7d2e4e5da Cleanup code 2023-06-15 12:04:37 +08:00
tarsin 28c7a701ca Use jni signature generator 2023-06-15 11:56:57 +08:00
tarsin 52560b6b95 Catch rust panic 2023-06-15 11:52:02 +08:00
tarsin 1c2c18bff1 Cleanup rust binding 2023-06-15 05:06:12 +08:00
tarsin ed1603eec4 Update proguard-rules.pro 2023-06-15 04:25:36 +08:00
tarsin 2206dd85bc Use jnix 2023-06-15 04:13:01 +08:00
tarsin 62509e1500 Use lazy regex! marco 2023-06-14 20:59:11 +08:00
tarsin 56cad66aec Tweak cargo profile 2023-06-14 16:52:54 +08:00
tarsin 660d917f97 Unescape xml for favcat name 2023-06-14 16:34:10 +08:00
tarsin 0ca5572684 Do rustfmt, unescape xml 2023-06-14 16:29:39 +08:00
tarsin cbebdb542d Move torrent parser to rust 2023-06-14 16:20:18 +08:00
tarsin 84d13fe9c5 Cleanup rust code 2023-06-14 13:05:01 +08:00
tarsin c6919c39c6 Move favParser to rust 2023-06-14 12:41:44 +08:00
tarsin 92b6069654 Cleanup rust parser 2023-06-14 11:36:36 +08:00
tarsin 804dffc81a Cleanup rust parser 2023-06-14 10:30:07 +08:00
tarsin 5831761fc0 Drop logger for now 2023-06-12 15:42:42 +08:00
tarsin c887379b8b Ignore Cargo.lock as well 2023-06-12 15:39:35 +08:00
tarsin 82c92203b6 Initial refactor HomeParser with rust 2023-06-12 15:36:58 +08:00
tarsin 881948554e Cleanup buildscript 2023-06-12 12:05:05 +08:00
tarsin b0357201a5 Downgrade AGP to stable version 2023-06-12 11:58:48 +08:00
tarsin 7ddeaf6d16 Use cdylib and release profile for now 2023-06-12 11:07:11 +08:00
tarsin 942abd7dbb Add support for build rust dylib 2023-06-12 11:01:18 +08:00
tarsin 9f78b69390 Resolve #1136 2023-06-11 12:36:11 +08:00
tarsin 6e561ca9a9 Update r8 2023-06-10 17:15:55 +08:00
tarsin cec86576c1 Singletonize ReaderPreferences 2023-06-10 13:56:18 +08:00
tarsin 9eb8e984b6 Add chunker http inspector for debug usage 2023-06-09 19:00:03 +08:00
renovate[bot] 20798b5d25 Update plugin com.android.application to v8.1.0-beta05 2023-06-09 01:45:54 +00:00
tarsin 29fafdf216 Upgrade paging 2023-06-08 16:53:32 +08:00
tarsin 2fbda42e53 Cleanup CookiesDao 2023-06-08 16:26:49 +08:00
tarsin 285feb5f5b Cleanup EhCookieStore 2023-06-08 16:22:36 +08:00
tarsin cfdb8793c6 Cleanup EhCookieStore 2023-06-08 16:18:32 +08:00
tarsin 55b3753e66 Migrate cookies store to CookieManager backend 2023-06-08 16:11:48 +08:00
renovate[bot] ad04681460 Update dependency androidx.paging:paging-common-ktx to v3.2.0-beta01 2023-06-08 04:07:38 +00:00
renovate[bot] 2e132f06b7 Update nav_version to v2.7.0-beta01 2023-06-08 09:30:00 +08:00
renovate[bot] dc74266927 Update dependency androidx.core:core-ktx to v1.11.0-beta02 2023-06-07 21:39:55 +00:00
tarsin e002e15a66 Fix imagelimits dialog crash 2023-06-07 16:14:10 +08:00
tarsin e149c7065e Upgrade r8 2023-06-07 15:46:50 +08:00
tarsin 107a5ce626 Tweak package layout 2023-06-07 15:39:35 +08:00
tarsin b6d69f7a02 Tweak package layout 2023-06-07 15:36:56 +08:00
tarsin 6de6c89439 Tweak package layout 2023-06-07 15:35:16 +08:00
tarsin c1ca6dcd5d Tweak package layout 2023-06-07 15:31:33 +08:00
tarsin 223ebd6acd Flatten legacy view package 2023-06-07 15:28:47 +08:00
tarsin cc8311e116 Opt-in DataStorePreferencesPreview 2023-06-07 15:18:58 +08:00
tarsin a66f53e562 Trick to fix amoled mode 2023-06-07 15:13:08 +08:00
tarsin de699dacfe Subscribe show_tag_translations changes 2023-06-07 15:04:36 +08:00
tarsin 431007a731 Subscribe gallerysite changes 2023-06-07 15:02:24 +08:00
tarsin 797d511c2c Protect preferences need certain locales 2023-06-07 14:58:22 +08:00
tarsin 0c40be5da8 Protect preferences need signin 2023-06-07 14:55:33 +08:00
tarsin 2fc04caa05 Drop unused res 2023-06-07 14:48:23 +08:00
tarsin 78ffe38f54 Fix securityDelay pref summary 2023-06-07 14:45:19 +08:00
tarsin 8152a04155 Fix thumbResolution pref summary 2023-06-07 14:38:07 +08:00
tarsin 64b39275e2 Restore UConfigScreen applyTip 2023-06-07 14:33:21 +08:00
tarsin 23c6291cc8 Use mutableStateListOf, remove some recompose trigger 2023-06-07 14:29:22 +08:00
tarsin 60fe67b97a Restore filter tip 2023-06-07 14:22:28 +08:00
tarsin 96264a28a6 Fixup! Restore dialog to add filter 2023-06-07 13:51:47 +08:00
tarsin b86cb676d6 Restore dialog to add filter 2023-06-07 13:43:57 +08:00
tarsin a05fc8447d Restore dialog to delete filter 2023-06-07 13:28:45 +08:00
tarsin 68a617b952 FilterScreen optimize recompose 2023-06-06 23:48:14 +08:00
tarsin f18bfab35f FilterScreen appbar liftonScroll 2023-06-06 23:45:11 +08:00
tarsin c04f30a5b7 FilterScreen implementation part 4 2023-06-06 23:43:51 +08:00
tarsin 7a35d60b71 FilterScreen implementation part 3 2023-06-06 23:40:42 +08:00
tarsin cd3fa38161 FilterScreen implementation part 2 2023-06-06 23:34:33 +08:00
tarsin 6a65eabf28 FilterScreen implementation part 1 2023-06-06 23:29:55 +08:00
tarsin 0905a4dfba FilterScreen help message 2023-06-06 23:08:42 +08:00
tarsin c68c011e69 FilterScreen stub 2023-06-06 23:05:51 +08:00
tarsin a57066b6db Implement MyTagsScreen 2023-06-06 23:01:24 +08:00
tarsin 0b19cc71c9 Cleanup UConfigScreen 2023-06-06 22:48:55 +08:00
tarsin 38e6b60005 Cleanup UConfigScreen 2023-06-06 22:36:34 +08:00
tarsin 35a18ecc0f Navback after settings applied 2023-06-06 22:34:12 +08:00
tarsin 5fb2ec2fda Cleanup js apply 2023-06-06 22:31:27 +08:00
tarsin 61a2ae9431 Implement UConfigScreen 2023-06-06 22:23:36 +08:00
tarsin cba05171af Convert to use accompanist Webview 2023-06-06 21:54:25 +08:00
renovate[bot] 816d63e432 Update accompanist_version to v0.31.3-SNAPSHOT 2023-06-06 21:41:40 +08:00
tarsin 56c2e6fcde Import accompanist webview 2023-06-06 21:39:34 +08:00
tarsin d6aee24295 Remove Activity ref 2023-06-06 19:49:42 +08:00
tarsin 13b28c0f38 Introduce FINISH_ROUTE_NAME 2023-06-06 19:47:08 +08:00
tarsin 2f69b942d9 Cleanup SelectSiteScreen 2023-06-06 19:11:07 +08:00
tarsin 5977d77381 Navigate to SIGN_IN_ROUTE directly when signout 2023-06-06 19:04:01 +08:00
tarsin fe336ebf6a Fixup merge 2023-06-06 19:00:12 +08:00
tarsin c44776870e Merge LoginActivity & SettingsActivity 2023-06-06 18:54:29 +08:00
tarsin 67d5942aff Observe updateWhenRequestNewsChanges 2023-06-06 16:36:00 +08:00
tarsin 48e3b44658 Implement compose TimePickerDialog 2023-06-06 16:30:59 +08:00
tarsin 89347768b3 Fix codestyle 2023-06-06 15:50:33 +08:00
tarsin 2ed726427f Add AnimatedVisibility for preference dependency 2023-06-06 15:49:37 +08:00
tarsin 8ee20070b6 Add FilterScreen stub 2023-06-06 15:45:35 +08:00
tarsin ca9e1e93d9 Add MyTagsScreen stub 2023-06-06 15:43:28 +08:00
tarsin d9ea549b51 Add UConfigScreen stub 2023-06-06 15:38:48 +08:00
tarsin 0860bb488f [DO NOT USE] Restore ability to reset image limits 2023-06-06 15:23:53 +08:00
tarsin 8efc5401cb [DO NOT USE] Show Integer in slider 2023-06-06 14:36:29 +08:00
tarsin 13e5649948 [DO NOT USE] Add 2 missing preference 2023-06-06 14:33:08 +08:00
tarsin bb77c4ecfc [DO NOT USE] Introduce LauncherPreference 2023-06-06 14:06:07 +08:00
tarsin 3d16151bd2 [DO NOT USE] Fixup codestyle 2023-06-06 13:40:58 +08:00
tarsin 9053b200b2 [DO NOT USE] Restore copy notify 2023-06-06 01:24:31 +08:00
tarsin a450dd29f9 [DO NOT USE] Cleanup AccountPreference 2023-06-06 01:18:04 +08:00
tarsin 2f309fe9bb [DO NOT USE] Cleanup AccountPreference 2023-06-06 01:16:34 +08:00
tarsin 5f9f7d0ba7 [DO NOT USE] Restore AccountPreference 2023-06-06 01:13:59 +08:00
tarsin 6f1a08f2c7 [DO NOT USE] Introduce WorkPreference 2023-06-06 00:46:33 +08:00
tarsin 563f6810be [DO NOT USE] Merge object PreferenceTokens 2023-06-06 00:39:14 +08:00
tarsin 66ed7a04a4 [DO NOT USE] Cleanup preference default args 2023-06-06 00:38:04 +08:00
tarsin 626475a91f [DO NOT USE] Restore ability to clear redundancy 2023-06-06 00:34:11 +08:00
tarsin f99575771c [DO NOT USE] Restore ability to restore downloads 2023-06-06 00:28:21 +08:00
tarsin bc5a0f9140 [DO NOT USE] Fix to use Transition.None 2023-06-05 23:52:35 +08:00
tarsin 40958179ca [DO NOT USE] Use new navigation anim 2023-06-05 23:45:54 +08:00
tarsin d98006c2cd [DO NOT USE] Upgrade androidx navigation to 2.7.0-alpha01 2023-06-05 21:28:43 +08:00
tarsin 5134c9b378 [DO NOT USE] Observe theme changed 2023-06-05 19:04:31 +08:00
tarsin 1379953a9c [DO NOT USE] Inline setting keys 2023-06-05 18:45:14 +08:00
tarsin cc02b69020 [DO NOT USE] EhScreen implementation part 1 2023-06-05 18:42:16 +08:00
tarsin 55b4edac4d [DO NOT USE] Cleanup unused res and code 2023-06-05 18:18:27 +08:00
tarsin b56f136da0 [DO NOT USE] Introduce MutableState<T>.rememberedAccessor 2023-06-05 17:49:49 +08:00
tarsin d2b5e5ec01 [DO NOT USE] Tweak SimpleMenuPreferenceInt to receive a MutableState 2023-06-05 17:10:39 +08:00
tarsin 623ab63d8d [DO NOT USE] Introduce KMutableProperty0<T>.observed 2023-06-05 16:58:38 +08:00
tarsin 3b1beba570 [DO NOT USE] Implement DownloadScreen part 4 2023-06-05 16:05:38 +08:00
tarsin 4e6210c1f8 [DO NOT USE] Implement DownloadScreen part 3 2023-06-05 16:00:50 +08:00
tarsin 281154be7a [DO NOT USE] Implement DownloadScreen part 2 2023-06-05 15:55:07 +08:00
tarsin 9b4477766c [DO NOT USE] Implement DownloadScreen part 1 2023-06-05 15:45:02 +08:00
tarsin 53bbabab75 [DO NOT USE] Drop in-app proxy support 2023-06-05 15:32:51 +08:00
tarsin b1671eacb7 [DO NOT USE] Restore DOH support 2023-06-05 15:28:00 +08:00
tarsin b41e564411 [DO NOT USE] Import backupFav 2023-06-05 15:23:24 +08:00
tarsin 48e12154c3 [DO NOT USE] Fix db import 2023-06-05 15:17:05 +08:00
tarsin 5c25e2801c [DO NOT USE] Implement DB import 2023-06-05 14:51:12 +08:00
tarsin c2d2c1c4f6 [DO NOT USE] Implement DB export 2023-06-05 14:45:34 +08:00
tarsin 59959bb9ee [DO NOT USE] Migrate to datastore backend 2023-06-05 12:24:08 +08:00
tarsin 3664ca846c [DO NOT USE] Drop androidx preference, drop rikkax preference 2023-06-05 12:17:55 +08:00
tarsin 8c6d28d6e2 Make AndroidPreferenceStore use Settings backend 2023-06-05 12:09:36 +08:00
tarsin b3acd1d603 Implement openByDefault 2023-06-05 11:57:53 +08:00
tarsin d76e056b91 Implement dumpLogcatLauncher 2023-06-05 11:50:16 +08:00
tarsin 5de5dbabef AdvancedScreen placeholder 2023-06-05 11:19:09 +08:00
tarsin 866ea6369e Refine observed usage 2023-06-05 01:14:53 +08:00
tarsin ae2f7204fa Implement Compose SimpleMenuPreference 2 2023-06-05 01:09:41 +08:00
tarsin 5be2b77e42 Implement Compose SimpleMenuPreference 2023-06-05 00:55:49 +08:00
tarsin 8f1f76c3d1 Import DropDownPref 2023-06-05 00:31:56 +08:00
tarsin 6f488c1d00 Implement part of AdvancedScreen 2023-06-05 00:27:00 +08:00
tarsin ee7724e754 Create EhScreen, DownloadScreen stub 2023-06-05 00:19:18 +08:00
tarsin 6c4848b6f9 Apply applyPopAnimationsToPendingTransition globally 2023-06-05 00:15:31 +08:00
tarsin b6c36c20b6 Add stub AdvancedScreen 2023-06-05 00:13:21 +08:00
tarsin a29fc4ce94 Fix SliderPref enable status 2023-06-05 00:10:30 +08:00
tarsin 6490598fc3 Add IntSliderPreference 2023-06-05 00:05:25 +08:00
tarsin f3519f6f8a Import SliderPref 2023-06-04 23:53:42 +08:00
tarsin d44192079d Properly implement Preference 2023-06-04 23:39:33 +08:00
tarsin 140fac4f3b Stupid implementation of SwitchPreference 2023-06-04 17:33:01 +08:00
tarsin 802db256c1 Cleanup LicenseScreen 2023-06-04 16:58:10 +08:00
tarsin c8a9cfa8a3 Add SecurityScreen stub 2023-06-04 16:56:39 +08:00
tarsin 2213969c6e Fixup LicenseScreen padding 2023-06-04 16:51:45 +08:00
tarsin 524a3a94c4 Cleanup AboutScreen 2023-06-04 16:49:16 +08:00
tarsin 4ec58a0f62 Add standalone SpannedHelper 2023-06-04 16:43:01 +08:00
tarsin e25227e39d Add nestedScrollConnection 2023-06-04 16:38:28 +08:00
tarsin 7efaa64562 Implement AboutScreen 2023-06-04 16:30:49 +08:00
tarsin a2b95f6c61 AboutScreen stub 2023-06-04 15:32:32 +08:00
tarsin 9a6aa1a591 Cleanup PreferenceHeader implementation 2023-06-04 15:28:36 +08:00
tarsin de780635e4 Implement BaseScreen 2023-06-04 15:25:30 +08:00
tarsin 3dbb40967f Introduce BaseScreen 2023-06-04 14:54:59 +08:00
tarsin f39d17abc0 Introduce new compose SettingsActivity stub 2023-06-04 14:42:56 +08:00
tarsin a015e54569 Revert "Introduce KTLS based http downoader API stub"
This reverts commit a256864c84.
2023-06-03 22:16:51 +08:00
tarsin a256864c84 Introduce KTLS based http downoader API stub 2023-06-03 17:37:53 +08:00
tarsin d74b5bff7b Konvert AppConfig 2023-06-03 15:40:01 +08:00
tarsin 31e7943d22 Rename .java to .kt 2023-06-03 15:40:01 +08:00
tarsin b2d1660e95 Drop GetText 2023-06-03 15:06:42 +08:00
tarsin 5d13e29300 Cleanup unused res 2023-06-03 15:00:06 +08:00
tarsin aaf9ef06dd Rewrite ProgressScene with Jetpack Compose 2023-06-02 21:23:30 +08:00
tarsin 6725ef992a Drop Settings.initialize 2023-06-02 18:14:00 +08:00
tarsin b5baecf8d0 Singletonize EhProxySelector 2023-06-02 17:58:35 +08:00
tarsin 58d1ace612 Singletonize FavouriteStatusRouter 2023-06-02 17:55:40 +08:00
tarsin a4eca58275 Don't opt-in InternalCoroutinesApi 2023-06-02 15:53:18 +08:00
tarsin c97974eb72 Purify Settings 2023-06-02 15:47:11 +08:00
tarsin c46c386fea Move downloadLocation getter setter companion of DownloadManager 2023-06-02 15:43:10 +08:00
tarsin 3f4ca1bcbf Cleanup Settings code style 2023-06-02 15:35:34 +08:00
tarsin e4e04a4508 Cleanup Settings 2023-06-02 15:34:01 +08:00
tarsin 6d87dc0b1c Continue to cleanup Settings 2023-06-02 15:21:58 +08:00
tarsin db16a0c17c Cleanup Settings 2023-06-02 15:20:41 +08:00
tarsin 8fc411a30b Make Delegate private interface 2023-06-02 15:13:37 +08:00
tarsin c4a15f8e00 Optin ExperimentalSplittiesApi 2023-06-02 15:12:18 +08:00
tarsin 90e6918db0 Cleanup Settings 2023-06-02 15:09:40 +08:00
tarsin 62d7d09886 Inline launchPageGalleryListSceneAction 2023-06-02 15:03:34 +08:00
tarsin d9c933bd0a Inline thumbSize 2023-06-02 14:59:46 +08:00
tarsin 06c3e3c8a0 Fix downloadLocation scheme 2023-06-02 14:54:15 +08:00
tarsin f284ac71b5 Introduce stringArrayPref 2023-06-02 14:47:56 +08:00
tarsin cd969ac33b Introduce intArrayPref 2023-06-02 14:38:20 +08:00
tarsin ac43df5e03 Refine saveFromHttpResponse, avoid a buffer allocation 2023-06-02 14:14:21 +08:00
tarsin 8ea6417ea6 Refactor out interceptSecurityOrReturn 2023-06-02 13:49:49 +08:00
tarsin 19295e1d30 Refactor out lockObserver 2023-06-02 13:46:15 +08:00
tarsin f84b10f2eb Resolve #1124 2023-06-02 12:31:11 +08:00
tarsin 184edf9d4c Use splitties roomDb builder 2023-06-02 12:19:04 +08:00
tarsin 257e247e23 Inline listThumbSize 2023-06-01 21:10:47 +08:00
tarsin a2f0b4a64f Inline putPasswdToArchivePasswds 2023-06-01 21:08:26 +08:00
tarsin 9f1ec2be7e Inline intFrom 2023-06-01 21:05:22 +08:00
tarsin 046ba62256 Introduce intFromStrPref 2023-06-01 21:04:03 +08:00
tarsin c9f18b0b71 Convert to use intFromStrPref 2023-06-01 19:34:05 +08:00
tarsin b61e1bdbe3 Introduce intFromStrPref 2023-06-01 19:17:23 +08:00
tarsin 1a01caee2c Cleanup archivePasswds pref 2023-06-01 18:48:33 +08:00
tarsin 2fed610470 Cleanup listThumbSize pref 2023-06-01 18:39:36 +08:00
tarsin 2026843628 Inline some preference keys 2023-06-01 17:49:27 +08:00
tarsin 9997d31421 Inline some preference keys 2023-06-01 17:46:36 +08:00
tarsin 1079e4a759 Sort preferences by type 2023-06-01 17:40:44 +08:00
tarsin ce5c258cf9 Move some property to delegate 2023-06-01 17:36:06 +08:00
tarsin c1b76b35ec Move some property to delegate 2023-06-01 17:28:22 +08:00
tarsin e9cb083672 Move some property to delegate 2023-06-01 17:16:23 +08:00
tarsin 034a5c2071 Move some property to delegate 2023-06-01 17:07:57 +08:00
tarsin 6c7e3019ff Import splitties preferences 2023-06-01 16:56:23 +08:00
tarsin fc02902ccb Restore LongClick HapticFeedback 2023-06-01 16:17:59 +08:00
tarsin f33ff6d380 Use Splitties systemServices 2023-06-01 16:13:37 +08:00
tarsin 2c30deb298 Use Splitties appCtx 2023-06-01 15:48:45 +08:00
tarsin 6ea635a1e9 Resolve #1122 2023-05-31 23:21:59 +08:00
tarsin 858134927a Resolve #1122 2023-05-31 21:38:52 +08:00
tarsin 0eec51ef8e Revert "Resolve #1122"
This reverts commit de065076df.
2023-05-31 21:28:45 +08:00
tarsin de065076df Resolve #1122 2023-05-31 18:51:22 +08:00
tarsin ad4c418736 Resolve #1121 2023-05-31 18:37:45 +08:00
tarsin 9ab368a760 Workaround download in UIContext 2023-05-31 18:00:50 +08:00
tarsin 59f3cf20a5 Introduce DialogState.doGalleryInfoAction 2023-05-31 17:57:24 +08:00
tarsin 8a58b6ee0f Move to DialogState.showMoveDownloadLabel impl 2023-05-31 17:45:28 +08:00
tarsin d6816c89e5 Refactor compose dialog 2023-05-31 17:02:32 +08:00
tarsin 7ca37ee54a Tweak prefetchDistance 2023-05-31 14:46:32 +08:00
tarsin 4b4304629f Fix previewScene jump 2023-05-31 14:36:32 +08:00
tarsin dba557b942 Fix codestyle 2023-05-31 13:50:37 +08:00
tarsin fe158e7f62 Tweak DialogScope 2023-05-31 13:47:53 +08:00
tarsin ac7fed649a Implement dialogState.confirmRemoveDownload 2023-05-31 13:25:23 +08:00
tarsin cb67a51686 Move DialogState.selectGalleryInfoAction to CommonOperations 2023-05-31 12:42:50 +08:00
tarsin 4d85a2aa41 Resolve #1120 2023-05-31 12:29:29 +08:00
tarsin 0df875d65a Upgrade AGP 2023-05-31 12:17:06 +08:00
tarsin fff1ec0947 Downgrade AGP to stable version 2023-05-31 12:06:14 +08:00
tarsin 250a7ef25e Update build.gradle.kts 2023-05-31 02:16:30 +08:00
tarsin 805d22802c Update build.gradle.kts 2023-05-31 02:14:20 +08:00
tarsin 9745ce7d34 Update build.gradle.kts 2023-05-31 01:55:27 +08:00
tarsin c165c15099 Upgrade AGP 2023-05-31 01:28:03 +08:00
tarsin 351231aab9 Delegate all reader call to Context.navToReader 2023-05-31 01:10:08 +08:00
tarsin 0e78494f39 Cleanup code 2023-05-31 00:52:13 +08:00
tarsin 886ce38543 Drop SelectItemWithIconAdapter 2023-05-31 00:46:52 +08:00
tarsin f542c8a12e Inline NoHistory 2023-05-31 00:27:07 +08:00
tarsin c35cac860f Cleanup showSelectItemWithIcon implementation 2023-05-31 00:25:24 +08:00
tarsin afcdc5ec5b Fix typo 2023-05-30 23:58:04 +08:00
tarsin b9f24001ed Move to showSelectItemWithIcon impl 2023-05-30 23:55:40 +08:00
tarsin 1f0319c242 Tweak showSelectItemWithIcon style 2023-05-30 23:49:29 +08:00
tarsin 5e8e95f716 Introduce DialogScope.showSelectItemWithIcon 2023-05-30 23:41:19 +08:00
tarsin dd73b20b3f Konvert ShortcutsActivity 2023-05-30 21:41:59 +08:00
tarsin c6a83ac6b2 Rename .java to .kt 2023-05-30 21:41:59 +08:00
tarsin 6ea7a1405f Cleanup unused code 2023-05-30 21:37:47 +08:00
tarsin 774db8d3a4 Always merge requests when preloadThumbAggressively 2023-05-30 21:26:19 +08:00
tarsin a7187d62d3 Konvert ImageLoader.Builder 2023-05-30 21:24:36 +08:00
tarsin e5788b9ec5 Cleanup EhApplication 2023-05-30 21:20:36 +08:00
tarsin be96491091 Introduce idiomatic OkHttp builders 2023-05-30 21:17:36 +08:00
tarsin ea0b83476f Konvert FavouriteStatusRouter 2023-05-30 20:41:14 +08:00
tarsin 187f77d32f Rename .java to .kt 2023-05-30 20:41:14 +08:00
tarsin 46655e3326 Move builtInHosts to Standalone EhHostsConfig 2023-05-30 20:35:32 +08:00
tarsin 4f1615b736 Cleanup EhRequestBuilder 2023-05-30 20:30:50 +08:00
tarsin 8b3ab44c1c Cleanup EhSSLSocketFactory 2023-05-30 20:27:45 +08:00
tarsin 10b6258175 Only make large blob downloading sensitive for cancelling 2023-05-30 20:17:40 +08:00
tarsin 13b532c12a Revert "Fix usingCancellable with null ret value"
This reverts commit d464d00067.
2023-05-30 20:16:02 +08:00
tarsin 126f4238d6 Fix DownloadsScene lag 2023-05-30 18:18:30 +08:00
tarsin 9666feac57 Cleanup downloadManager ref in DownloadsScene 2023-05-30 17:43:57 +08:00
tarsin d464d00067 Fix usingCancellable with null ret value 2023-05-29 20:04:15 +08:00
tarsin 6e96571cc8 Cleanup UrlBuilder with HttpUrl 2023-05-29 19:58:56 +08:00
tarsin 2b70c983bf Document Call.usingCancellable 2023-05-29 17:41:59 +08:00
tarsin 3a2c18d8a9 Refine saveFromHttpResponse 2023-05-29 17:24:34 +08:00
tarsin 29fb40eecc Introduce Call.usingCancellable 2023-05-29 17:02:46 +08:00
tarsin 684d25780e Introduce runInterruptibleOkio 2023-05-29 16:03:41 +08:00
tarsin 51a292e5d0 Use runInterruptible for more sensitive cancellation 2023-05-29 15:36:35 +08:00
tarsin 4f99107ac5 Tweak DF configs 2023-05-28 20:33:44 +08:00
tarsin e4685c7018 Log DoH lookup failure 2023-05-28 19:26:17 +08:00
tarsin 6a42793a59 Fixup! Implement custom DoH 2023-05-28 19:08:02 +08:00
tarsin 4a81df4174 Implement custom DoH 2023-05-28 19:04:28 +08:00
tarsin 512e961820 Add DohPreference 2023-05-28 18:37:50 +08:00
tarsin cbccf7e7fa Add dohUrl settings entry 2023-05-28 17:54:26 +08:00
tarsin f1890c2d3e Cleanup Settings 2023-05-28 17:48:56 +08:00
tarsin 0c30b20a66 Add doh module 2023-05-28 17:43:36 +08:00
tarsin 14b3f13338 Use AndroidAsyncDns 2023-05-28 17:34:00 +08:00
tarsin 0f75f5ec69 Tweak hosts config 2023-05-28 13:57:39 +08:00
tarsin bdbc5438aa Fixup code style 2023-05-28 13:56:51 +08:00
tarsin 525131dbaf Update EhDns.kt 2023-05-28 01:29:08 +08:00
tarsin f8938a46bb Fix naming 2023-05-28 01:18:58 +08:00
tarsin 50ce18d201 Fix codestyle 2023-05-28 01:14:56 +08:00
tarsin bba06321c8 Introduce hostDSL 2023-05-28 01:13:22 +08:00
tarsin 3439b684e1 Drop ip parser 2023-05-28 00:37:30 +08:00
tarsin 0ffba596e5 Cleanup Obsolete db 2023-05-27 23:52:25 +08:00
tarsin c112322daf Drop custom hosts 2023-05-27 23:46:00 +08:00
tarsin a942a487a0 Drop buildMainDB 2023-05-27 22:53:24 +08:00
tarsin 7f02c27a3a Rename EhDatabase to Database 2023-05-27 22:51:37 +08:00
tarsin a69edd5c55 Move CookiesDatabase out of EhDatabase 2023-05-27 22:50:52 +08:00
tarsin f8a0d8b9c5 Move searchDatabase out of EhDatabase 2023-05-27 22:49:12 +08:00
tarsin a7214740ec Avoid mainthread db query 2023-05-27 20:01:26 +08:00
tarsin 17fb0f724c Fix SearchDatabase query 2023-05-27 19:56:38 +08:00
tarsin 5e14dad961 Initial migrate SearchDatabase to ROOM 2023-05-27 19:27:01 +08:00
tarsin dc48363398 Dedup dependencies 2023-05-27 13:02:46 +08:00
tarsin df4a8ec15e Cleanup codestyle 2023-05-27 12:53:03 +08:00
tarsin 810e3ff5fe Use suggestion chip 2023-05-27 12:49:54 +08:00
tarsin aef065a057 Allow open license dialog when badge clicked 2023-05-27 12:41:36 +08:00
tarsin 1824786a80 Open website by default when library item clicked 2023-05-27 01:26:34 +08:00
tarsin c8b7fed168 Drop autogenerated json 2023-05-27 01:19:40 +08:00
tarsin 4118390283 Use tertiaryContainer for badge container 2023-05-27 01:09:59 +08:00
tarsin 13a9fd36d3 Sort libraries by name 2023-05-27 01:03:11 +08:00
tarsin 9ad933934f Add LicenseFragment 2023-05-27 00:55:03 +08:00
tarsin 92240c6c2c Improve MergeInterceptor, only merge normal preview requests 2023-05-26 18:43:40 +08:00
tarsin 689a78d2ee Improve MergeInterceptor 2023-05-26 18:01:45 +08:00
tarsin 7ed0b93faa Cleanup code 2023-05-26 17:37:55 +08:00
tarsin 3a004c41f8 Refactor db export with resourceDSL 2023-05-26 17:15:11 +08:00
tarsin 90ed83efd5 Refactor db import with resourceDSL 2023-05-26 16:58:18 +08:00
tarsin 3a2ccf86fd Fix database import 2023-05-26 16:36:39 +08:00
tarsin 4e6f906903 Convert ThumbKeyMigration to AutoMigrationSpec 2023-05-26 16:27:22 +08:00
tarsin c73ca48e35 Add db v4 schemas 2023-05-26 16:12:55 +08:00
tarsin e1d7b3132d Drop BookmarksDao, upgrade db 2023-05-26 16:02:32 +08:00
tarsin 1f4f99079b Sync with 1.8.8.3 VC 2023-05-26 15:48:03 +08:00
tarsin bf495336d9 Fixup aa1e2102fc 2023-05-26 15:44:55 +08:00
tarsin cc636bcae0 Nonnullize and Immutablize DownloadDirname, upgrade db 2023-05-26 15:44:00 +08:00
tarsin cf185a6148 Export dao schemas 2023-05-26 15:29:16 +08:00
tarsin f92ce637bf Fixup unsafe Composable behaviour 2023-05-26 15:22:50 +08:00
tarsin 2a34d6eb8b Workaround aspect is NaN, Resolve #1116 2023-05-26 15:13:45 +08:00
tarsin a8e3f67371 Fix wrong thumb crop behaviour 2023-05-26 14:59:03 +08:00
tarsin 4a7d4dedd0 Sync with 1.8.8.2 VC 2023-05-26 14:36:55 +08:00
tarsin 7d3178015b Fixup! Resolve #1113 2023-05-26 14:34:58 +08:00
tarsin 54079990d0 Sync with 1.8.8.1 versionCode 2023-05-26 13:48:41 +08:00
tarsin a379391862 Resolve #1113 2023-05-26 13:43:07 +08:00
tarsin dfb2fbf88b Hello, K2! 2023-05-25 16:23:05 +08:00
tarsin 68f201980a Upgrade Kotlin 1.9.0-Beta 2023-05-25 16:14:35 +08:00
tarsin 9a079083e9 Prepare next development iteration 2023-05-25 15:39:16 +08:00
renovate[bot] 1ee1b122fe Update dependency dev.chrisbanes.compose:compose-bom to v2023.04.00-SNAPSHOT 2023-05-25 15:37:48 +08:00
tarsin 25d4d5e393 Bump to 1.8.8.0 2023-05-25 15:33:07 +08:00
tarsin 1743caa869 Remove unused padding 2023-05-25 15:13:27 +08:00
tarsin 958fdb19b4 Revert "Decode cf protected email, step 1"
This reverts commit d44981a70c.
2023-05-25 15:02:14 +08:00
tarsin 4b63648a79 Revert "Decode cf protected email, step 2, Resolve #1102"
This reverts commit 74c6bfa479.
2023-05-25 15:02:00 +08:00
tarsin 498b84df37 Revert "Optimize code"
This reverts commit 6ed3fb29d9.
2023-05-25 15:01:49 +08:00
tarsin 7a4e65259d Revert "Uniform html parse behaviour"
This reverts commit c5c1170383.
2023-05-25 15:01:38 +08:00
tarsin 8cb8dcbe0f Resolve #1067 2023-05-25 14:16:13 +08:00
tarsin da37b3cdff Upgrade compose bom 2023-05-25 13:44:10 +08:00
renovate[bot] 0a1768e481 Update dependency androidx.core:core-ktx to v1.11.0-beta01 2023-05-25 13:41:57 +08:00
renovate[bot] 818d16a32d Update dependency androidx.paging:paging-common-ktx to v3.2.0-alpha06 2023-05-25 13:41:03 +08:00
renovate[bot] e9a5d1cc7c Update dependency androidx.paging:paging-compose to v1.0.0-alpha20 2023-05-25 13:40:19 +08:00
renovate[bot] dac56f3e32 Update dependency androidx.constraintlayout:constraintlayout-compose to v1.1.0-alpha10 2023-05-25 03:55:42 +00:00
renovate[bot] d6cbcdc6cd Update dependency androidx.activity:activity-compose to v1.7.2 2023-05-25 01:29:39 +00:00
tarsin c5c1170383 Uniform html parse behaviour 2023-05-24 20:12:24 +08:00
tarsin 6ed3fb29d9 Optimize code 2023-05-24 19:28:55 +08:00
tarsin 74c6bfa479 Decode cf protected email, step 2, Resolve #1102 2023-05-24 19:19:47 +08:00
tarsin d44981a70c Decode cf protected email, step 1 2023-05-24 18:51:22 +08:00
tarsin 06e411d332 Fixup! Rewrite LauncherUtils 2023-05-23 13:44:32 +08:00
tarsin f419189749 Rewrite LauncherUtils 2023-05-23 13:11:57 +08:00
tarsin aa1e2102fc Fix deprecated coil API 2023-05-22 21:53:59 +08:00
tarsin 306ce9ed21 Always use ImageDecoderDecoder for better performance 2023-05-22 12:33:12 +08:00
renovate[bot] 544fcb2e88 Update dependency io.coil-kt:coil-compose to v2.4.0 2023-05-21 21:44:29 +00:00
tarsin cb01df4071 Revert "Update dependency dev.chrisbanes.compose:compose-bom to v2023.04.00-SNAPSHOT"
This reverts commit 38310b7c5a.
2023-05-21 10:42:08 +08:00
renovate[bot] 38310b7c5a Update dependency dev.chrisbanes.compose:compose-bom to v2023.04.00-SNAPSHOT 2023-05-20 19:21:10 +00:00
tarsin fcd56ff4e9 Use compose-bom 2023.04.00-alpha04 for reproducible artifact 2023-05-21 00:16:58 +08:00
tarsin 41300a9fd4 Fix okhttp dependency 2023-05-21 00:12:28 +08:00
tarsin 0bd5f9dc31 Downgrade ArrowKt to stable release for reproducible artifacts 2023-05-21 00:11:10 +08:00
tarsin 004ecd0dd3 Resolve #1095 2023-05-21 00:06:56 +08:00
tarsin fc24a18ac5 Bump to 1.8.8.0-beta 2023-05-19 19:19:43 +08:00
tarsin a9a8c68b94 Fix code style, fuck Android Studio 2023-05-19 18:55:18 +08:00
tarsin 193d2f8d9e Fix rememberMemorized implementation 2023-05-19 18:50:17 +08:00
tarsin 538da9b98f Cleanup rememberSaveable usage 2023-05-19 17:25:29 +08:00
tarsin 071b597552 Introduce rememberMemorized 2023-05-19 17:06:32 +08:00
tarsin 8926d74378 Introduce rememberGlobally 2023-05-19 13:10:15 +08:00
tarsin 39a4b03bc3 Avoid TransactionTooLargeException 2023-05-19 12:16:07 +08:00
tarsin 9202bbc7dc Workaround #1092 2023-05-19 11:43:21 +08:00
tarsin f5601ebca1 Don't saveInstanceState when data too large, Workaround #1092 2023-05-19 10:50:18 +08:00
tarsin 2f978b554e Adjust kotlin compiler options 2023-05-18 13:55:06 +08:00
tarsin f48a90d941 Upgrade r8 2023-05-18 13:29:41 +08:00
tarsin 4f0d9fa83c Allow downsampling on LargePreviews 2023-05-18 11:52:25 +08:00
tarsin 57a747ed9c Fix cycled preview when PreviewPages == 1 2023-05-17 23:39:19 +08:00
tarsin 746a045328 Bump to 1.8.8.0-alpha 2023-05-17 22:49:34 +08:00
tarsin 2a4c7823c2 Bind downloadHolder with coroutine 2023-05-17 22:42:55 +08:00
tarsin b995510df1 Resolve #1082, #1081 again 2023-05-17 22:21:17 +08:00
tarsin a2852d6df9 Resolve #1082, #1081 again 2023-05-17 19:08:07 +08:00
tarsin 47863580a0 Resolve #1082, #1081 again 2023-05-17 19:01:39 +08:00
tarsin 9af6532331 Resolve #1082, #1081 2023-05-17 16:28:50 +08:00
txyyh 36f411a031 Release 1.8.8.0-preview 2023-05-17 06:28:17 +00:00
tarsin 00b6185188 Fix recover from decode error 2023-05-17 13:36:34 +08:00
tarsin a7db6c8613 Resolve #1077 2023-05-17 13:34:09 +08:00
tarsin 86097ace72 Revert "Dummy HistoryScene item remove animation"
Revert reason: This severely reduced jumping performance.
This reverts commit 467ab0b5a2.
2023-05-17 11:57:16 +08:00
tarsin b62dd1fcac Apply migration when import DB as well 2023-05-17 11:44:48 +08:00
tarsin 9a3b91c610 Cleanup thumbKey set
TODO: make thumbKey field nonnull!
2023-05-17 11:36:35 +08:00
tarsin 0f25789d74 Move EhAsyncThumb to dataflow Composable package 2023-05-17 11:28:25 +08:00
tarsin b50185639e Make EhAsyncThumb receive a GalleryInfo 2023-05-17 11:24:28 +08:00
tarsin 95478a615e Do db migration, Resolve #1074 2023-05-17 10:59:37 +08:00
renovate[bot] 91164e4dd6 chore(deps): update plugin com.android.application to v8.1.0-beta03 2023-05-16 22:24:55 +00:00
skymkmk ea42fa5613 fix: preview cannot be loaded in exhentai mode 2023-05-16 18:55:05 +08:00
tarsin c620478e38 Animate image search select 2023-05-15 16:38:08 +08:00
tarsin 467ab0b5a2 Dummy HistoryScene item remove animation 2023-05-15 16:27:06 +08:00
tarsin 1d14e3ceb4 Fix GalleryDetailHeaderCard thumb flicker 2023-05-15 12:58:53 +08:00
tarsin c4ff48f60f Avoid allocation?
I'm not sure kotlin compiler will optimize this
2023-05-14 18:24:43 +08:00
tarsin 196190314b Fix aggressive thumb preload
https://github.com/coil-kt/coil/commit/65ff90ea2b11db9da98cc7763d9c5f60e9ca364a
2023-05-14 18:17:08 +08:00
tarsin 4c7b4dbc51 Introduce CropDefaults 2023-05-14 14:55:51 +08:00
tarsin b820159736 No need to compareAndSet
set to the same value is a no-op
2023-05-14 14:48:07 +08:00
tarsin 41991b8f22 Refactor compose layout package 2023-05-14 14:44:07 +08:00
tarsin 6246d01247 Move CookiesDao to dao package 2023-05-14 14:29:36 +08:00
tarsin 3734d0c585 Refactor package structure 2023-05-14 14:20:50 +08:00
tarsin d70c5be15a Refactor package structure 2023-05-14 14:08:59 +08:00
tarsin 814230f4aa Remove "more_previews" header
As suggested, it is really ugly
2023-05-14 13:54:36 +08:00
tarsin 2b64491e76 Recover download db concurrently 2023-05-14 11:39:15 +08:00
tarsin f770ac9ac9 Implement #1042
Since this View-based reader will never be actively maintained, and we are to rewrite it with Compose,
Forgive me messing up the code...
2023-05-14 00:57:05 +08:00
tarsin a6a3219d1e Implement imageSearch 2023-05-13 20:51:26 +08:00
tarsin c1eddb5876 Initial compose ImageSearchLayout layout 2023-05-13 19:39:59 +08:00
tarsin 37dcad7d6f Always do activity launch in Dispatcher.Main 2023-05-13 18:22:30 +08:00
tarsin d06cd5cc2d Don't forget to drop continuation 2023-05-13 18:20:53 +08:00
tarsin c39e8eb43c Fuck off the silly Android launcher and callback :) 2023-05-13 18:14:06 +08:00
tarsin ae3caf84b5 Kick pickVisualMediaLauncher out of GalleryListScene scope 2023-05-13 17:41:49 +08:00
renovate[bot] 185d47fcdf Update dependency com.pinterest:ktlint to v0.49.1 2023-05-13 12:25:49 +08:00
renovate[bot] a63b2b3283 Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-android to v1.7.1 2023-05-12 22:59:40 +00:00
tarsin 576ff1b007 Workaround #1065 2023-05-13 00:41:44 +08:00
tarsin 7a20d7ca49 Maybe should use default size 2023-05-12 19:59:55 +08:00
tarsin 346b614999 Implement CheckableComposeCardView 2023-05-12 19:58:48 +08:00
tarsin 6b0ac4bf0a Fix duplicated signature 2023-05-12 19:16:22 +08:00
tarsin 4e859eefb8 Introduce CheckableComposeView 2023-05-12 18:39:25 +08:00
tarsin 578aff7dea Move onLongClick card to dummy hint holder 2023-05-12 18:33:28 +08:00
tarsin f81d9de2c6 Allow jump in history pager 2023-05-12 17:50:07 +08:00
tarsin 255de89a43 Fixup sideEffect 2023-05-12 17:40:29 +08:00
tarsin c561c223d6 Sync galleryListCard margin 2023-05-12 17:33:06 +08:00
tarsin ba7d501a6e Restore GalleryPreviewScreen behaviour 2023-05-12 16:57:34 +08:00
tarsin 5b75afbdc8 Adjust grid padding 2023-05-12 16:54:39 +08:00
tarsin f7b9be3bc5 Revert "Adjust padding"
This reverts commit 743bd951c8.
2023-05-12 16:42:46 +08:00
tarsin 743bd951c8 Adjust padding 2023-05-12 16:13:58 +08:00
tarsin 3d2bbe1463 Cleanup GalleryDetailWidgets interface 2023-05-12 15:47:04 +08:00
tarsin 4b1adab0eb Cleanup GalleryDetailWidgets codestyle 2023-05-12 15:42:49 +08:00
tarsin e8ad2f2185 Conditionally crop thumb, Resolve #1047 2023-05-12 12:15:38 +08:00
tarsin 8986289702 Resolve #1023 2023-05-12 12:05:32 +08:00
renovate[bot] 69ef88909e Update dependency org.jetbrains.kotlinx:kotlinx-serialization-cbor to v1.5.1 2023-05-12 00:16:29 +08:00
tarsin 443cacca00 Fixup androidx core NPE 2023-05-11 16:55:03 +08:00
tarsin ae5286bebb Resolve #1062 2023-05-11 16:39:54 +08:00
tarsin c3facb9787 Introduce calculateSuitableSpanCount 2023-05-11 16:35:18 +08:00
tarsin 22d5832ba2 Fixup! Purification GalleryPreviewsScreen 2023-05-11 16:30:22 +08:00
tarsin 68d55f416e Purification GalleryPreviewsScreen 2023-05-11 16:29:50 +08:00
tarsin dfda4c0bc2 Suppress BaseScene usage 2023-05-11 16:20:50 +08:00
tarsin c7289d07a0 Drop unused code 2023-05-11 16:01:45 +08:00
tarsin df1ff07745 Cleanup Code 2023-05-11 15:59:41 +08:00
tarsin 8ef017fb94 Cleanup Code 2023-05-11 15:59:16 +08:00
tarsin 4e896927a9 Maybe use badge for category color and simpleLang 2023-05-11 15:53:57 +08:00
tarsin 3aa9fddfd5 Refine name and drop unused res 2023-05-11 15:43:02 +08:00
tarsin d3bb169cdc And restore pages display 2023-05-11 15:36:01 +08:00
tarsin d8e168ed61 And never show uploader in FavScene
That field is missing
2023-05-11 15:22:34 +08:00
tarsin b924cc5341 Restore ListMode fav icon behaviour 2023-05-11 15:17:22 +08:00
tarsin bb6ed820a7 Initial move GalleryHolder to compose
TODO: Grid categoryColor, simpleLang badge, and don't show favourite icon in FavouriteScene
2023-05-11 15:08:43 +08:00
tarsin 1bb0c1d537 Cleanup unused code 2023-05-11 13:59:31 +08:00
tarsin 6ec69ca989 Enlarge prefetchDistance 2023-05-11 11:28:25 +08:00
tarsin 65f19f0782 Mitigate androidx core NPE 2023-05-11 11:02:18 +08:00
tarsin cd48f0aed8 Code cleanup 2023-05-11 10:50:49 +08:00
tarsin b165e96a07 More efficient way to implement goto 2023-05-11 10:42:30 +08:00
renovate[bot] d15dd900cc Update dependency androidx.core:core-ktx to v1.10.1 2023-05-10 22:40:23 +00:00
tarsin ce2391b6f3 Cleanup code 2023-05-10 23:48:07 +08:00
tarsin c786ff0087 Restore jumpToCertainPage ability 2023-05-10 23:12:15 +08:00
tarsin 577286eb56 Restore moveToNextPage support 2023-05-10 21:57:35 +08:00
tarsin f91c69906f Refactor GalleryPreviewsScene with Paging Compose 2023-05-10 21:37:40 +08:00
tarsin a3bdb70ef1 [Don't use] Initial move GalleryPreviewsScene to compose 2023-05-10 18:29:52 +08:00
tarsin 5f9bdabf7e Initial copy of material PullRefresh implementation, prepare to rewrite ContentLayout with compose 2023-05-10 15:00:57 +08:00
renovate[bot] 86ecb9b931 Update plugin com.android.application to v8.1.0-beta02 2023-05-08 20:55:43 +00:00
tarsin 9da687f168 Fix dialog appears when url being consumed 2023-05-08 08:44:43 +08:00
tarsin 8efea01d78 Upgrade r8 2023-05-08 00:10:00 +08:00
tarsin f824aed3be Dsl motto motto 2023-05-07 23:37:16 +08:00
tarsin 8b01906f1e Dsl motto motto 2023-05-07 23:31:27 +08:00
tarsin 61aab22c02 Fixup! Drop Ktor 2023-05-07 23:16:29 +08:00
tarsin 16e1e20812 Fixup! Drop Ktor 2023-05-07 23:14:16 +08:00
tarsin 25931f9068 Drop Ktor 2023-05-07 23:00:54 +08:00
renovate[bot] 65d5377683 Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-android to v1.7.0 2023-05-05 22:21:19 +00:00
renovate[bot] 383c37323a Update dependency com.google.android.material:material to v1.9.0 2023-05-05 07:45:40 +08:00
tarsin aa2073194d Always use setMD3Content 2023-05-04 22:12:12 +08:00
tarsin a57e91cd0a Revert "Workaround #1056"
This reverts commit 56de696330.
2023-05-04 21:08:14 +08:00
tarsin 56de696330 Workaround #1056 2023-05-04 21:05:05 +08:00
tarsin a6002712fd Optimize SignInScreen tablet layout 2023-05-04 19:33:30 +08:00
tarsin f752636c25 Cleanup CookieSignInScene layout 2023-05-04 19:02:28 +08:00
tarsin 6656399112 Cleanup code 2023-05-04 18:15:49 +08:00
tarsin 780bab2125 Convert SignInScreen to use a suspend dialog 2023-05-04 18:09:29 +08:00
tarsin 681be33fed Convert CookieSignInScene to use a suspend dialog 2023-05-04 18:05:05 +08:00
tarsin d30837665a Introduce coroutine bounded dialog 2023-05-04 17:38:17 +08:00
tarsin a6cefed13f Fix lag when popBackStack 2023-05-04 13:50:01 +08:00
tarsin 0299ca8b1f Add LazyColumnWithScrollBar 2023-05-04 13:12:53 +08:00
tarsin dd95878ba7 Replace deprecated method 2023-05-04 12:42:14 +08:00
tarsin f0ac27b159 Fix HistoryScene Tip bounce 2023-05-04 12:16:24 +08:00
tarsin f39ca55379 Drop unused res 2023-05-04 11:33:25 +08:00
tarsin 738c76ccd7 Reland Compose HistoryScene 2023-05-04 11:30:49 +08:00
tarsin 012ae19ca2 Cleanup unused res 2023-05-04 10:46:43 +08:00
renovate[bot] bfb3329e83 Update dependency androidx.paging:paging-runtime-ktx to v3.2.0-alpha05 2023-05-04 08:18:45 +08:00
renovate[bot] ff480291fe Update dependency composeOptions to v1.4.7 2023-05-04 08:18:33 +08:00
renovate[bot] 775441d223 Update dependency androidx.paging:paging-compose to v1.0.0-alpha19 2023-05-03 23:02:40 +00:00
tarsin 7c5f1da1fc Cleanup code 2023-05-03 19:31:17 +08:00
tarsin 71bd11a941 Cleanup code 2023-05-03 19:21:40 +08:00
tarsin ca62b9f4bf Cleanup code 2023-05-03 18:53:39 +08:00
tarsin 9272ff9fbf Resolve #1050 2023-05-03 18:46:42 +08:00
tarsin 366b106234 Fix redundant code 2023-05-03 18:18:03 +08:00
tarsin d333524559 Promote ArrowKt 2023-05-03 17:14:26 +08:00
tarsin 3f9c57ad2d Don't keep all activity reference 2023-05-01 12:17:12 +08:00
tarsin 64e55be02f Remove offsetY field in GalleryPreview 2023-05-01 12:00:09 +08:00
tarsin 99ed2b35d3 Store imageKey in GalleryPreview to mitigate Parcelable too large 2023-05-01 11:45:32 +08:00
tarsin f94a2350ab Spilt LargeGalleryPreview and NormalGalleryPreview 2023-05-01 11:16:54 +08:00
tarsin 7abeba8b87 Refine GalleryCommentList nullability and immutability 2023-05-01 11:04:19 +08:00
tarsin 7d16ad2119 Refine GalleryDetail nullability and immutability 2023-05-01 10:59:25 +08:00
tarsin 97e5636813 Fixup! Move pageUrl field out of GalleryPreview 2023-05-01 10:40:07 +08:00
tarsin 3d67e886d2 Move pageUrl field out of GalleryPreview 2023-05-01 10:37:45 +08:00
tarsin 919c8c7ee0 Upgrade r8 2023-04-30 21:56:56 +08:00
tarsin a47b2b234b Fixup! Initial compose GalleryInfoBottomSheet implementation 2023-04-30 16:46:43 +08:00
tarsin 2b95ebede8 Code cleanup 2023-04-30 16:41:41 +08:00
tarsin 87a4b6a91b Initial compose GalleryInfoBottomSheet implementation 2023-04-30 15:45:34 +08:00
tarsin bac07abf1f Kill global map 2023-04-30 12:56:14 +08:00
tarsin 3f2184766c Assert LocalPinnableContainer exists 2023-04-30 11:25:34 +08:00
tarsin 53d317cfa4 Pin GalleryDetailScene header 2023-04-30 11:23:18 +08:00
tarsin 8aa4c34794 Implement spinlock, don't use platform one 2023-04-29 19:26:47 +08:00
tarsin 797182fbf8 Fixup! Use spinlock for better performance 2023-04-29 17:18:30 +08:00
renovate[bot] dcbc79fd80 Update dependency org.jsoup:jsoup to v1.16.1 2023-04-29 17:12:52 +08:00
tarsin 711848f027 Use spinlock for better performance 2023-04-29 17:12:23 +08:00
tarsin 8eeacf49cb Cleanup code 2023-04-29 12:31:41 +08:00
tarsin bdf99d01a6 Optimize EhFilter comment regex memory allocation 2023-04-29 12:21:15 +08:00
tarsin 0ed68b55b3 Refactor EhFilter 2023-04-29 11:56:38 +08:00
tarsin 83ad66d27c Fix responseBody builder dsl name 2023-04-28 14:21:05 +08:00
tarsin 15d7bc5037 Upgrade Kotlin 1.8.21 2023-04-28 14:05:35 +08:00
tarsin e83d0b6c55 Reorganize EhEngine 2023-04-28 13:57:18 +08:00
tarsin 004d8a4bff Cleanup EhFilter 2023-04-28 13:25:08 +08:00
tarsin 969c9a66af Cleanup unused func 2023-04-28 10:13:36 +08:00
tarsin 8eec363581 Cleanup EhEngine 2023-04-28 10:10:45 +08:00
tarsin cec0578b77 Cleanup EhEngine 2023-04-28 10:04:43 +08:00
tarsin 2ce2f0ee9b Cleanup EhEngine 2023-04-28 09:51:08 +08:00
tarsin f2641adfd2 Cleanup EhEngine 2023-04-28 09:34:30 +08:00
tarsin af9125792c Fix imageSearch 2023-04-28 09:15:56 +08:00
tarsin a9c37ba8fb Cleanup EhEngine 2023-04-25 16:20:23 +08:00
tarsin 94ebb4573a Cleanup Okhttp API usage 2023-04-25 14:56:28 +08:00
tarsin 5f14919755 Cleanup Okhttp API usage 2023-04-25 14:29:23 +08:00
tarsin ed673b5bc1 Kill EhClient and EhRequest 2023-04-22 16:49:20 +08:00
tarsin 78d8ed922c Cleanup code 2023-04-22 16:15:02 +08:00
tarsin e0797cd519 Kill EhClient usage in GalleryDetailScene 2023-04-22 16:03:53 +08:00
tarsin eb5f39def7 Kill EhCallback 2023-04-22 15:52:32 +08:00
tarsin d200dd9cbe Kill FavouriteScene AddFavoritesListener 2023-04-22 15:43:00 +08:00
tarsin ec4446bb9b Kill GalleryCommentsScene CommentGalleryListener 2023-04-22 15:35:02 +08:00
tarsin c20bc215a8 Kill GalleryCommentsScene RefreshCommentListener 2023-04-22 15:29:25 +08:00
tarsin 13705f9872 Kill ProgressScene GetGalleryTokenListener 2023-04-22 15:20:40 +08:00
tarsin f02cd58a6b Kill GalleryListScene GetGalleryListListener 2023-04-22 15:15:09 +08:00
tarsin f36480d5d6 Kill GalleryPreviewsScene GetPreviewListListener 2023-04-22 15:03:32 +08:00
tarsin 821f9f8037 Fix GalleryDetailScene tag display 2023-04-22 14:50:22 +08:00
tarsin ba8e517e98 Cleanup codeStyle 2023-04-22 13:06:03 +08:00
tarsin abf7676ae7 Kill GalleryCommentsScene voteComment callback 2023-04-22 13:03:17 +08:00
tarsin 45cc6acd9f Kill GalleryDetailScene rateGallery callback 2023-04-22 12:52:41 +08:00
tarsin 32038531e1 Kill GalleryDetailScene downloadArchive callback 2023-04-22 12:31:49 +08:00
tarsin 7d74bdc3bd Kill GalleryDetailScene voteTag callback 2023-04-22 12:18:10 +08:00
tarsin b310e98c5a Cleanup code 2023-04-22 11:25:50 +08:00
tarsin ce0f160f31 Upgrade ktlint and do format 2023-04-22 10:51:24 +08:00
renovate[bot] b8c9040030 Update dependency gradle to v8.1.1 2023-04-22 01:32:00 +08:00
tarsin da21628222 Remove outdated workaround 2023-04-21 14:16:48 +08:00
tarsin 17a99abece Upgrade AGP and r8 2023-04-21 14:11:22 +08:00
tarsin 9d76132a5d Build with JDK 17 LTS
Since JDK 20 is out, there is no more jdk19 on ArchLinux, but kotlin compiler don't recognise JvmTarget 20 yet
2023-04-21 13:44:36 +08:00
tarsin 86a2d34f8e Revert "Update plugin com.android.application to v8.1.0-beta01"
This reverts commit 0a5b9e3178.
2023-04-21 12:51:57 +08:00
renovate[bot] 0a5b9e3178 Update plugin com.android.application to v8.1.0-beta01 2023-04-20 23:35:40 +00:00
tarsin 7665e86812 Fix GalleryDetailScene action layout 2023-04-20 12:29:00 +08:00
tarsin 29e5db87d9 Resolve #1031 2023-04-20 12:20:58 +08:00
renovate[bot] ffaa7c92e3 Update dependency composeOptions to v1.4.6 2023-04-20 01:40:51 +08:00
renovate[bot] b74a57967c Update dependency androidx.activity:activity-compose to v1.7.1 2023-04-20 01:40:38 +08:00
renovate[bot] dd368f4925 Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-android to v1.7.0-RC 2023-04-20 01:11:05 +08:00
renovate[bot] fa6c55636b Update dependency io.ktor:ktor-client-okhttp to v2.3.0 2023-04-20 01:09:12 +08:00
renovate[bot] 9fa98671ac Update plugin com.google.devtools.ksp to v1.8.20-1.0.11 2023-04-18 16:49:45 +00:00
renovate[bot] 60f917a52d Update dependency com.google.android.material:material to v1.9.0-rc01 2023-04-14 02:10:51 +00:00
renovate[bot] 0f848a3f92 Update dependency composeOptions to v1.4.5 2023-04-13 01:40:30 +00:00
renovate[bot] bf03d3f15a Update dependency gradle to v8.1 2023-04-12 23:21:35 +08:00
tarsin b864eba08f Suspendize removeFromFavorites 2023-04-12 14:20:15 +08:00
tarsin a8988ac17b Suspendize addToFavorites 2023-04-12 13:57:33 +08:00
tarsin d72a44b9f2 Optimize CrystalCard, reduce compose allocation 2023-04-11 14:47:11 +08:00
tarsin f9ed777c7f Fix crash 2023-04-11 14:11:00 +08:00
tarsin 2cc6e8a1a6 Do cleanup 2023-04-10 19:01:30 +08:00
tarsin 9efb8cf450 Cleanup unused res 2023-04-10 19:00:47 +08:00
tarsin 2befb766ca Kill LoadImageView 2023-04-10 18:18:26 +08:00
tarsin ded8e77f5d Sync download item with gallery list item layout 2023-04-10 18:05:15 +08:00
tarsin 7ec9d9e1cf Drop FixedThumb 2023-04-10 17:56:47 +08:00
tarsin be1d80de0f Convert GalleryPreviewsAdapter holder to compose 2023-04-10 17:11:55 +08:00
tarsin 7dc28f36dc Fix to save preview data onSaveInstanceState 2023-04-08 16:20:23 +08:00
tarsin 98de1d89da Remove explicitly dependency accompanist drawable painter 2023-04-06 15:33:22 +08:00
tarsin 8a542aebe2 Optimize compose async thumb clip 2023-04-06 15:28:09 +08:00
tarsin e7c077c31e Fixup! Cleanup permission request 2023-04-06 14:25:23 +08:00
tarsin 3c0da086f5 Cleanup permission request 2023-04-06 14:20:02 +08:00
renovate[bot] 06dc33b126 Update dependency androidx.core:core-ktx to v1.10.0 2023-04-06 00:50:50 +00:00
FooIbar 817ed1ce8f Fix gallery preview not being restored 2023-04-05 10:05:16 +08:00
FooIbar ec027d3d98 Restore old strategy of grid column count 2023-04-05 10:05:16 +08:00
tarsin 29214b58c0 Temp workaround for thumb column calculate 2023-04-04 21:38:30 +08:00
renovate[bot] bbc8f6b15e Update dependency com.google.accompanist:accompanist-drawablepainter to v0.30.1 2023-04-04 13:54:32 +08:00
renovate[bot] 4f597584fb Update dependency com.google.accompanist:accompanist-themeadapter-material3 to v0.30.1 2023-04-04 13:53:47 +08:00
tarsin 2d40cf801d Kotlin 1.8.20 2023-04-04 12:43:22 +08:00
FooIbar 3bb4772aea Use the same strategy as gallery detail preview 2023-04-04 12:11:34 +08:00
FooIbar 5b44df4476 Tweak gallery detail layout 2023-04-04 12:11:34 +08:00
tarsin 3762b69fed Introduce NamedMutex
Maybe we should have a better impl?
2023-04-03 22:55:24 +08:00
tarsin 18c205dde2 Don't let network IO delay EhTagDatabase initialization 2023-04-03 22:12:42 +08:00
tarsin caa4e07f8c Tweak GalleryDetailHeaderCard uploader chip icon usage 2023-04-03 21:58:41 +08:00
FooIbar a3ae2d98a5 Fixed by upstream, remove workaround 2023-04-03 20:42:29 +08:00
tarsin 0fd4cdd498 Fix GalleryDetailScene error tip width, Resolve #1009 2023-04-03 00:25:55 +08:00
FooIbar 0e271bbbc2 Convert MyTagsFragment to kotlin 2023-04-03 00:06:40 +08:00
FooIbar ff18198cd1 Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar 9354ca7c68 Convert AboutFragment to kotlin 2023-04-03 00:06:40 +08:00
FooIbar e8ed55bb41 Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar 6a9648e7f5 Convert SettingsFragment to kotlin 2023-04-03 00:06:40 +08:00
FooIbar b41097790d Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar e91a3d74b3 Convert ParserUtils to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 4d5ffe1618 Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar 3b04624b88 Convert VoteTagParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 21b3b66bcd Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar 69826ccb1f Convert VoteCommentParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 66f9bfd871 Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar fdc1868cd4 Convert TorrentParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 917cb107ec Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar d3b3467989 Convert SignInParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 3f09122e6d Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar bfd0361fd5 Convert RateGalleryParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 1c52e246f0 Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar 09a403cb53 Convert GalleryPageUrlParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar e9699abc81 Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar b186c47e07 Convert UrlOpener to kotlin 2023-04-03 00:06:40 +08:00
FooIbar f26f11f89b Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar f8bbc2d931 Convert UrlPreference to kotlin 2023-04-03 00:06:40 +08:00
FooIbar cbe0d5c3dd Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar c6a802a286 Convert GalleryPageParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 27fce7267f Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar 5b0c302530 Convert GalleryPageApiParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 47c29d9eb5 Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar 228dad8b85 Convert GalleryListUrlParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 70ad933435 Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar b061219bac Convert GalleryDetailUrlParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar da25290fad Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar 9f55aa657b Convert GalleryApiParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 2740dd094b Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar 0089f232c4 Convert GetText to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 64ffe1ee14 Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar b3d1cc81cd Convert ExceptionUtils to kotlin 2023-04-03 00:06:40 +08:00
FooIbar f8691e3868 Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar 1ab14afeaa Convert EhProxySelector to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 27a6b1a5c4 Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar 78c8034b4b Convert ProfileParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 3a9c6f65de Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar f5bedf6239 Convert GalleryTokenApiParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 6e3dcc5192 Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar 5f6c3f1078 Convert GalleryNotAvailableParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar 5f67e5ab03 Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar e7a9837da1 Convert GalleryMultiPageViewerPTokenParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar c80c892faf Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar 94dce083f1 Convert ForumsParser to kotlin 2023-04-03 00:06:40 +08:00
FooIbar bad39c697f Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar c2a9ea96e9 Convert AppHelper to kotlin 2023-04-03 00:06:40 +08:00
FooIbar aff110df5d Rename .java to .kt 2023-04-03 00:06:40 +08:00
FooIbar 428bed2cde Fix garbled version code in crash logs 2023-04-02 15:16:26 +08:00
FooIbar f06da4c033 Fix DownloadService nullability 2023-04-02 15:16:26 +08:00
小白-白 fd79d5d034 Don't update existing dir 2023-04-01 11:18:32 +08:00
FooIbar c4c4fdc647 Fix Arrow dependency 2023-04-01 11:18:09 +08:00
小白-白 661bf3ecc2 Ktlint: do code format 2023-03-31 22:37:36 +08:00
小白-白 04c99a5a36 Add ktlint, resolve #999 2023-03-31 22:37:36 +08:00
renovate[bot] ded4e015bd Update plugin com.android.application to v8.1.0-alpha11 2023-03-30 22:49:47 +00:00
tarsin 97becdb7e3 Fix to use NonCancellable coroutine ctx
Now that it's suspend
2023-03-29 18:29:40 +08:00
tarsin 929766b177 Fix to use suspend mutex 2023-03-29 18:23:55 +08:00
tarsin 2db6f7a9ae Modify .nomedia status in background thread 2023-03-29 13:18:55 +08:00
tarsin b6d8a340e5 Cleanup lrucache create 2023-03-28 16:20:00 +08:00
tarsin 175f75c3a2 Obey new m3 drawer design token 2023-03-27 16:19:22 +08:00
tarsin 0eda9b109f Do limit navigation drawer maxWidth
Why the default value gone after MDC 1.9.0-alpha01 ???
2023-03-27 15:58:01 +08:00
tarsin f07be06dfe Opt-in ExperimentalMaterial3WindowSizeClassApi 2023-03-26 19:39:29 +08:00
tarsin 32a770b9b5 Convert to use window size class 2023-03-26 18:34:59 +08:00
tarsin 2f2b440196 Import material3 window size class 2023-03-26 18:09:23 +08:00
tarsin 379422f457 Reformat code 2023-03-26 18:07:21 +08:00
hathlife 3519756da3 Initial support of adaptive landscape layout with
jetpack compose.
2023-03-26 17:39:38 +08:00
renovate[bot] 8746f04030 Update dependency io.coil-kt:coil-compose to v2.3.0 2023-03-26 11:30:54 +08:00
tarsin c7d9697b92 Adjust comment and preview spacer 2023-03-25 17:35:16 +08:00
tarsin 66053895ad Fixup card flavour usage 2023-03-25 17:27:53 +08:00
tarsin d7c21e06ad Fix tag search 2023-03-25 11:46:53 +08:00
renovate[bot] 799589874e Update dependency androidx.collection:collection-ktx to v1.3.0-alpha04 2023-03-25 02:09:44 +00:00
小白-白 97733ca337 Fix save img 2023-03-24 08:21:08 +08:00
tarsin 1a0474420b Fix old data offset 2023-03-23 16:40:47 +08:00
tarsin f1c1f2dbe8 Let room generate kotlin 2023-03-23 16:14:26 +08:00
tarsin bfb5752622 Tweak dependencies 2023-03-23 15:40:52 +08:00
renovate[bot] b3e9f594dc Update dependency dev.chrisbanes.compose:compose-bom to v2023.03.00 2023-03-23 15:08:40 +08:00
tarsin f81ca0688e Workaround for drawerLayout handle OnBackPressedInvoked only above API 33 2023-03-23 13:03:49 +08:00
tarsin 095a9149b4 Let DrawerLayout handle OnBackPressedInvoked internally 2023-03-23 12:38:57 +08:00
renovate[bot] 322a86c105 Update dependency com.google.accompanist:accompanist-drawablepainter to v0.30.0 2023-03-23 10:16:33 +08:00
renovate[bot] 015fb299ba Update room_version to v2.5.1 2023-03-23 10:14:58 +08:00
renovate[bot] 9e7f407d35 Update dependency androidx.activity:activity-compose to v1.7.0 2023-03-23 10:14:46 +08:00
renovate[bot] 96b891fbd0 Update dependency com.google.accompanist:accompanist-themeadapter-material3 to v0.30.0 2023-03-23 10:14:20 +08:00
renovate[bot] 0cdb35dcfe Update dependency androidx.work:work-runtime-ktx to v2.8.1 2023-03-23 10:12:30 +08:00
renovate[bot] 56be5c84cb Update dependency composeOptions to v1.4.4 2023-03-23 10:12:18 +08:00
renovate[bot] 2cb8fc25f5 Update dependency androidx.constraintlayout:constraintlayout to v2.2.0-alpha09 2023-03-23 10:10:38 +08:00
renovate[bot] 941c5efd07 Update dependency androidx.constraintlayout:constraintlayout-compose to v1.1.0-alpha09 2023-03-23 10:06:22 +08:00
renovate[bot] bbdb335e92 Update dependency androidx.lifecycle:lifecycle-process to v2.6.1 2023-03-23 10:06:10 +08:00
renovate[bot] cd0c5c8e2a Update dependency androidx.collection:collection-ktx to v1.3.0-alpha03 2023-03-22 23:23:27 +00:00
tarsin 8924d36925 Tidy native function namespace 2023-03-22 17:48:10 +08:00
tarsin 8a39bf6ac8 Cleanup and prepare to directly rename image blob from cache to download 2023-03-22 16:51:01 +08:00
tarsin a6b4f05f7f Fix copy to download dir in mixed mode 2023-03-22 12:27:01 +08:00
tarsin 34c39464ae Adjust icon usage 2023-03-22 11:02:37 +08:00
tarsin 3dd45c1628 Fix crash
java.lang.IllegalStateException: Fragment GalleryDetailScene{b6e25c2} (70626de1-16ff-47db-b4eb-e3358b5f53fc) not attached to a context.
        at androidx.fragment.app.Fragment.requireContext(Unknown Source:17)
        at androidx.fragment.app.Fragment.getResources(Unknown Source:0)
        at androidx.fragment.app.Fragment.getString(Unknown Source:0)
        at com.hippo.ehviewer.ui.scene.GalleryDetailScene.updateDownloadText(Unknown Source:93)
        at com.hippo.ehviewer.ui.scene.GalleryDetailScene.bindViewSecond(Unknown Source:68)
        at com.hippo.ehviewer.ui.scene.GalleryDetailScene$request$1.com.hippo.ehviewer.ui.scene.GalleryDetailScene.access$bindViewSecond(Unknown Source:131)
                                                             invokeSuspend
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
        at kotlinx.coroutines.DispatchedTask.run(Unknown Source:113)
        at kotlinx.coroutines.internal.LimitedDispatcher.run(Unknown Source:12)
        at kotlinx.coroutines.scheduling.TaskImpl.run(Unknown Source:2)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(Unknown Source:93)
                                                            kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask
                                                            kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker
                                                            run
        Suppressed: qs: [Is0{Cancelling}@bfcdc0e, Dispatchers.IO]
2023-03-22 11:01:08 +08:00
renovate[bot] b962c168c4 Update plugin com.android.application to v8.1.0-alpha10 2023-03-21 22:17:38 +00:00
tarsin c12bd32682 Allow decode avif 2023-03-19 00:32:10 +08:00
tarsin ef20f1578d Fixup! Allow larger read cache 2023-03-18 21:32:07 +08:00
tarsin 47c9e07857 Allow larger read cache 2023-03-18 21:30:47 +08:00
tarsin 6d8208d7f4 Allow preload thumbs aggressively 2023-03-18 21:09:20 +08:00
tarsin 946e76c3cc Make galleryDetail preview footer still a textbutton, but no nestScroll 2023-03-17 21:52:50 +08:00
5idereal 08bd8176b9 update zh-tw translation 2023-03-17 21:37:09 +08:00
tarsin 2ea06425f4 Add trailingIcon to block uploader 2023-03-17 21:34:04 +08:00
tarsin 95ca7b23d3 Restore click tip to refresh 2023-03-17 21:28:13 +08:00
tarsin ca6eb03f1e Fix edge to edge 2023-03-17 21:21:07 +08:00
tarsin 8831a41bff Fix no tag hint arrangement 2023-03-17 21:16:30 +08:00
tarsin 6418beb186 Fix GalleryDetailScene comment 2023-03-17 21:13:24 +08:00
tarsin ebbc5cdc2c Restore galleryDetail Comment
Any better way to implement this?
2023-03-17 21:01:44 +08:00
tarsin abceb71dcb Cleanup legacy code 2023-03-17 20:39:06 +08:00
tarsin 7ab898ee85 Cleanup GalleryDetailScene 2023-03-17 20:37:55 +08:00
tarsin 904840c4cb Fix card style 2023-03-17 20:12:32 +08:00
tarsin ecd39f5435 Fix clip preview crop 2023-03-17 20:01:42 +08:00
tarsin 7742b2c570 Stub impl of preview image clip
this way sucks, later we will clip it with compose method
2023-03-17 19:07:34 +08:00
tarsin 89b20b3cda Apply proper crop 2023-03-17 18:31:53 +08:00
tarsin 4b0f62e058 Use normal lazyGrid 2023-03-17 18:19:10 +08:00
tarsin f7281a7481 Restore preview items 2023-03-17 18:11:30 +08:00
tarsin ae38fecae7 Restore preview hint 2023-03-17 17:42:34 +08:00
tarsin f5577d45c5 Restore preview padding 2023-03-17 17:32:11 +08:00
tarsin 0b45c41a99 Convert to LazyVerticalStaggeredGrid, preparing add previews 2023-03-17 17:28:22 +08:00
tarsin 9b74e7fdec Optimize recompose 2023-03-17 17:05:08 +08:00
tarsin b522360357 Restore GalleryDetailScene popmenu 2023-03-17 16:53:02 +08:00
tarsin 109cb776a0 limit max title lines 2023-03-17 16:42:33 +08:00
tarsin 9fdc55814d Restore navback icon 2023-03-17 16:41:04 +08:00
tarsin 2079a90f02 Fix scroll behaviour 2023-03-17 16:36:53 +08:00
tarsin 7fdf90e87d First stub migrate whole GalleryDetailScene to compose 2023-03-17 16:17:13 +08:00
tarsin f7bc2e2cf7 Use partial function 2023-03-17 13:21:45 +08:00
tarsin 9d442b9b18 Fix non-local return in Composable cause internal error
They should have a check in compose compiler...
2023-03-17 12:38:26 +08:00
tarsin 3c777905f5 Cleanup res 2023-03-17 00:19:27 +08:00
tarsin c91bbc94fd Apply alpha to weak tag 2023-03-16 23:47:38 +08:00
tarsin e51142ae32 Fix flowrow multiple row padding 2023-03-16 23:36:17 +08:00
tarsin 1fd7d7f602 Fix tag focused ripple leak 2023-03-16 23:33:01 +08:00
tarsin 6ceb50c0bd Convert galleryDetail tags to compose 2023-03-16 23:19:54 +08:00
tarsin b63b189fda Strip unused res 2023-03-16 20:04:56 +08:00
tarsin b8ff8cb535 Make galleryDetail rating clickable 2023-03-16 19:56:12 +08:00
tarsin 2e9124c52d Restore galleryDetail rating 2023-03-16 19:49:10 +08:00
tarsin 261ccdda51 Refactor RatingWidget to use imageVec 2023-03-16 19:38:15 +08:00
tarsin 974108088a Restore some exist function 2023-03-16 19:23:53 +08:00
tarsin ebc9d2d1b1 Fix padding 2023-03-16 19:19:01 +08:00
tarsin 3733d827af Fix newer version card 2023-03-16 19:16:52 +08:00
tarsin 1333aa10f8 Rewrite gallery detail actions with compose 2023-03-16 19:05:48 +08:00
tarsin 8621de6d09 Cleanup JvmStatic usage 2023-03-16 16:56:24 +08:00
tarsin b48775d222 Fix legacy spiderInfo read 2023-03-16 12:47:44 +08:00
fanhl 3b918c38fd Add padding for quick_search item. 2023-03-15 10:37:17 +08:00
renovate[bot] e21e7d863d Update plugin com.android.application to v8.1.0-alpha09 2023-03-14 22:03:58 +00:00
tarsin 3b4329fcc2 Fix ridiculous bug 2023-03-13 20:26:07 +08:00
tarsin 08bc5ef72f Sync with 1.8.7.2 versionCode 2023-03-13 19:40:48 +08:00
tarsin f378ee441a Refactor out GalleryDetailHeaderCard 2023-03-13 19:38:07 +08:00
tarsin bbf0fda484 Revert a padding 2023-03-13 19:16:36 +08:00
tarsin 8cb4d8149b Refactor out 2023-03-13 19:15:01 +08:00
tarsin eceadf9f10 Fix layout 2023-03-13 19:07:27 +08:00
tarsin ae63e09a92 Fixup Import coordinatorlayout-compose 2023-03-13 18:46:35 +08:00
tarsin b778578353 Import coordinatorlayout-compose 2023-03-13 18:32:54 +08:00
tarsin a2ec9c4a41 Fake Impl of infoCard, need refine 2023-03-13 18:31:32 +08:00
tarsin 30fc4a91d6 Fix Header Chip Text 2023-03-13 18:00:03 +08:00
tarsin 1d6307d142 Refine filter chip Icon 2023-03-13 17:39:47 +08:00
tarsin 93524c0e4a First migration Header Card to Compose 2023-03-13 17:26:05 +08:00
tarsin 30e2d310f3 Prepare to rewrite GalleryDetailScene with compose 2023-03-13 16:32:16 +08:00
tarsin d1c87a65b2 Fix db export 2023-03-13 16:09:38 +08:00
renovate[bot] 961615f1c4 Update dependency dev.chrisbanes.compose:compose-bom to v2023.02.00-SNAPSHOT 2023-03-12 18:25:37 +08:00
tarsin 9a92132981 Import ArrowKt 2.0 2023-03-12 16:02:05 +08:00
tarsin d78120c80d Upgrade to chrisbanes compose bom 2023-03-12 15:47:39 +08:00
tarsin c560b7cd1f Enlarge recyclerview height 2023-03-12 15:17:02 +08:00
tarsin f0a8e1c0bc Rename FooterAdapter to HintAdapter 2023-03-12 15:09:12 +08:00
tarsin 9e77f104f6 Convert footer holder to compose 2023-03-12 15:05:17 +08:00
tarsin 029d6bf7f6 Normalize footer ripple 2023-03-12 14:32:21 +08:00
tarsin 3cb0e3ecd4 Revert Horizontal padding 2023-03-12 14:18:42 +08:00
tarsin 8708897751 Fix and simplify layout 2023-03-12 14:03:10 +08:00
renovate[bot] d920e8705f Update dependency dev.rikka.rikkax.layoutinflater:layoutinflater to v1.3.0 2023-03-11 16:09:27 +00:00
tarsin f5e9bf2459 Revert "Workaround for massive thumb requests delay post request for (adding favourite, get torrent list etc.)"
This reverts commit 0a9d7c5560.
2023-03-10 23:11:02 +08:00
FooIbar 6a88aaf782 Use ConcatAdapter for previews in GalleryDetailScene 2023-03-10 20:08:52 +08:00
FooIbar 9d9c09743c Convert GalleryListParser and FavoritesParser to kotlin 2023-03-10 20:08:52 +08:00
FooIbar e076f34993 Rename .java to .kt 2023-03-10 20:08:52 +08:00
FooIbar 923ec7ce5e Convert previews in GalleryDetailScene to RecyclerView 2023-03-10 11:00:24 +08:00
FooIbar 15ae3cecb1 Convert AutoGridLayoutManager to kotlin 2023-03-10 11:00:24 +08:00
FooIbar 3f8e26644a Rename .java to .kt 2023-03-10 11:00:24 +08:00
FooIbar a6a2a6ebba Introduce BaseListAdapter and BaseViewHolder 2023-03-10 11:00:24 +08:00
FooIbar 4175816577 Cleanup ContentLayout 2023-03-10 11:00:24 +08:00
FooIbar 36679ffbc7 Fix gallery previews 2023-03-10 01:58:38 +08:00
FooIbar b2c4cd721c Use async version of call.execute() 2023-03-10 01:58:38 +08:00
tarsin da9aeb54f0 Upgrade kotlinx coroutines 2023-03-09 22:58:55 +08:00
tarsin 0a9d7c5560 Workaround for massive thumb requests delay post request for (adding favourite, get torrent list etc.)
Currently okhttp does not support request priority(See https://github.com/square/okhttp/issues/404), and our GalleryDetailScene will launch at most 200 image requests once, which stuffed okhttp async request queue.
We need another http client to ensure these plain-text request executed in time
2023-03-09 22:30:22 +08:00
tarsin 14843ddda7 Reland enableNewResourceShrinker.preciseShrinking 2023-03-09 21:47:09 +08:00
tarsin dada671f97 Cleanup GalleryCard 2023-03-09 19:04:25 +08:00
tarsin 1a7214c75b Fix rating calculate 2023-03-09 18:07:30 +08:00
tarsin 23eede12fc Cleanup HistoryScene 2023-03-09 17:46:45 +08:00
tarsin 58910be98e Fix HistoryScene lag when pop backstack from detailScene
Why supportsPredictiveItemAnimations = true cause lag?
2023-03-09 17:39:38 +08:00
tarsin f27319e8cb Use autogenerated localeConfig 2023-03-09 13:11:37 +08:00
tarsin 737c190107 Upgrade AGP, let's enjoy new AS UI 2023-03-09 12:42:33 +08:00
tarsin 6c2989a4d3 Fix add favourites 2023-03-09 11:32:37 +08:00
tarsin a5c05bd2f3 Continue to cleanup EhEngine 2023-03-09 11:25:14 +08:00
tarsin a136c5349e Make some constants top-level 2023-03-09 11:09:05 +08:00
tarsin 8b8d845068 Continue to cleanup EhEngine 2023-03-09 11:00:38 +08:00
FooIbar 7c41b5d4ed Drop HashCodeUtils
And don't reread the same file
2023-03-09 09:17:04 +08:00
FooIbar 39336a447b Copy star cookie to ex as well 2023-03-09 09:17:04 +08:00
FooIbar f58c33354e Refactor EhEngine.getUConfig() 2023-03-09 09:17:04 +08:00
renovate[bot] 9a9b5037ec Update dependency androidx.lifecycle:lifecycle-process to v2.6.0 2023-03-09 09:16:51 +08:00
renovate[bot] effe9c281a Update dependency androidx.core:core-ktx to v1.10.0-rc01 2023-03-09 09:16:32 +08:00
renovate[bot] c590ff875b Update dependency androidx.recyclerview:recyclerview to v1.3.0 2023-03-09 09:16:19 +08:00
renovate[bot] 3771c325a2 Update dependency androidx.constraintlayout:constraintlayout to v2.2.0-alpha08 2023-03-08 23:24:22 +00:00
tarsin 7746e95cad Cleanup EhEngine 2023-03-08 22:12:08 +08:00
tarsin 767c10f886 Fix code style 2023-03-08 22:02:01 +08:00
tarsin d97a15df57 Fix mainthread db query 2023-03-08 21:35:37 +08:00
tarsin 55cd89a0e5 Fix body consumed twice 2023-03-08 21:31:57 +08:00
FooIbar 8ef7ac5a87 Disable SupportsPredictiveItemAnimations in DownloadsScene 2023-03-08 21:19:59 +08:00
FooIbar 5b6a06b33b Convert AutoStaggeredGridLayoutManager to kotlin 2023-03-08 21:19:59 +08:00
FooIbar cd4971962a Rename .java to .kt 2023-03-08 21:19:59 +08:00
tarsin f18e2e1e55 Refactor EhEngine 2023-03-08 21:06:15 +08:00
tarsin 0d8925c787 Cleanup code 2023-03-08 20:14:25 +08:00
tarsin c773cd1842 Revert "Cleanup code"
This reverts commit bf9d2c82ac.
2023-03-08 20:13:13 +08:00
tarsin bf9d2c82ac Cleanup code 2023-03-08 20:12:32 +08:00
tarsin 7958785588 Cleanup some warnings 2023-03-08 20:05:24 +08:00
tarsin 56ea23c4bf Fix previewscene toolbar liftonscroll 2023-03-08 20:04:27 +08:00
FooIbar c382f773a7 Convert ContentHelper to view binding 2023-03-08 19:41:40 +08:00
FooIbar 46995511f1 Convert ContentLayout to kotlin 2023-03-08 19:41:40 +08:00
FooIbar 7d60037998 Rename .java to .kt 2023-03-08 19:41:40 +08:00
tarsin cdf53c812a Resolve #934 2023-03-08 10:53:42 +08:00
tarsin b628755464 Fix similarity search 2023-03-08 10:45:21 +08:00
tarsin 69da2f14c7 Revert to ktor okhttp engine 2023-03-08 10:38:16 +08:00
tarsin 3ea0b0847a Cleanup code
filechannel is close when ios closed
2023-03-07 23:20:02 +08:00
tarsin 47da1bcdb4 Update README.md 2023-03-07 22:13:46 +08:00
FooIbar 691dc18f3b Refactor GalleryPreviewsScene 2023-03-07 22:11:30 +08:00
FooIbar 5ddd948ace Initialize previews with existing data 2023-03-07 22:11:30 +08:00
FooIbar b815c924ff Drop PreviewSet 2023-03-07 22:11:30 +08:00
tarsin f46d72a9eb Fix df 2023-03-07 22:05:56 +08:00
tarsin 9b58d1161b Let's try Apache5 http engine 2023-03-07 21:34:11 +08:00
tarsin 3208a34b75 Update README.md 2023-03-07 16:57:40 +08:00
tarsin e50bb39770 Update README.md 2023-03-07 16:53:02 +08:00
tarsin bcf9c7df30 Update README.md 2023-03-07 16:46:04 +08:00
tarsin e8f97beb84 Update README.md 2023-03-07 16:45:37 +08:00
tarsin d73ff60c36 Prepare for 1.8.8.x development 2023-03-07 13:36:49 +08:00
tarsin 6414f14420 fixup! Resolve #931 2023-03-07 13:19:02 +08:00
tarsin 5787753279 Resolve #931 2023-03-07 13:17:24 +08:00
tarsin 4a838597f8 Fix restore download 2023-03-07 12:55:28 +08:00
tarsin c3c5e2b5b0 Change image cache dir
Since we haven't release, we can do that
2023-03-07 11:51:04 +08:00
tarsin 6a184462c6 Bring back httpcache, but for non-Image only 2023-03-07 11:49:02 +08:00
tarsin 10def6e48a Cleanup dependencies 2023-03-07 10:58:56 +08:00
tarsin 29c97b9d79 Move some temporary code to separated package 2023-03-07 10:53:25 +08:00
tarsin d5e1f8814f Fix name 2023-03-07 10:46:43 +08:00
tarsin 972cb55801 Minor cleanup 2023-03-07 10:45:38 +08:00
tarsin a65a1a05f0 Minor cleanup 2023-03-07 10:32:36 +08:00
tarsin 659afd9245 Respect NinePatchDrawable 2023-03-07 10:28:52 +08:00
tarsin 73b9b353e6 Cleanup UniFile api 2023-03-07 10:23:20 +08:00
tarsin 34337d18fa Revert to use ktor as okhttp delegate
Ktor CIO is still not a jvm-heapless http client, actually it does the same thing okhttp does, decrypt TLS packet to JVM heap, and copy it to direct buffer, then write it to fd... , just the same thing we do use transferFrom with Okio Buffer.. let's implement a native zero-copy ktor client now!
2023-03-07 10:16:04 +08:00
tarsin f57917e2b6 Minor cleanup 2023-03-07 10:09:20 +08:00
tarsin a39bc1182a Fix normal preview set load 2023-03-07 10:04:27 +08:00
FooIbar 795e42f609 Clean obsolete cache on start 2023-03-07 09:18:09 +08:00
FooIbar b39b0a5ca6 Use relative URL as thumb cache key
Also increase default cache size to 640MB
2023-03-07 09:18:09 +08:00
FooIbar dcea49c682 Convert UnikeryDrawable to kotlin 2023-03-07 09:18:09 +08:00
FooIbar c1e7d043f9 Rename .java to .kt 2023-03-07 09:18:09 +08:00
FooIbar f354b86d1d Implement partial bind in DownloadAdapter 2023-03-06 23:27:23 +08:00
FooIbar 9d4977e2b3 Convert DownloadsScene to view binding 2023-03-06 23:27:23 +08:00
FooIbar 595147bacc Convert drawer list item to view binding 2023-03-06 23:27:23 +08:00
FooIbar 39681dcb8a Convert download item to view binding 2023-03-06 23:27:23 +08:00
FooIbar 31be6a2cca Update translation 2023-03-06 18:30:28 +08:00
tarsin 0286557701 Rewrite BBCode kot style and fix wildcard import 2023-03-06 18:30:09 +08:00
FooIbar 805e3c920c Update issue templates 2023-03-05 18:19:34 +08:00
FooIbar 26f05a0800 Fix settings profile cookie 2023-03-05 10:41:30 +08:00
FooIbar b944d073de Avoid querying database on main thread
No need to use NonCancellable since it's not cancellable anyway
2023-03-05 10:41:30 +08:00
FooIbar 56fdb2d4a8 Convert UConfigFragment to kotlin 2023-03-05 10:41:30 +08:00
FooIbar c83bd885f6 Rename .java to .kt 2023-03-05 10:41:30 +08:00
FooIbar d4ec177c28 Apply list mode setting in onResume 2023-03-05 01:33:16 +08:00
FooIbar e9839335c6 Convert GalleryHolder to view binding 2023-03-05 01:33:16 +08:00
tarsin 562a6d6ab8 Merge image cache 2023-03-05 01:32:51 +08:00
renovate[bot] 4cfeb88bb3 Update dependency gradle to v8.0.2 2023-03-04 15:48:36 +08:00
renovate[bot] 54858261f8 Update plugin com.android.application to v8.0.0-beta04 2023-03-03 01:09:45 +00:00
tarsin 8e4d3df400 Provide cookies database autoMigration 2023-03-02 21:52:32 +08:00
tarsin dc47f68ff3 Proper way to emit outdated cookies 2023-03-02 21:24:48 +08:00
tarsin c1852f4728 Fix login via Webview 2023-03-02 21:23:08 +08:00
tarsin 0e9c7761f5 Minor cleanup 2023-03-02 16:06:18 +08:00
tarsin b4acb06665 Refactor to support general cookies 2023-03-02 15:53:59 +08:00
tarsin 98107e40bc Refactor cookies database 2023-03-02 15:34:42 +08:00
tarsin d1d1da7875 Refactor cookies database with Room
No db migration available since re-login is not difficult
2023-03-02 15:08:23 +08:00
FooIbar a800094b21 Use cd . instead of true for Windows compatibility 2023-03-02 03:53:43 +08:00
FooIbar 89736d1d45 Minor refactor 2023-03-02 03:51:42 +08:00
FooIbar 06650c14ad Do not respond to click if gallery detail is not ready 2023-03-02 03:51:42 +08:00
tarsin 1c1066eff2 Resolve #901 2023-03-01 18:18:13 +08:00
tarsin 5bb63cf3e5 Resolve #903 2023-03-01 18:04:00 +08:00
FooIbar 2ba39a9b80 Do not build other ABIs in debug 2023-03-01 09:57:55 +08:00
renovate[bot] 7fef84a006 Update dependency io.ktor:ktor-client-cio to v2.2.4 2023-02-28 21:35:52 +08:00
tarsin f6458cd8ee Cleanup some IO overhead 2023-02-28 17:58:45 +08:00
tarsin 5c18dad1d8 Bring back ktor CIO for image downloading 2023-02-28 17:52:16 +08:00
tarsin 3f4efc51c9 Don't create an arraylist per request 2023-02-27 23:59:02 +08:00
tarsin 841ac0cb74 fixup! Implement image request merging in standalone Interceptor 2023-02-27 23:01:41 +08:00
tarsin e2be9580c6 Use IO Dispatcher to collect history data 2023-02-27 22:16:56 +08:00
tarsin 154cf18b34 Move HistoryScene ViewHolder to Compose 2023-02-27 21:53:02 +08:00
FooIbar 0a93763c48 Check dawn on start in case the periodic work failed 2023-02-27 20:53:19 +08:00
FooIbar c4c654079d Convert Settings to kotlin 2023-02-27 20:53:19 +08:00
FooIbar 92f8e67a60 Rename .java to .kt 2023-02-27 20:53:19 +08:00
FooIbar 1814f06311 Convert DownloadFragment to kotlin 2023-02-27 20:53:19 +08:00
FooIbar 2dbc704448 Rename .java to .kt 2023-02-27 20:53:19 +08:00
FooIbar e2478b4eb8 Drop EhConfig
No longer valid due to eh changes
2023-02-27 20:53:19 +08:00
tarsin b7b3e8d4cb Cleanup crash utils 2023-02-27 20:43:52 +08:00
tarsin 0a089351e9 Cleanup some StreamIO usecase 2023-02-27 19:01:26 +08:00
tarsin 386a991ad7 Remove unused code 2023-02-27 18:49:32 +08:00
tarsin e028834ac3 Convert a usecase to sendTo 2023-02-27 18:42:20 +08:00
tarsin 695a4966b5 Clarify that Java Stream IO sucks 2023-02-27 18:18:29 +08:00
tarsin 3973f5ef70 Make UniFile actually backed by ParcelFileDescriptor, implement IO stream as extensions, Resolve #896 2023-02-27 18:13:00 +08:00
tarsin 24ccf60870 Move getImageSource to UniFile interface, and remove UniRandomAccessFile, it's a suck design 2023-02-27 17:24:04 +08:00
tarsin c4a3f06b51 Cleanup unnecessary jni call 2023-02-27 17:05:54 +08:00
tarsin 5dff1f7678 Use platform delegate systemcall sendfile 2023-02-27 16:30:46 +08:00
tarsin d3d07f9e4e Release 1.8.7.0
Releases / Build (push) Has been cancelled
2023-02-27 15:53:49 +08:00
tarsin e5500b978c Apply alpha only to tag text, Resolve #894 2023-02-27 12:06:57 +08:00
FooIbar 2fea94ce9b fixup! Implement image request merging in standalone Interceptor 2023-02-27 02:32:33 +08:00
tarsin 90b6106fb4 Convert libarchive build to FetchContent 2023-02-26 17:31:59 +08:00
tarsin 6e15d1e480 Convert lzma build to FetchContent 2023-02-26 15:11:45 +08:00
tarsin d35588b993 Don't add custom optimization in debug build, and remove some flags already passed 2023-02-26 14:04:20 +08:00
tarsin 957ecf0fe1 Fix rating calculate 2023-02-25 23:47:10 +08:00
tarsin 83dc47c3b5 Fix SimpleRatingWidget state changed recompose and properly set theme 2023-02-25 23:40:01 +08:00
tarsin fa4d35487c Optimize SimpleRatingWidget 2023-02-25 23:19:09 +08:00
tarsin 624a20c9bf Move RatingView to Compose impl 2023-02-25 23:14:57 +08:00
tarsin 58cd5c2896 Rename .java to .kt 2023-02-25 23:14:57 +08:00
renovate[bot] bb8a802d65 Update dependency org.jetbrains.kotlinx:kotlinx-serialization-cbor to v1.5.0 2023-02-25 02:44:44 +08:00
FooIbar f757e98da0 Implement onNewIntent() in ReaderActivity 2023-02-25 02:36:37 +08:00
FooIbar 49661c0bf0 Implement tachiyomi.util.system.logcat 2023-02-25 02:36:37 +08:00
1030 changed files with 51788 additions and 65004 deletions

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
[*.{kt,kts}]
ij_kotlin_imports_layout = *
ij_kotlin_line_break_after_multiline_when_entry = false
ktlint_code_style = intellij_idea
ktlint_function_naming_ignore_when_annotated_with = Composable
ktlint_standard_class-signature = disabled
ktlint_standard_mixed-condition-operators = disabled
@@ -6,10 +6,10 @@ body:
- type: markdown
attributes:
value: |
感谢您愿意为 Ehviewer-Overhauled 做出贡献!
感谢您愿意为 EhViewer 做出贡献!
提交问题报告前,还请首先完成文末的自查步骤
Thanks for your contribution on Ehviewer-Overhauled Project!
Thanks for your contribution on EhViewer Project!
Please finish verify steps which list in the end first before create bug report
- type: textarea
@@ -18,7 +18,9 @@ body:
label: 复现步骤 / Step to reproduce
description: |
请从全新安装应用开始,在此处写下复现的方式。请尽量附带录屏
如果不能稳定复现,请在下方上传应用日志
Describe how to reproduce here with fresh installation, with screen recording if possible.
If you can't reproduce it consistently, please upload app logs below
placeholder: |
0. 重新安装应用 / Fresh install
1.
@@ -55,6 +57,15 @@ body:
validations:
required: true
- type: textarea
id: log
attributes:
label: 应用日志 / App logs
description: 您可以通过设置-高级-导出日志来获得日志文件 / You can get logs file in Settings - Advanced - Dump logcat
placeholder: 06-15 17:44:53.704 23382 23382 E ...
validations:
required: true
- type: textarea
id: more
attributes:
@@ -68,6 +79,15 @@ body:
validations:
required: false
- type: input
id: site
attributes:
label: 浏览站点 / Browsing site
description: E-Hentai / ExHentai
placeholder: E-Hentai
validations:
required: true
- type: input
id: version
attributes:
@@ -81,8 +101,8 @@ body:
id: ci
attributes:
label: EhViewer CI 版本 / EhViewer CI Version
description: 直接将对应 GitHub Action CI 下载页面网址填入即可 / Simply drop GitHub Action CI download page url here
placeholder: https://github.com/Ehviewer-Overhauled/Ehviewer/actions/runs/XXXXXXXXXX
description: 位于设置 - 关于中的版本号后 / Next to the version code in Settings - About
placeholder: 26f05a0
validations:
required: true
@@ -121,17 +141,11 @@ body:
请确认您已经遵守所有必选项
Please ensure you have obtained all needed options
options:
- label: 如果您有足够的时间和能力,并愿意为此提交 PR ,请勾上此复选框 / Pull request is welcome. Check this if you want to start a pull request
required: false
- label: 您已仔细查看并知情 [Q&A](https://github.com/Ehviewer-Overhauled/Ehviewer/issues/61) 中的内容 / You have checked [Q&A](https://github.com/Ehviewer-Overhauled/Ehviewer/issues/61) carefully
required: true
- label: 您已搜索过 [Issue Tracker](https://github.com/Ehviewer-Overhauled/Ehviewer/issues),没有找到类似内容 / I have searched on [Issue Tracker](https://github.com/Ehviewer-Overhauled/Ehviewer/issues), No duplicate or related open issue has been found
- label: 您已搜索过 [Issue Tracker](https://github.com/FooIbar/EhViewer/issues),没有找到类似内容 / I have searched on [Issue Tracker](https://github.com/FooIbar/EhViewer/issues), No duplicate or related open issue has been found
required: true
- label: 您确保这个 Issue 只提及一个问题。如果您有多个问题报告,烦请发起多个 Issue / Ensure there is only one bug report in this issue. Please make mutiply issue for mutiply bugs
required: true
- label: 您确保已使用最新 CI 版本测试,并且该问题在最新 CI 版本中并未解决 / This bug have not solved in latest CI version
- label: 您确保已使用最新 [CI 版本](https://github.com/FooIbar/EhViewer/actions)测试,并且该问题在最新 CI 版本中并未解决 / This bug have not solved in latest [CI version](https://github.com/FooIbar/EhViewer/actions)
required: true
+1
View File
@@ -0,0 +1 @@
blank_issues_enabled: false
+62
View File
@@ -0,0 +1,62 @@
name: Baseline profile generation
on:
schedule:
- cron: '30 0 * * *'
workflow_dispatch:
push:
branches:
- '**'
paths:
- 'benchmark/**'
- '.github/workflows/baseline-profile.yml'
jobs:
baseline-profile:
runs-on: nekomoee
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version-file: .java-version
- name: Setup Android SDK
uses: https://github.com/android-actions/setup-android@v4
- name: Setup Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2026-10-07
targets: aarch64-linux-android, thumbv7neon-linux-androideabi
- name: Rust Cache
uses: https://github.com/Swatinem/rust-cache@v2
with:
workspaces: "./app/src/main/rust"
- name: CMake Cache
uses: actions/cache/restore@v5
with:
path: app/.cxx
key: cmake-
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
cache-read-only: true
- name: Generate Baseline Profile
run: ./gradlew generateBaselineProfile
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
- name: Upload reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: reports
path: benchmark/build/reports
+128
View File
@@ -0,0 +1,128 @@
name: CI
on:
push:
branches:
- '*'
pull_request:
workflow_dispatch:
jobs:
check:
runs-on: nekomoee
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version-file: .java-version
- name: Setup Android SDK
uses: https://github.com/android-actions/setup-android@v4
- name: Setup Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2026-10-07
targets: aarch64-linux-android, thumbv7neon-linux-androideabi
- name: Rust Cache
uses: https://github.com/Swatinem/rust-cache@v2
with:
workspaces: "./app/src/main/rust"
shared-key: ${{ runner.os }}
- name: Rustfmt Check
working-directory: ./app/src/main/rust
run: cargo fmt --all -- --check
- name: Clippy Check
working-directory: ./app/src/main/rust
run: cargo clippy --target aarch64-linux-android --all-features -- -D warnings
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-read-only: true
- name: Check build-logic
run: ./gradlew :build-logic:convention:check
- name: Spotless Check
run: ./gradlew spotlessCheck
default:
runs-on: nekomoee
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version-file: .java-version
- name: Setup Android SDK
uses: https://github.com/android-actions/setup-android@v4
- name: Setup Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2026-10-07
targets: aarch64-linux-android, thumbv7neon-linux-androideabi
- name: Rust Cache
uses: https://github.com/Swatinem/rust-cache@v2
with:
workspaces: "./app/src/main/rust"
shared-key: ${{ runner.os }}
save-if: "false"
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
- name: CMake Cache
uses: actions/cache@v5
with:
path: app/.cxx
key: cmake-default-${{ hashFiles('rust-toolchain.toml', 'settings.gradle.kts', 'app/src/main/cpp/CMakeLists.txt', 'app/src/main/rust/Cargo.lock') }}
restore-keys: cmake-default-
- name: Build
run: ./gradlew assembleDefaultRelease
- name: Upload ARM64
uses: actions/upload-artifact@v3
with:
name: default-arm64-v8a-${{ github.sha }}
path: app/build/outputs/apk/default/release/app-default-arm64-v8a-release.apk
- name: Upload x86_64
uses: actions/upload-artifact@v3
with:
name: default-x86_64-${{ github.sha }}
path: app/build/outputs/apk/default/release/app-default-x86_64-release.apk
- name: Upload ARM32
uses: actions/upload-artifact@v3
with:
name: default-armeabi-v7a-${{ github.sha }}
path: app/build/outputs/apk/default/release/app-default-armeabi-v7a-release.apk
- name: Upload mapping
uses: actions/upload-artifact@v3
with:
name: default-mapping-${{ github.sha }}
path: app/build/outputs/mapping/defaultRelease/*.txt
- name: Upload native debug symbols
uses: actions/upload-artifact@v3
with:
name: default-native-debug-symbols-${{ github.sha }}
path: app/build/outputs/native-debug-symbols/defaultRelease/native-debug-symbols.zip
+79
View File
@@ -0,0 +1,79 @@
name: Releases
on:
push:
tags:
- "*"
jobs:
build:
runs-on: nekomoee
steps:
- name: Free disk space
run: rm -rf $AGENT_TOOLSDIRECTORY
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Checkout
uses: actions/checkout@v6
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: temurin
java-version-file: .java-version
- name: Setup Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2026-10-07
targets: aarch64-linux-android, thumbv7neon-linux-androideabi
- name: Rust Cache
uses: https://github.com/Swatinem/rust-cache@v2
with:
workspaces: "./app/src/main/rust"
- name: CMake Cache
uses: actions/cache/restore@v5
with:
path: app/.cxx
key: cmake-
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
cache-read-only: true
- name: Generate Baseline Profile
run: ./gradlew generateBaselineProfile
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
-Prelease
- name: Build
run: ./gradlew assembleRelease
-Prelease
- name: Rename Apks
run: |
mkdir release
mv app/build/outputs/apk/default/release/app-default-universal-release.apk release/EhViewer-${{ github.ref_name }}-default-universal.apk
mv app/build/outputs/apk/default/release/app-default-arm64-v8a-release.apk release/EhViewer-${{ github.ref_name }}-default-arm64-v8a.apk
mv app/build/outputs/apk/default/release/app-default-x86_64-release.apk release/EhViewer-${{ github.ref_name }}-default-x86_64.apk
mv app/build/outputs/apk/default/release/app-default-armeabi-v7a-release.apk release/EhViewer-${{ github.ref_name }}-default-armeabi-v7a.apk
mv app/build/outputs/mapping/defaultRelease/mapping.txt release/EhViewer-${{ github.ref_name }}-default-mapping.txt
mv app/build/outputs/native-debug-symbols/defaultRelease/native-debug-symbols.zip release/EhViewer-${{ github.ref_name }}-default-native-debug-symbols.zip
- name: Releases
uses: actions/forgejo-release@v2
with:
direction: upload
url: https://codeberg.org
repo: EhViewer/EhViewer
release-dir: release
body: Bump Version
-5
View File
@@ -1,5 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: 所有其他问题 / All other questions
url: https://github.com/Ehviewer-Overhauled/Ehviewer/discussions
about: 转到 Discussions / Turn to discussions
@@ -1,94 +0,0 @@
name: 功能请求 / Feature request
description: 提出一个功能建议 / Suggest an idea
labels:
- "enhancement"
body:
- type: markdown
attributes:
value: |
感谢您愿意为 Ehviewer-Overhauled 做出贡献!
提交功能建议前,还请首先完成文末的自查步骤
Thanks for your contribution on Ehviewer-Overhauled Project!
Please finish verify steps which list in the end first before suggest an idea
- type: textarea
id: request
attributes:
label: 需求 / Requirement
description: |
在此处描述您的需求。这通常会是一个您想要的功能
Ddescribe what you need here.
placeholder: |
我需要 XXX 功能 ...
I want ABC feature ...
validations:
required: true
- type: textarea
id: impl
attributes:
label: 建议实现 / Suggested implements
description: |
在此处表述您建议的实现方式。如有可能,UI 类功能请求还请尽量附上图示
Describe your suggested implements here, It's recommend to add a photo if you are making a UI feature request.
placeholder: |
建议在 XX 处添加 XX ...
I recommend add ABC feature to DEF...
图片(如果有)/ Photos (if exists)
validations:
required: true
- type: textarea
id: more
attributes:
label: 备注 / Addition details
description: |
在此处写下其他您想说的内容
Describe addition details here
placeholder: |
其他有用的信息与附件
Additional details and attachments
validations:
required: false
- type: input
id: version
attributes:
label: EhViewer 版本号 / EhViewer version code
description: 您可以在设置 - 关于处找到版本号 / You can get version code in Settings - About
placeholder: 1.6.9.13
validations:
required: true
- type: input
id: ci
attributes:
label: EhViewer CI 版本 / EhViewer CI Version
description: 直接将对应 GitHub Action CI 下载页面网址填入即可 / Simply drop GitHub Action CI download page url here
placeholder: https://github.com/Ehviewer-Overhauled/Ehviewer/actions/runs/XXXXXXXXXX
validations:
required: true
- type: checkboxes
id: check
attributes:
label: 自查步骤 / Verify steps
description: |
请确认您已经遵守所有必选项
Please ensure you have obtained all needed options
options:
- label: 如果您有足够的时间和能力,并愿意为此提交 PR ,请勾上此复选框 / Pull request is welcome. Check this if you want to start a pull request
required: false
- label: 您已仔细查看并知情 [Q&A](https://github.com/Ehviewer-Overhauled/Ehviewer/issues/61) 中的内容 / You have checked [Q&A](https://github.com/Ehviewer-Overhauled/Ehviewer/issues/61) carefully
required: true
- label: 您已搜索过 [Issue Tracker](https://github.com/Ehviewer-Overhauled/Ehviewer/issues),没有找到类似内容 / I have searched on [Issue Tracker](https://github.com/Ehviewer-Overhauled/Ehviewer/issues), No duplicate or related open issue has been found
required: true
- label: 您确保这个 Issue 只提及一个功能。如果您有多个功能请求,烦请发起多个 Issue / Ensure there is only one feature request in this issue. Please make mutiply issue for mutiply feature request
required: true
- label: 您确保已使用最新 CI 版本测试,并且该功能在最新 CI 版本中并未按照预期实现 / This feature don't implement correctly in latest CI version
required: true
-65
View File
@@ -1,65 +0,0 @@
name: CI
on:
push:
branches:
- '*'
tags-ignore:
- "*"
jobs:
linux:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Setup Java 19
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 19
- name: Install NDK
run: |
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;25.2.9519653" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
- name: Gradle Build
uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
arguments: assembleRelease
- name: Update ARM64
uses: actions/upload-artifact@v3
with:
name: arm64-v8a-${{ github.sha }}
path: app/build/outputs/apk/release/app-arm64-v8a-release.apk
- name: Update x86_64
uses: actions/upload-artifact@v3
with:
name: x86_64-${{ github.sha }}
path: app/build/outputs/apk/release/app-x86_64-release.apk
- name: Update ARM32
uses: actions/upload-artifact@v3
with:
name: armeabi-v7a-${{ github.sha }}
path: app/build/outputs/apk/release/app-armeabi-v7a-release.apk
- name: Update x86
uses: actions/upload-artifact@v3
with:
name: x86-${{ github.sha }}
path: app/build/outputs/apk/release/app-x86-release.apk
- name: Update mapping
uses: actions/upload-artifact@v3
with:
name: mapping-${{ github.sha }}
path: app/build/outputs/mapping/release/mapping.txt
retention-days: 5
-52
View File
@@ -1,52 +0,0 @@
name: Pull Request Check
on: [pull_request]
jobs:
linux:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Setup Java 19
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 19
- name: Install NDK
run: |
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;25.2.9519653" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
- name: Gradle Build
uses: gradle/gradle-build-action@v2
with:
arguments: assembleRelease
- name: Update ARM64
uses: actions/upload-artifact@v3
with:
name: arm64-v8a-${{ github.sha }}
path: app/build/outputs/apk/release/app-arm64-v8a-release.apk
- name: Update x86_64
uses: actions/upload-artifact@v3
with:
name: x86_64-${{ github.sha }}
path: app/build/outputs/apk/release/app-x86_64-release.apk
- name: Update ARM32
uses: actions/upload-artifact@v3
with:
name: armeabi-v7a-${{ github.sha }}
path: app/build/outputs/apk/release/app-armeabi-v7a-release.apk
- name: Update x86
uses: actions/upload-artifact@v3
with:
name: x86-${{ github.sha }}
path: app/build/outputs/apk/release/app-x86-release.apk
-73
View File
@@ -1,73 +0,0 @@
name: Releases
on:
push:
tags:
- "*"
jobs:
linux:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Setup Java 19
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 19
- name: Install NDK
run: |
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;25.2.9519653" --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
- name: Gradle Build
uses: gradle/gradle-build-action@v2
with:
arguments: assembleRelease
- name: Rename Apks
run: |
cp app/build/outputs/apk/release/app-universal-release.apk app/build/outputs/apk/release/EhViewer-universal.apk
cp app/build/outputs/apk/release/app-arm64-v8a-release.apk app/build/outputs/apk/release/EhViewer-arm64-v8a.apk
cp app/build/outputs/apk/release/app-x86_64-release.apk app/build/outputs/apk/release/EhViewer-x86_64.apk
cp app/build/outputs/apk/release/app-x86-release.apk app/build/outputs/apk/release/EhViewer-x86.apk
cp app/build/outputs/apk/release/app-armeabi-v7a-release.apk app/build/outputs/apk/release/EhViewer-armeabi-v7a.apk
- name: Releases
uses: softprops/action-gh-release@v1
with:
body: Bump Version
discussion_category_name: Announcements
files: |
app/build/outputs/apk/release/EhViewer-universal.apk
app/build/outputs/apk/release/EhViewer-arm64-v8a.apk
app/build/outputs/apk/release/EhViewer-x86_64.apk
app/build/outputs/apk/release/EhViewer-x86.apk
app/build/outputs/apk/release/EhViewer-armeabi-v7a.apk
app/build/outputs/mapping/release/mapping.txt
- name: Collect Apks
run: |
mkdir app/build/outputs/apk/release/fdroid
cp app/build/outputs/apk/release/app-arm64-v8a-release.apk app/build/outputs/apk/release/fdroid/EhViewer-v$GITHUB_REF_NAME.apk
cp app/build/outputs/apk/release/app-armeabi-v7a-release.apk app/build/outputs/apk/release/fdroid/EhViewer-v$GITHUB_REF_NAME-armv7.apk
- name: Push Apks
uses: Ehviewer-Overhauled/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: app/build/outputs/apk/release/fdroid
destination-github-username: Ehviewer-Overhauled
destination-repository-name: fdroid-repo
user-name: 'github-actions[bot]'
user-email: 'github-actions[bot]@users.noreply.github.com'
target-branch: deploy
create-target-branch: true
commit-message: Add apks from $GITHUB_REF
target-directory: fdroid/tmp-apks
+4 -4
View File
@@ -1,10 +1,10 @@
.gradle
/local.properties
.DS_Store
/build
/src
build
.cxx
.kotlin
*.iml
.idea
.vscode
/captures
release
google-services.json
-9
View File
@@ -1,9 +0,0 @@
[submodule "app/src/main/cpp/libarchive"]
path = app/src/main/cpp/libarchive
url = https://github.com/Ehviewer-Overhauled/libarchive
[submodule "app/src/main/cpp/liblzma"]
path = app/src/main/cpp/liblzma
url = https://github.com/Ehviewer-Overhauled/xz
[submodule "app/src/main/cpp/nettle/nettle"]
path = app/src/main/cpp/nettle/nettle
url = https://github.com/Ehviewer-Overhauled/nettle
+1
View File
@@ -0,0 +1 @@
25
+588
View File
@@ -0,0 +1,588 @@
# 变更日志
## [1.14.6] - 2025-12-17
### 新功能
* 支持显示画廊阅读进度(于 EH 设置中开启) [#2277](https://github.com/FooIbar/EhViewer/issues/2277)
### 改进
* 画廊列表变化时重新显示悬浮操作按钮 [#2681](https://github.com/FooIbar/EhViewer/issues/2681)
* 移除文件名中的尾随空格和点以兼容 Windows [#2727](https://github.com/FooIbar/EhViewer/issues/2727)
* 长按画廊详情中的标签时显示标签名称 [#2769](https://github.com/FooIbar/EhViewer/issues/2769)
* 杂项优化
### Bug 修复
* 对话框中的下拉菜单显示错位
* HTTP 状态错误显示为“什么都没有找到”
* 某些老设备无法通过 Cloudflare 验证 [#2794](https://github.com/FooIbar/EhViewer/issues/2794)
* 杂项修复
## [1.14.5] - 2025-10-19
### 改进
* [阅读器] 显示画廊标题
* [阅读器] 显示菜单时改变标题栏颜色
### Bug 修复
* 横屏模式下打开阅读器设置会闪退 [#2673](https://github.com/FooIbar/EhViewer/issues/2673)
* 强制横屏时竖直拿取设备加载图片会横竖屏乱跳 [#2674](https://github.com/FooIbar/EhViewer/issues/2674)
## [1.14.4] - 2025-10-12
### 改进
* [阅读器] 支持禁用使用音量键翻页 [#2593](https://github.com/FooIbar/EhViewer/issues/2593)
* 视搜索警告为错误 [#2604](https://github.com/FooIbar/EhViewer/issues/2604)
* 余额不足时停止下载并显示通知 [#2479](https://github.com/FooIbar/EhViewer/issues/2479)
* [阅读器] 使用默认阅读模式时对带有 webtoon 标签的画廊自动使用条漫模式 [#2632](https://github.com/FooIbar/EhViewer/issues/2632)
* 优化按页数排序下载项目的速度
* 开启显示标签投票状态时为 power >= 100 的标签添加下划线
* 杂项优化
### Bug 修复
* Android 16 QPR1 上画廊详情中的标签文本对比度不足
* 初始化 DownloadManager 用时过长导致 ANR [#2588](https://github.com/FooIbar/EhViewer/issues/2588)
* 某些设备上无法下载名称较长的画廊 [#2607](https://github.com/FooIbar/EhViewer/issues/2607)
* 评论区链接实际可点击区域比画面显示上的略长 [#2615](https://github.com/FooIbar/EhViewer/issues/2615)
* 主页快速搜索再次打开出现以前的画廊重复出现在最上层 [#2628](https://github.com/FooIbar/EhViewer/issues/2628)
* 非条漫模式下原始大小较小的动图不播放 [#2652](https://github.com/FooIbar/EhViewer/issues/2652)
* Android 9 以下打开评论区切屏后回来会闪退 [#2655](https://github.com/FooIbar/EhViewer/issues/2655)
* 杂项修复
## [1.14.3] - 2025-09-01
### 新功能
* 支持以 label: 语法搜索下载标签
### Bug 修复
* [阅读器] 关闭滤镜设置时崩溃 [#2573](https://github.com/FooIbar/EhViewer/issues/2573)
* 编辑评论时上下文菜单缺少格式化选项
* 某些情况下搜索相似画廊时出错
## [1.14.2] - 2025-08-16
### 改进
* [下载] 支持将最低下载速度设为 0 [#2545](https://github.com/FooIbar/EhViewer/issues/2545)
* [下载] 移除令人困惑的连接超时设置 [#2556](https://github.com/FooIbar/EhViewer/issues/2556)
### Bug 修复
* 下载速度计算不准确导致下载失败误报 [#2545](https://github.com/FooIbar/EhViewer/issues/2545)
* 无法解析带有 location: 标签的画廊
## [1.14.1] - 2025-07-31
### 改进
* 更新 GitHub 访问令牌
## [1.14.0] - 2025-07-23
### 重大变更
* 默认隐藏分数为 -100 的评论
* 迁移部分组件到 Material 3 Expressive
### 新功能
* [EH] 支持显示标签投票状态
* 支持添加画廊标签时自动补全
* [下载] 支持指定连接超时和最低响应速度 [#1915](https://github.com/FooIbar/EhViewer/issues/1915)
* [阅读器] 支持反转物理按键控制 [#1962](https://github.com/FooIbar/EhViewer/issues/1962)
* [高级] 支持禁用 QUIC 支持
* [高级] 重新添加桌面版网站选项以绕过 Cloudflare [#2230](https://github.com/FooIbar/EhViewer/issues/2230)
* 支持 Android 6.0 上的动画 WebP
### 改进
* 优化压缩包加载性能
* 优化预加载策略
* 更新日本语翻译
* 为已选中的项目使用不同的颜色 [#2121](https://github.com/FooIbar/EhViewer/issues/2121)
* 缩略图模式下显示已收藏图标 [#2128](https://github.com/FooIbar/EhViewer/issues/2128)
* 迁移大部分解析器到 Rust 实现
* 优化动画 WebP 解码性能 [#2415](https://github.com/FooIbar/EhViewer/issues/2415)
* 优化标签自动补全命中率 [#2473](https://github.com/FooIbar/EhViewer/issues/2473)
* 在状态栏后绘制半透明背景以提高对比度
* 杂项优化
### Bug 修复
* 退出阅读器时崩溃
* Android 8.0 以下的设备无法读取某些压缩包
* 列表模式下点击画廊封面无法进入详情页
* 点击某些评论时崩溃
* 开启裁剪边缘时某些图片被不正确裁剪
* 下载数较多时无网络时启动 app 时崩溃 [#2041](https://github.com/FooIbar/EhViewer/issues/2041)
* 标签翻译数据无法更新 [#2075](https://github.com/FooIbar/EhViewer/issues/2075)
* 画廊详情页面显示的收藏夹名称错误 [#2081](https://github.com/FooIbar/EhViewer/issues/2081)
* 不使用 CI 频道时无法更新
* 添加后移动快捷搜索闪退 [#2124](https://github.com/FooIbar/EhViewer/issues/2124)
* 某些数据无法导入
* App 位于后台时清除下载通知时崩溃
* 杂项修复
## [1.13.1] - 2024-11-11
### 重大变更
* 由于网站限制,移除搜索封面功能
* 移除桌面版网站选项,默认使用 1280x 分辨率
### 改进
* 更新日本语翻译
* 优化压缩包读取
* 缓解某些小米系统上应用闪退 [#1826](https://github.com/FooIbar/EhViewer/issues/1826)
* 杂项优化
### Bug 修复
* Android 9 上的下载失败误报 [#1914](https://github.com/FooIbar/EhViewer/issues/1914)
## [1.13.0] - 2024-11-01
### 重大变更
* 不再捆绑 Cronet 库,在不支持 HttpEngine 的设备上回退到 OkHttp
* 适配 E 站缩略图和 WebP 等相关变更
### 改进
* 使用磁力链接代替种子下载
* 在搜索栏右侧显示论坛头像
* 支持重置下载路径
* 为 Android 10 以下且没有 DocumentsUI 的设备创建默认下载目录 [#1735](https://github.com/FooIbar/EhViewer/issues/1735)
* 重新添加了强制使用 e-hentai 缩略图服务器的选项
* 阅读器支持 PageUp/PageDown 和方向键上/下翻页 [#1801](https://github.com/FooIbar/EhViewer/issues/1801)
* 未找到搜索结果时显示可能存在的警告 [#1787](https://github.com/FooIbar/EhViewer/issues/1787)
* 更新了日本语翻译
* 杂项优化
### Bug 修复
* 阅读器屏幕方向与手机屏幕方向不同时闪退 [#1779](https://github.com/FooIbar/EhViewer/issues/1779)
* 下载文件哈希不匹配导致下载失败 [#1811](https://github.com/FooIbar/EhViewer/issues/1811)
* 无法同时下载和查看 [#1822](https://github.com/FooIbar/EhViewer/issues/1822)
* 杂项修复
## [1.12.1] - 2024-09-28
### 新功能
* 屏蔽含有二维码的图片(位于高级设置)
### 改进
* 移除高级设置中的自定义 User Agent,改为桌面版网站选项
* 画廊预览与画廊详情页面合并
* 为快速搜索和下载标签列表添加了滚动条
* 无网络条件下启动时自动转到下载页面
* 杂项优化
### Bug 修复
* 从左到右或右到左模式观看使用鼠标滚轮无法翻页 [#1541](https://github.com/FooIbar/EhViewer/issues/1541)
* 状态栏颜色未跟随阅读器主题变化 [#1542](https://github.com/FooIbar/EhViewer/issues/1542)
* 打开 EH 设置时闪退 [#1563](https://github.com/FooIbar/EhViewer/issues/1563)
* 画廊种子过多时显示没有种子 [#1561](https://github.com/FooIbar/EhViewer/issues/1561)
* 加载大于 100 MB 的位图时崩溃
* 阅读器加载小圆圈在黑色背景下不自动变色 [#1579](https://github.com/FooIbar/EhViewer/issues/1579)
* 因闪退造成的无法挽回的下载失败 [#1602](https://github.com/FooIbar/EhViewer/issues/1602)
* 某些情况下闪退 [#1548](https://github.com/FooIbar/EhViewer/issues/1548) [#1555](https://github.com/FooIbar/EhViewer/issues/1555) [#1568](https://github.com/FooIbar/EhViewer/issues/1568)
* Android 7.0 及以下的设备无法加载图片 [#1633](https://github.com/FooIbar/EhViewer/issues/1633)
* 某些情况下导入数据失败 [#1634](https://github.com/FooIbar/EhViewer/issues/1634)
* 下载时创建重复文件夹 [#1619](https://github.com/FooIbar/EhViewer/issues/1619)
* 滚动方向改变后预载图片不生效 [#1560](https://github.com/FooIbar/EhViewer/issues/1560)
* 选择无效的下载位置后闪退
* 杂项修复
## [1.12.0] - 2024-08-19
### 重大变更
* Compose 阅读器已稳定,移除了旧阅读器实现 [#847](https://github.com/FooIbar/EhViewer/issues/847)
* 由于 E 站缩略图服务器变更,移除了强制使用 e-hentai 缩略图服务器的选项
### 改进
* 更新高级搜索选项中页数过滤器的范围限制以遵循 E 站变更
### Bug 修复
* 评论页面刷新指示器边距不正确 [#1428](https://github.com/FooIbar/EhViewer/issues/1428)
* 关闭打开失败的压缩包时崩溃
* 无法打开带密码的压缩包 [#1454](https://github.com/FooIbar/EhViewer/issues/1454)
* 使用音量键翻页时无法关闭过渡动画 [#1467](https://github.com/FooIbar/EhViewer/issues/1467)
* 带有图片的评论显示错位 [#1468](https://github.com/FooIbar/EhViewer/issues/1468)
* 在包含相同项目的页面间切换时崩溃 [#1490](https://github.com/FooIbar/EhViewer/issues/1490)
* 无法检查更新 [#1512](https://github.com/FooIbar/EhViewer/issues/1512)
* 画廊详情未加载完成时退出阅读器导致崩溃 [#1507](https://github.com/FooIbar/EhViewer/issues/1507)
* 无法为带有临时标签的画廊生成 ComicInfo.xml [#1509](https://github.com/FooIbar/EhViewer/issues/1509)
* 已下载的画廊翻页时出现加载动画 [#1510](https://github.com/FooIbar/EhViewer/issues/1510)
* 画廊详情页面的缩略图无法加载 [#1529](https://github.com/FooIbar/EhViewer/issues/1529)
* 图片未加载完成时无法通过点击翻页
* 搜索结果为空时解析失败 [#1418](https://github.com/FooIbar/EhViewer/issues/1418)
* 缩略图分辨率设置不起作用
## [1.11.7] - 2024-07-10
### Bug 修复
* 无法下载标题包含 # 或 % 的画廊
* 下载页数较多的画廊时应用无响应
* 退出搜索栏时文本闪烁
## [1.11.6] - 2024-07-09 [YANKED]
### 改进
* 某些设备上无法加载长图时可尝试减小 设置-高级 中的硬件位图阈值 [#1321](https://github.com/FooIbar/EhViewer/issues/1321)
* 清理下载冗余时显示确认对话框 [#1369](https://github.com/FooIbar/EhViewer/issues/1369)
* 修改收藏时显示收藏备注 [#1392](https://github.com/FooIbar/EhViewer/issues/1392)
### Bug 修复
* 图片完整性校验误报 [#1286](https://github.com/FooIbar/EhViewer/issues/1286)
* 某些情况下应用崩溃 [#1290](https://github.com/FooIbar/EhViewer/issues/1290) [#1302](https://github.com/FooIbar/EhViewer/issues/1302)
* 某些情况下渲染问题 [#1284](https://github.com/FooIbar/EhViewer/issues/1284)
* 无法下载标题过长的画廊 [#1340](https://github.com/FooIbar/EhViewer/issues/1340)
* 某些界面拖动滚动条时黑屏 [#1329](https://github.com/FooIbar/EhViewer/issues/1329)
* 搜索栏多行文本遮挡其他内容 [#1365](https://github.com/FooIbar/EhViewer/issues/1365)
* CIFS Documents Provider 兼容问题 [#1356](https://github.com/FooIbar/EhViewer/issues/1356)
* 清理下载冗余未按预期运行 [#1369](https://github.com/FooIbar/EhViewer/issues/1369)
* 读取压缩包失败时崩溃
* 某些设备上崩溃 [#1276](https://github.com/FooIbar/EhViewer/issues/1276)
* 检查更新失效
## [1.11.6-RC2] - 2024-06-06
### 改进
* 下载图片时执行完整性校验以防止文件损坏/被篡改
## [1.11.6-RC1] - 2024-06-02
### 改进
* 下载列表默认显示全部下载项目
* 替换搜索文本中的换行符为空格 [#1258](https://github.com/FooIbar/EhViewer/issues/1258)
### Bug 修复
* 评价画廊时未使用输入的评分
* 搜索时意外选择 Non-H 类别 [#1246](https://github.com/FooIbar/EhViewer/issues/1246)
* 侧边栏与导航抽屉重叠 [#1262](https://github.com/FooIbar/EhViewer/issues/1262)
* 快速搜索/下载标签排序失效 [#1267](https://github.com/FooIbar/EhViewer/issues/1267)
* 加载压缩包/种子列表出错时 UI 冻结
* 低版本 Android 上某些 UI 被遮挡
## [1.11.5] - 2024-05-19
### 重大变更
* 不再支持 32 位 x86
### 新功能
* 支持按作者对下载分组
* 由于 E 站不再强制要求人机验证,重新支持账号密码登录
### 改进
* 在登录时加载收藏名称 [#1077](https://github.com/FooIbar/EhViewer/issues/1077)
* 优化归档和种子界面 UI
* 禁止在 cookie 界面截图以防止泄露
* 在缩略图模式下显示画廊页数
* 记住最低评分和页数搜索参数
* 更新 User-Agent 以缓解 IP 封禁 [#1182](https://github.com/FooIbar/EhViewer/issues/1182)
* 账号密码登录支持自动填充
* 更新中文(台灣)翻译
### Bug 修复
* 非触摸模式下无法退出搜索界面 [#1060](https://github.com/FooIbar/EhViewer/issues/1060)
* 某些设备上无法安装更新 [#1067](https://github.com/FooIbar/EhViewer/issues/1067)
* 某些设备上崩溃/卡顿 [#996](https://github.com/FooIbar/EhViewer/issues/996) [#1023](https://github.com/FooIbar/EhViewer/issues/1023)
* 搜索记录中存在重复条目时崩溃 [#1130](https://github.com/FooIbar/EhViewer/issues/1130)
* 条漫模式下缩小后点按区域偏移 [#127](https://github.com/FooIbar/EhViewer/issues/127)
* 多窗口模式下点按区域偏移
* 点击下载通知时未清除状态
* 保存未完成加载的图片时崩溃 [#1154](https://github.com/FooIbar/EhViewer/issues/1154)
* 历史记录界面无法在项目上滑动打开抽屉 [#464](https://github.com/FooIbar/EhViewer/issues/464)
* 导入数据失败时显示导入成功 [#1174](https://github.com/FooIbar/EhViewer/issues/1174)
* 某些条件下收藏界面崩溃 [#1190](https://github.com/FooIbar/EhViewer/issues/1190)
* 反转点按区域功能失效 [#1217](https://github.com/FooIbar/EhViewer/issues/1217)
### 已知问题
* 某些设备上从后台返回时某些 UI 消失,可通过关闭列表项目动画部分缓解 [#1184](https://github.com/FooIbar/EhViewer/issues/1184)
## [1.11.4] - 2024-04-21
### 新功能
* 更新前自动备份数据
### 改进
* 在 设置-高级 中加入了禁用列表项目动画的选项,该功能在部分设备上导致崩溃/卡顿 [#996](https://github.com/FooIbar/EhViewer/issues/996) [#1023](https://github.com/FooIbar/EhViewer/issues/1023)
* 下载列表多选模式下避免误触 [#1016](https://github.com/FooIbar/EhViewer/issues/1016)
* 杂项 UI 优化
### Bug 修复
* 重命名下载标签后删除该标签时崩溃 [#1008](https://github.com/FooIbar/EhViewer/issues/1008)
* 搜索栏中某些输入法长按退格无法连续删除 [#606](https://github.com/FooIbar/EhViewer/issues/606)
* 评论/屏蔽/搜索建议/下载标签/快速搜索列表卡顿 [#1041](https://github.com/FooIbar/EhViewer/issues/1041)
## [1.11.3] - 2024-04-06
### 改进
* 优化预加载逻辑和图片加载顺序
* 优化画廊详情和评论页面 UI
### Bug 修复
* 某些模式下搜索结果不显示画廊语言 [#923](https://github.com/FooIbar/EhViewer/issues/923)
* 某些情况下在搜索结果中直接阅读画廊后崩溃 [#927](https://github.com/FooIbar/EhViewer/issues/927)
* 更新至最新版本后仍提示有新版本 [#927](https://github.com/FooIbar/EhViewer/issues/927)
* 从旧版本升级时包含不兼容数据导致崩溃/无法导出数据 [#940](https://github.com/FooIbar/EhViewer/issues/940) [#974](https://github.com/FooIbar/EhViewer/issues/974)
* Android 10 以下的设备打开 设置-隐私 时崩溃 [#953](https://github.com/FooIbar/EhViewer/issues/953)
* 下载标签无法拖动
* 刷新 和 刷新(原图) 无法在已下载的图片上使用
* 临时 IP 封禁错误显示为解析失败
* 某些情况下下载时闪退 [#980](https://github.com/FooIbar/EhViewer/issues/980)
* 某些设备上下载列表中的缩略图无法显示 [#977](https://github.com/FooIbar/EhViewer/issues/977)
## [1.11.2] - 2024-03-17
### 重大变更
* Default 变种最低支持版本更改为 Android 8.0,重新添加了最低支持 Android 6.0 的 Marshmallow 变种
### 改进
* 重新添加了删除快速搜索/下载标签时的确认对话框
### Bug 修复
* 收藏页面 搜索栏中文标签转英文异常 [#902](https://github.com/FooIbar/EhViewer/issues/902)
* 在收藏或者取消收藏之后,收藏按钮会无反应 [#908](https://github.com/FooIbar/EhViewer/issues/908)
* 横屏页面下阅读设置UI重合 [#909](https://github.com/FooIbar/EhViewer/issues/909)
* Search bar does not work properly in Japanese [#906](https://github.com/FooIbar/EhViewer/issues/906)
* 搜索结果中的 Disowned 画廊不显示上传者
* 使用 CI 频道更新时,有时会获取到错误的更新链接
## [1.11.1] - 2024-03-12
### 重大变更
* 由于 E 站强制要求人机验证,仅支持通过网页登录
* 默认支持 Android 6,不再提供 Marshmallow 变种
* 集成 Cronet 库,不再提供 GMS 变种
### 改进
* 支持在排序下载列表前按下载标签分组
### Bug 修复
* 下载画廊时崩溃 [#893](https://github.com/FooIbar/EhViewer/issues/893)
## [1.11.0] - 2024-03-09
### 重大变更
* 由于 E 站 Cookie 策略变更,不再支持 Cookie 登录
* 登录时自动选择 exhentai (如果可用)
* 不再提供默认下载路径
* 手动排序更改为以添加时间/上传时间/标题/下载标签/页数对下载列表排序
* 由于数据库结构变更,此版本导出的数据将无法被旧版本导入
### 新功能
* 下载画廊时生成 ComicInfo.xml 格式元数据
* 归档下载时生成 ComicInfo.xml 格式元数据 [#711](https://github.com/FooIbar/EhViewer/issues/711)
* 归档下载支持第三方下载管理器 [#79](https://github.com/FooIbar/EhViewer/issues/79)
* 保存下载结果为 CBZ 压缩包 [#660](https://github.com/FooIbar/EhViewer/issues/660)
* 清除 `igneous` Cookie (将于下次搜索时重新获取)
* 随机打开本地收藏/下载中的画廊 [#695](https://github.com/FooIbar/EhViewer/issues/695)
* 随机在搜索结果中跳转
* 以网格模式查看下载列表
* 本地收藏/历史/下载中的标签搜索 [#860](https://github.com/FooIbar/EhViewer/issues/860)
### 改进
* 搜索时优先显示已选择的类别卡片
* 多处性能优化
### Bug 修复
* 显示模式为 Thumbnail 时无法点击上传者卡片 [#653](https://github.com/FooIbar/EhViewer/issues/653)
* [Marshmallow] GIF 只显示第一帧
* 无法在 `定时请求新闻页面` 关闭时开启 `隐藏 HV 事件通知`
* 响应正文含有无效 UTF-8 字符导致解码失败 [#643](https://github.com/FooIbar/EhViewer/issues/643)
* 某些情况下应用崩溃 [#710](https://github.com/FooIbar/EhViewer/issues/710)
* 画廊名称包含非法路径字符时无法保存图片 [#815](https://github.com/FooIbar/EhViewer/issues/815)
* 无法解码超长图片 [#732](https://github.com/FooIbar/EhViewer/issues/732)
* E 站变更导致种子解析失败 [#880](https://github.com/FooIbar/EhViewer/issues/880)
* E 站不再支持相似扫描导致图片搜索无法使用
* 杂项修复
### 已知问题
* Android 14 上使用手势导航返回时过渡动画过早结束 [#775](https://github.com/FooIbar/EhViewer/issues/775)
## [1.10.3] - 2024-01-15
### 新功能
* [Marshmallow] 支持裁剪边缘、打开压缩包和 GIF
### 改进
* 由于部分设备上的非预期行为 [#578](https://github.com/FooIbar/EhViewer/issues/578) [#596](https://github.com/FooIbar/EhViewer/issues/596),默认禁用预见式返回导航动画,可于 设置-高级 中开启
* 杂项优化
### Bug 修复
* 刷新后页面无响应 [#579](https://github.com/FooIbar/EhViewer/issues/579)
* 浏览中保存图片后点击操作被阻挡 [#581](https://github.com/FooIbar/EhViewer/issues/581)
* 在画廊详情页面切换至后台后点击评论闪退 [#580](https://github.com/FooIbar/EhViewer/issues/580)
* 已下载的画廊中未阅读缓存过的图片解码失败 [#592](https://github.com/FooIbar/EhViewer/issues/592)
* 在收藏页多选并下载会使得下载状态出现问题 [#603](https://github.com/FooIbar/EhViewer/issues/603)
* 未能在不重启情况下切换 Http 引擎 [#610](https://github.com/FooIbar/EhViewer/issues/610)
* 在有进度的画廊阅读界面无法直接回到第一页 [#614](https://github.com/FooIbar/EhViewer/issues/614)
* 请求新闻界面失效 [#605](https://github.com/FooIbar/EhViewer/issues/605)
* 收藏夹为空解析失败 [#630](https://github.com/FooIbar/EhViewer/issues/630)
## [1.10.2] - 2023-12-31
### 新功能
* [阅读器] 支持裁剪图片黑色/白色边缘
### 改进
* 切换 HTTP 引擎无需重启
* 优化过渡动画
* 杂项性能优化
### Bug 修复
* 修复搜索建议中出现关键词相同的条目时崩溃 [#533](https://github.com/FooIbar/EhViewer/issues/533) [#555](https://github.com/FooIbar/EhViewer/issues/555)
* 修复重命名下载标签时不显示原标签 [#534](https://github.com/FooIbar/EhViewer/issues/534)
* 修复调整下载项目顺序时卡顿 [#552](https://github.com/FooIbar/EhViewer/issues/552)
* 修复新增或修改评论后黑屏 [#554](https://github.com/FooIbar/EhViewer/issues/554)
* 修复剪贴板读取bug [#566](https://github.com/FooIbar/EhViewer/issues/566)
* 修复画廊信息对话框无法通过返回按钮/手势关闭 [#413](https://github.com/FooIbar/EhViewer/issues/413)
## [1.10.1] - 2023-12-19
### 重大变更
* 由于 Apache HttpClient 5 在 Android 10 以下无法使用,后备 HTTP 引擎恢复为 OkHttp [#514](https://github.com/FooIbar/EhViewer/issues/514)
### Bug 修复
* 修复获取 pToken 失败导致无限加载 [#508](https://github.com/FooIbar/EhViewer/issues/508)
* 修复阅读页快速滑动滑块导致下载延时过多累计 [#512](https://github.com/FooIbar/EhViewer/issues/512)
* 修复 Android 9 以下的设备上无法退出搜索栏 [#513](https://github.com/FooIbar/EhViewer/issues/513)
## [1.10.0] - 2023-12-14 [YANKED]
### 重大变更
* 后备 HTTP 引擎变更为 Apache HttpClient 5
* 类别和高级搜索选项移至搜索栏下方
### 新功能
* 支持在搜索时指定画廊语言
### 改进
* 在下载中阅读画廊时会更新历史记录
* 多处性能改进
### Bug 修复
* 修复无法由外部应用进入画廊页面 [#436](https://github.com/FooIbar/EhViewer/issues/436)
* 修复点击精确到页的画廊链接闪退 [#430](https://github.com/FooIbar/EhViewer/issues/430)
* 修复无法搜索本地收藏 [#491](https://github.com/FooIbar/EhViewer/issues/491)
* 修复 CI 版本不显示变更日志
## [1.9.0] - 2023-12-01
### 重大变更
* 除阅读器外全部迁移至 Compose
### 新功能
* 设置-高级 中增加实验性滑动手势敏感度设置
* 支持通过滑动手势打开右侧抽屉
* 支持预见式返回动画,相关设置位于 设置-高级
### 改进
* [阅读器] 画廊页数过多时隐藏进度条刻度并禁用触感反馈
* 优化原图下载重试策略
* 优化小屏设备上的搜索类别布局
* 优化过渡动画
* 优化历史记录删除动画
* 设置-EH 中的缩略图大小设置改为缩略图列数
### Bug 修复
* 修复点击通知栏的下载通知闪退 [#175](https://github.com/FooIbar/EhViewer/issues/175)
* 修复收藏状态显示错误 [#189](https://github.com/FooIbar/EhViewer/issues/189)
* 修复双击导航按钮后无法打开导航抽屉
* 修复某些情况下闪退 [#142](https://github.com/FooIbar/EhViewer/issues/142) [#208](https://github.com/FooIbar/EhViewer/issues/208)
* 修复收藏界面点击重试崩溃 [#193](https://github.com/FooIbar/EhViewer/issues/193)
* 修复本地收藏滚动位置丢失 [#192](https://github.com/FooIbar/EhViewer/issues/192)
* 修复手速过快页面切换过快使加载圈圈不自动消失 [#209](https://github.com/FooIbar/EhViewer/issues/209)
* 修复打开并关闭右侧抽屉后,状态栏一片白色 [#101](https://github.com/FooIbar/EhViewer/issues/101)
* 修复使用深色主题时,切换界面会闪过亮色界面 [#121](https://github.com/FooIbar/EhViewer/issues/121)
* [Marshmallow] 修复小内存设备上图片解码失败 [#229](https://github.com/FooIbar/EhViewer/issues/229) [#372](https://github.com/FooIbar/EhViewer/issues/372)
* 修复已舍弃画廊上传者解析
### 已知问题
* 画廊信息对话框无法通过返回关闭 [#413](https://github.com/FooIbar/EhViewer/issues/413)
+13 -81
View File
@@ -1,100 +1,32 @@
<p align="right">
<strong>English</strong>
<span> | </span>
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-cn.md">
简体中文
</a>
<span> | </span>
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-tw.md">
正體中文
</a>
</p>
<h1 align="center">
<img src="https://github.com/Ehviewer-Overhauled/Art/blob/master/launcher_icon-web.svg" width="200">
<img src="https://github.com/FooIbar/EhViewer-art/blob/master/launcher_icon-web.svg" width="200" alt="EhViewer">
<br>EhViewer<br>
</h1>
<p align="center">
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/actions/workflows/ci.yml">
<img src="https://github.com/Ehviewer-Overhauled/Ehviewer/actions/workflows/ci.yml/badge.svg" alt="Github Actions">
</a>
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/LICENSE">
<img src="https://img.shields.io/github/license/Ehviewer-Overhauled/Ehviewer" alt="LICENSE">
</a>
<a href="https://www.codefactor.io/repository/github/Ehviewer-Overhauled/ehviewer">
<img src="https://www.codefactor.io/repository/github/Ehviewer-Overhauled/ehviewer/badge" alt="CodeFactor">
</a>
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/releases">
<img src="https://img.shields.io/github/v/release/Ehviewer-Overhauled/ehviewer?include_prereleases" alt="Release">
</a>
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/issues">
<img src="https://img.shields.io/github/issues/Ehviewer-Overhauled/ehviewer" alt="Issues">
</a>
Standalone fork of
<a href="https://codeberg.org/EhViewer/EhViewer">EhViewer (codeberg)</a>
maintained at <a href="https://gitea.yrkaierx.com/yenru0/EhViewer">gitea.yrkaierx.com/yenru0/EhViewer</a>
</p>
<div align="center">
<h3>
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer#description">
Description
</a>
<span> | </span>
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer#download">
Download
</a>
<span> | </span>
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer#screenshot">
Screenshot
</a>
<span> | </span>
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer#thanks">
Thanks
</a>
<span> | </span>
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer#license">
License
</a>
</h3>
</div>
# Changes over upstream
- Built-in hosts, Cloudflare CDN fallback and domain fronting with SNI spoofing for censored networks (`EhHostsConfig.kt`, `EhDns.kt`, `EhSSLSocketFactory.kt`)
- Cronet engine disabled by default (bypasses the anti-DPI OkHttp stack; `enable_quic` re-enables it)
- Update check disabled by default (manual check still available)
- API request timeout raised to 30 s
- Own application id (`yenru0.yrkaierx.ehviewer`), installs side by side with upstream builds
# Description
EhViewer fork dedicated to lightweight and high-performance
with Material Design 3 and Dynamic Color Support
# Download
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/releases"><img alt="Get it on GitHub" src="https://github.com/Ehviewer-Overhauled/Art/blob/master/get-it-on-github.svg" width="200px"/></a> <a href="https://github.com/Ehviewer-Overhauled/fdroid-repo"><img alt="Get it on F-Droid" src="https://github.com/Ehviewer-Overhauled/Art/blob/master/get-it-on-fdroid.svg" width="200px"/></a>
# Screenshot
![screenshot-01](https://github.com/Ehviewer-Overhauled/Art/blob/master/screenshot-01.png)
![screenshot-02](https://github.com/Ehviewer-Overhauled/Art/blob/master/screenshot-02.png)
# Thanks
Here is the libraries
- [AOSP & AndroidX](http://source.android.com/)
- [Coil](https://coil-kt.github.io/coil/)
- [FullDraggableDrawer](https://github.com/PureWriter/FullDraggableDrawer)
- [GnuTLS](https://gnutls.org/)
- [material-components-android](https://github.com/material-components/material-components-android)
- [material-design-icons](https://github.com/google/material-design-icons)
- [jsoup](https://github.com/jhy/jsoup)
- [okhttp](https://github.com/square/okhttp)
- [RikkaX](https://github.com/RikkaApps/RikkaX)
- [libarchive](http://www.libarchive.org/)
- [XZ Utils](https://tukaani.org/xz/)
# Upstream
Synced from [EhViewer/EhViewer on codeberg](https://codeberg.org/EhViewer/EhViewer), the continuation of FooIbar's EhViewer. Feature work happens there; this fork tracks it and carries the network/resilience patches above.
# License
Copyright 2014-2019 Hippo Seven
Copyright 2020-2022 NekoInverter
Copyright 2022-2023 Tarsin Norbin
Copyright 2023-2024 Foolbar
EhViewer is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
-8
View File
@@ -1,8 +0,0 @@
/build
/src/main/java-gen
manifest-merger-release-report.txt
/src/main/libs
/src/main/obj
# Intellij
*.iml
/.cxx
+194 -142
View File
@@ -1,27 +1,32 @@
import java.io.ByteArrayOutputStream
import java.time.Instant
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter
import com.mikepenz.aboutlibraries.plugin.DuplicateMode
import com.mikepenz.aboutlibraries.plugin.DuplicateRule
import java.util.regex.Pattern
val isRelease: Boolean
get() = gradle.startParameter.taskNames.any { it.contains("Release") }
plugins {
id("com.android.application")
kotlin("android")
id("kotlin-parcelize")
kotlin("plugin.serialization")
id("com.google.devtools.ksp")
alias(libs.plugins.ehviewer.android.application)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.ksp)
alias(libs.plugins.aboutlibraries)
alias(libs.plugins.aboutlibrariesAndroid)
alias(libs.plugins.baselineprofile)
}
android {
compileSdk = 33
buildToolsVersion = "33.0.2"
ndkVersion = "25.2.9519653"
val supportedAbis = arrayOf("arm64-v8a", "x86_64", "armeabi-v7a")
android {
splits {
abi {
isEnable = true
reset()
include("arm64-v8a", "x86_64", "armeabi-v7a", "x86")
isUniversalApk = true
if (isRelease) {
include(*supportedAbis)
isUniversalApk = true
} else {
include("arm64-v8a", "x86_64")
}
}
}
@@ -30,49 +35,55 @@ android {
storePassword = "000000"
keyAlias = "key0"
keyPassword = "000000"
enableV3Signing = true
enableV4Signing = true
}
val commitSha by lazy {
val stdout = ByteArrayOutputStream()
exec {
commandLine = "git rev-parse --short=7 HEAD".split(' ')
standardOutput = stdout
}
stdout.toString().trim()
}
val commitSha = providers.exec {
commandLine = "git rev-parse --short=7 HEAD".split(' ')
}.standardOutput.asText.get().trim()
val buildTime by lazy {
val formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm").withZone(ZoneOffset.UTC)
formatter.format(Instant.now())
}
val commitTime = providers.exec {
commandLine = "git log -1 --format=%ct".split(' ')
}.standardOutput.asText.get().trim()
val repoName = providers.exec {
commandLine = "git remote get-url origin".split(' ')
}.standardOutput.asText.get().trim().removeSuffix(".git").removePrefix("https://codeberg.org/")
val snapshot = !hasProperty("release")
defaultConfig {
applicationId = "moe.tarsin.ehviewer"
minSdk = 28
targetSdk = 33
versionCode = 180034
versionName = "1.8.7.0-alpha"
resourceConfigurations.addAll(
listOf(
"zh",
"zh-rCN",
"zh-rHK",
"zh-rTW",
"es",
"ja",
"ko",
"fr",
"de",
"th",
"tr",
"nb-rNO"
)
)
applicationId = "yenru0.yrkaierx.ehviewer"
versionCode = 180064
versionName = if (snapshot) {
"1.15.0-SNAPSHOT"
} else {
"1.15.0"
}
buildConfigField("boolean", "SNAPSHOT", "$snapshot")
buildConfigField("String", "RAW_VERSION_NAME", "\"$versionName\"")
buildConfigField("String", "COMMIT_SHA", "\"$commitSha\"")
buildConfigField("String", "BUILD_TIME", "\"$buildTime\"")
buildConfigField("long", "COMMIT_TIME", commitTime)
buildConfigField("String", "REPO_NAME", "\"$repoName\"")
ndk {
if (isRelease) {
abiFilters.addAll(supportedAbis)
}
debugSymbolLevel = "FULL"
}
}
flavorDimensions += "api"
productFlavors {
create("default") {
minSdk = 26
}
create("marshmallow") {
applicationIdSuffix = ".m"
versionNameSuffix = "-M"
}
}
externalNativeBuild {
@@ -82,44 +93,49 @@ android {
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_19
targetCompatibility = JavaVersion.VERSION_19
}
kotlinOptions {
jvmTarget = "19"
freeCompilerArgs = listOf(
// https://kotlinlang.org/docs/compiler-reference.html#progressive
"-progressive",
"-opt-in=coil.annotation.ExperimentalCoilApi",
"-opt-in=androidx.compose.foundation.layout.ExperimentalLayoutApi",
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
"-opt-in=androidx.compose.ui.ExperimentalComposeUiApi",
"-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
"-opt-in=androidx.compose.animation.ExperimentalAnimationApi",
"-opt-in=kotlin.contracts.ExperimentalContracts",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=kotlinx.coroutines.FlowPreview",
"-opt-in=kotlinx.coroutines.InternalCoroutinesApi",
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
)
}
lint {
abortOnError = true
checkReleaseBuilds = false
disable.add("MissingTranslation")
isCoreLibraryDesugaringEnabled = true
}
packaging {
resources {
excludes += "/META-INF/CHANGES"
excludes += "/META-INF/README.md"
excludes += "/kotlin/**"
excludes += "**.txt"
excludes += "**.bin"
dex {
useLegacyPackaging = false
}
jniLibs {
excludes += "**/libdatastore_shared_counter.so" // DataStore multi-process
}
resources {
// Required by Layout Inspector
pickFirsts += "/META-INF/androidx.compose.ui_ui.version"
excludes += listOf(
"/META-INF/**",
"/kotlin/**",
"**.txt",
"**.bin",
)
}
}
androidResources {
ignoreAssetsPatterns += listOf(
"!PublicSuffixDatabase.list", // OkHttp
"!composepreference.preference.generated.resources",
)
generateLocaleConfig = true
localeFilters += listOf(
"zh",
"zh-rCN",
"zh-rHK",
"zh-rTW",
"es",
"ja",
"ko",
"fr",
"de",
"th",
"tr",
"nb-rNO",
)
}
dependenciesInfo.includeInApk = false
@@ -134,91 +150,127 @@ android {
debug {
applicationIdSuffix = ".debug"
}
create("benchmarkRelease") {
initWith(buildTypes.getByName("release"))
matchingFallbacks += listOf("release")
applicationIdSuffix = ".benchmark"
signingConfig = signingConfigs.getByName("debug")
isDebuggable = false
}
}
buildFeatures {
buildConfig = true
compose = true
viewBinding = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.3"
}
namespace = "com.hippo.ehviewer"
}
baselineProfile {
mergeIntoMain = true
}
dependencies {
implementation(projects.core.data)
implementation(projects.core.i18n)
implementation(projects.core.ui)
// https://developer.android.com/jetpack/androidx/releases/activity
implementation("androidx.activity:activity-compose:1.6.1")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.biometric:biometric-ktx:1.2.0-alpha05")
implementation("androidx.browser:browser:1.5.0")
implementation("androidx.collection:collection-ktx:1.3.0-alpha02")
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.biometric)
implementation(libs.androidx.browser)
implementation(libs.androidx.webkit)
// https://developer.android.com/jetpack/androidx/releases/compose-material3
implementation(platform("androidx.compose:compose-bom:2023.01.00"))
implementation("androidx.compose.material:material-icons-extended")
implementation("androidx.compose.material3:material3")
implementation(libs.compose.destinations.core)
ksp(libs.compose.destinations.compiler)
implementation("androidx.core:core-ktx:1.10.0-beta01")
implementation(libs.compose.preference) {
// R8 won't remove it because it adds a content provider
exclude(group = "org.jetbrains.compose.components", module = "components-resources")
}
implementation(libs.androidx.core)
implementation(libs.androidx.core.splashscreen)
implementation(libs.androidx.datastore)
implementation("androidx.constraintlayout:constraintlayout:2.2.0-alpha07")
implementation("androidx.coordinatorlayout:coordinatorlayout:1.2.0")
// https://developer.android.com/jetpack/androidx/releases/lifecycle
implementation("androidx.lifecycle:lifecycle-process:2.5.1")
// https://developer.android.com/jetpack/androidx/releases/navigation
val nav_version = "2.5.3"
implementation("androidx.navigation:navigation-fragment-ktx:$nav_version")
implementation("androidx.navigation:navigation-ui-ktx:$nav_version")
implementation("androidx.navigation:navigation-compose:$nav_version")
implementation(libs.androidx.lifecycle.process)
implementation(libs.androidx.lifecycle.compose)
// https://developer.android.com/jetpack/androidx/releases/paging
implementation("androidx.paging:paging-runtime-ktx:3.2.0-alpha04")
implementation("androidx.paging:paging-compose:1.0.0-alpha18")
implementation("androidx.preference:preference-ktx:1.2.0")
implementation("androidx.recyclerview:recyclerview:1.3.0-rc01")
implementation(libs.androidx.paging.compose)
// https://developer.android.com/jetpack/androidx/releases/room
val room_version = "2.5.0"
ksp("androidx.room:room-compiler:$room_version")
implementation("androidx.room:room-paging:$room_version")
implementation(libs.androidx.room.paging)
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01")
implementation("androidx.work:work-runtime-ktx:2.8.0")
implementation("com.drakeet.drawer:drawer:1.0.3")
implementation("com.github.chrisbanes:PhotoView:2.3.0") // Dead Dependency
implementation("com.github.tachiyomiorg:DirectionalViewPager:1.0.0") // Dead Dependency
// https://github.com/google/accompanist/releases
implementation("com.google.accompanist:accompanist-themeadapter-material3:0.28.0")
implementation("com.google.android.material:material:1.8.0")
implementation(libs.androidx.work.runtime)
implementation(libs.material.motion.core)
implementation(libs.material.kolor)
implementation(libs.bundles.splitties)
// https://square.github.io/okhttp/changelogs/changelog/
implementation("com.squareup.okhttp3:okhttp-bom:5.0.0-alpha.11")
implementation("com.squareup.okhttp3:okhttp-coroutines")
implementation(platform(libs.okhttp.bom))
implementation("com.squareup.okio:okio-jvm:3.3.0")
implementation(libs.logcat)
implementation(libs.diff)
implementation(libs.aboutlibraries.core)
implementation(libs.aboutlibraries.compose.m3)
implementation(libs.accompanist.drawable.painter)
implementation(libs.reorderable)
implementation(platform(libs.arrow.stack))
implementation(libs.bundles.arrow)
implementation("dev.chrisbanes.insetter:insetter:0.6.1") // Dead Dependency
implementation("dev.rikka.rikkax.core:core-ktx:1.4.1")
implementation("dev.rikka.rikkax.insets:insets:1.3.0")
implementation("dev.rikka.rikkax.layoutinflater:layoutinflater:1.2.0")
implementation("dev.rikka.rikkax.preference:simplemenu-preference:1.0.3")
implementation("dev.rikka.rikkax.material:material-preference:2.0.0")
// https://coil-kt.github.io/coil/changelog/
implementation("io.coil-kt:coil-compose:2.2.2")
implementation(platform(libs.coil.bom))
implementation(libs.bundles.coil)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-cbor:1.5.0-RC")
implementation("org.jsoup:jsoup:1.15.4")
implementation(libs.telephoto.zoomable)
implementation(libs.ktor.client.okhttp)
implementation(libs.bundles.kotlinx.serialization)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.kotlinx.datetime)
coreLibraryDesugaring(libs.desugar)
implementation(libs.androidx.profileinstaller)
"baselineProfile"(project(":benchmark"))
debugImplementation(libs.compose.ui.tooling)
implementation(libs.compose.ui.tooling.preview)
}
configurations.all {
exclude("dev.rikka.rikkax.appcompat", "appcompat")
exclude("dev.rikka.rikkax.material", "material")
exclude("org.jetbrains.kotlin", "kotlin-android-extensions-runtime")
exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk7")
exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
kotlin {
compilerOptions {
optIn.addAll(
"coil3.annotation.ExperimentalCoilApi",
"androidx.paging.ExperimentalPagingApi",
"me.saket.telephoto.ExperimentalTelephotoApi",
)
}
}
ksp {
arg("compose-destinations.codeGenPackageName", "com.hippo.ehviewer.ui")
}
aboutLibraries {
collect {
includePlatform = false
}
library {
exclusionPatterns.add(Pattern.compile("org\\.jetbrains\\.(?:compose|androidx)\\..*"))
duplicationMode = DuplicateMode.MERGE
duplicationRule = DuplicateRule.GROUP
}
}
+20 -12
View File
@@ -1,24 +1,32 @@
-keepclassmembers class * implements android.os.Parcelable {
public static final ** CREATOR;
}
-keepclasseswithmembernames,includedescriptorclasses class * {
native <methods>;
}
# https://issuetracker.google.com/issues/190382641
-keepclassmembers class kotlin.SafePublicationLazyImpl {
java.lang.Object _value;
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class androidx.viewpager.widget.ViewPager$LayoutParams { int position; }
-keepclassmembers class * implements android.os.Parcelable {
public static final ** CREATOR;
}
-keepclassmembers,allowobfuscation class com.hippo.ehviewer.coil.AnimatedWebPDrawable {
java.nio.ByteBuffer source;
}
-assumevalues public class androidx.compose.runtime.ComposeRuntimeFlags {
static boolean isLinkBufferComposerEnabled() return true;
}
# Ktor logger
-dontwarn org.slf4j.impl.StaticLoggerBinder
-keepattributes LineNumberTable,SourceFile
-renamesourcefileattribute SourceFile
# https://issuetracker.google.com/222232895
-dontwarn androidx.window.extensions.**
-dontwarn androidx.window.sidecar.Sidecar*
-keepattributes LineNumberTable
-repackageclasses
-allowaccessmodification
-overloadaggressively
-repackageclasses
+40 -58
View File
@@ -12,7 +12,8 @@
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />
@@ -27,23 +28,21 @@
android:hasFragileUserData="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:localeConfig="@xml/locales_config"
android:largeHeap="@bool/large_heap"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:targetApi="tiramisu">
<activity
android:name=".ui.login.LoginActivity"
android:exported="false"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"/>
<profileable android:shell="true" />
<activity
android:name=".ui.MainActivity"
android:banner="@mipmap/ic_leanback_banner"
android:configChanges="screenSize"
android:configChanges="orientation|screenLayout|screenSize|smallestScreenSize"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/AppTheme.Splash"
android:windowSoftInputMode="adjustResize|stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -70,8 +69,39 @@
<data android:scheme="https" />
<data android:host="exhentai.org" />
<data android:host="e-hentai.org" />
<data android:host="g.e-hentai.org" />
<data android:host="lofi.e-hentai.org" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="file" />
<data android:scheme="content" />
<data android:host="*" />
<data android:mimeType="application/octet-stream" />
<data android:mimeType="application/zip" />
<data android:mimeType="application/x-7z-compressed" />
<data android:mimeType="application/x-tar" />
<data android:mimeType="application/x-xz" />
<data android:mimeType="application/gzip" />
<data android:mimeType="application/vnd.rar" />
<data android:mimeType="application/vnd.comicbook+zip" />
<data android:mimeType="application/vnd.comicbook-rar" />
<!-- unofficial -->
<data android:mimeType="application/7z" />
<data android:mimeType="application/rar" />
<data android:mimeType="application/x-cbz" />
<data android:mimeType="application/x-cbr" />
<data android:mimeType="application/x-cbt" />
<data android:mimeType="application/x-cb7" />
<data android:mimeType="application/x-zip-compressed" />
<data android:mimeType="application/x-rar-compressed" />
<data android:mimeType="application/x-compressed-tar" />
<data android:mimeType="application/x-bzip-compressed-tar" />
<data android:mimeType="application/x-lzma-compressed-tar" />
<data android:mimeType="application/x-xz-compressed-tar" />
</intent-filter>
<intent-filter android:label="@string/keyword_search">
<action android:name="android.intent.action.SEND" />
@@ -88,54 +118,6 @@
<data android:mimeType="image/*" />
</intent-filter>
</activity>
<activity
android:name="eu.kanade.tachiyomi.ui.reader.ReaderActivity"
android:configChanges="screenSize"
android:exported="true"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="file" />
<data android:scheme="content" />
<data android:host="*" />
<data android:mimeType="application/octet-stream" />
<data android:mimeType="application/7z" />
<data android:mimeType="application/rar" />
<data android:mimeType="application/zip" />
<data android:mimeType="application/x-7z-compressed" />
<data android:mimeType="application/x-rar-compressed" />
<data android:mimeType="application/x-zip-compressed" />
<data android:mimeType="application/x-tar" />
<data android:mimeType="application/x-xz" />
<data android:mimeType="application/gzip" />
<data android:mimeType="application/x-cbz" />
<data android:mimeType="application/x-cbr" />
<data android:mimeType="application/x-cbt" />
<data android:mimeType="application/x-cb7" />
<!-- untested -->
<data android:mimeType="application/vnd.comicbook+zip" />
<data android:mimeType="application/vnd.comicbook-rar" />
<data android:mimeType="application/x-compressed-tar" />
<data android:mimeType="application/x-bzip-compressed-tar" />
<data android:mimeType="application/x-lzma-compressed-tar" />
<data android:mimeType="application/x-xz-compressed-tar" />
</intent-filter>
</activity>
<activity
android:name=".ui.SettingsActivity"
android:configChanges="screenSize"
android:label="@string/settings"
android:theme="@style/AppTheme" />
<activity
android:name=".ui.SecurityActivity"
android:configChanges="screenSize"
android:label="@string/settings"
android:theme="@style/AppTheme" />
<activity
android:name=".shortcuts.ShortcutsActivity"
android:excludeFromRecents="true"
@@ -0,0 +1,25 @@
From e971b9f23727833cc39b9e325db30f383e5bfc30 Mon Sep 17 00:00:00 2001
From: Dude so hot <djohn@fbi.gov>
Date: Thu, 14 Nov 2024 00:28:13 +0800
Subject: [PATCH] Fix zip_time performance
Signed-off-by: Dude so hot <djohn@fbi.gov>
---
libarchive/archive_time.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libarchive/archive_time.c b/libarchive/archive_time.c
index 3352c809..9289bf1e 100644
--- a/libarchive/archive_time.c
+++ b/libarchive/archive_time.c
@@ -53,6 +53,7 @@ FILETIME_to_ntfs(const FILETIME* filetime)
int64_t
dos_to_unix(uint32_t dos_time)
{
+ return 0;
uint16_t msTime, msDate;
struct tm ts;
time_t t;
--
2.47.0
@@ -0,0 +1,27 @@
From 86d199429b3fabc83f7dcc9afd72e7b4c7750b1a Mon Sep 17 00:00:00 2001
From: FooIbar <118464521+FooIbar@users.noreply.github.com>
Date: Thu, 14 Nov 2024 20:22:52 +0800
Subject: [PATCH] Use UTF-8 as default charset on bionic
---
libarchive/archive_string.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libarchive/archive_string.c b/libarchive/archive_string.c
index abf7ad66..63a73c58 100644
--- a/libarchive/archive_string.c
+++ b/libarchive/archive_string.c
@@ -423,7 +423,9 @@ static const char *
default_iconv_charset(const char *charset) {
if (charset != NULL && charset[0] != '\0')
return charset;
-#if HAVE_LOCALE_CHARSET && !defined(__APPLE__)
+#ifdef __BIONIC__
+ return "UTF-8";
+#elif HAVE_LOCALE_CHARSET && !defined(__APPLE__)
/* locale_charset() is broken on Mac OS */
return locale_charset();
#elif HAVE_NL_LANGINFO
--
2.43.0
+141 -27
View File
@@ -1,24 +1,79 @@
project(ehviewer)
cmake_minimum_required(VERSION 3.4.1)
cmake_minimum_required(VERSION 3.14)
project(ehviewer C)
include(ExternalProject)
include(FetchContent)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Ofast -fvisibility=hidden -fvisibility-inlines-hidden -ffunction-sections -fdata-sections -funroll-loops -flto=thin \
-mllvm -polly \
-mllvm -polly-run-dce \
-mllvm -polly-run-inliner \
-mllvm -polly-isl-arg=--no-schedule-serialize-sccs \
-mllvm -polly-ast-use-context \
-mllvm -polly-detect-keep-going \
-mllvm -polly-position=before-vectorizer \
-mllvm -polly-vectorizer=stripmine \
-mllvm -polly-detect-profitability-min-per-loop-insts=40 \
-mllvm -polly-invariant-load-hoisting")
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
string(CONCAT CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -ffast-math -fvisibility=hidden -fvisibility-inlines-hidden -funroll-loops -flto "
"-ffile-prefix-map=${ANDROID_TOOLCHAIN_ROOT}= "
"-ffile-prefix-map=${CMAKE_SOURCE_DIR}= "
"-ffile-prefix-map=${CMAKE_BINARY_DIR}= "
"-mllvm -polly "
"-mllvm -polly-run-dce "
"-mllvm -polly-run-inliner "
"-mllvm -polly-isl-arg=--no-schedule-serialize-sccs "
"-mllvm -polly-ast-use-context "
"-mllvm -polly-detect-keep-going "
"-mllvm -polly-position=before-vectorizer "
"-mllvm -polly-vectorizer=stripmine "
"-mllvm -polly-detect-profitability-min-per-loop-insts=40 "
"-mllvm -polly-invariant-load-hoisting")
endif (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
option(BUILD_TESTING OFF)
option(XZ_DOC OFF)
option(XZ_LZIP_DECODER OFF)
option(XZ_MICROLZMA_DECODER OFF)
option(XZ_MICROLZMA_ENCODER OFF)
option(XZ_TOOL_LZMADEC OFF)
option(XZ_TOOL_LZMAINFO OFF)
option(XZ_TOOL_XZ OFF)
option(XZ_TOOL_XZDEC OFF)
FetchContent_Declare(
liblzma
GIT_REPOSITORY https://github.com/tukaani-project/xz.git
GIT_TAG v5.8.3
GIT_SHALLOW 1
)
FetchContent_MakeAvailable(liblzma)
include_directories(${liblzma_SOURCE_DIR}/src/liblzma/api)
# Build GNUTLS libnettle
add_subdirectory(nettle)
if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
set(NDK_VERSION "${ANDROID_NDK_MAJOR}.${ANDROID_NDK_MINOR}.${ANDROID_NDK_BUILD}")
set(TOOLCHAIN "$ANDROID_HOME/ndk/${NDK_VERSION}/toolchains/llvm/prebuilt/linux-x86_64/bin")
set(WSL wsl)
else ()
set(TOOLCHAIN "${ANDROID_TOOLCHAIN_ROOT}/bin")
endif ()
set(CONFIGURE_COMMAND ${WSL} ./.bootstrap && ${WSL} ./configure --disable-public-key --disable-dependency-tracking
"--host=${CMAKE_C_COMPILER_TARGET}"
"CFLAGS=${CMAKE_C_FLAGS} -Qunused-arguments"
"AR=${TOOLCHAIN}/llvm-ar"
"CC=${TOOLCHAIN}/clang --target=${CMAKE_C_COMPILER_TARGET}"
"RANLIB=${TOOLCHAIN}/llvm-ranlib"
)
ExternalProject_Add(
nettle
GIT_REPOSITORY https://gitlab.com/gnutls/nettle.git
GIT_TAG nettle_4.0_release_20260205
GIT_SHALLOW 1
GIT_CONFIG core.autocrlf=input
CONFIGURE_COMMAND ${CONFIGURE_COMMAND}
BUILD_COMMAND ${WSL} make -j4 libnettle.a
INSTALL_COMMAND ""
BUILD_IN_SOURCE 1
BUILD_BYPRODUCTS <SOURCE_DIR>/libnettle.a
)
ExternalProject_Get_Property(nettle SOURCE_DIR)
include_directories(${SOURCE_DIR}/..)
add_library(libnettle STATIC IMPORTED)
set_property(TARGET libnettle PROPERTY IMPORTED_LOCATION ${SOURCE_DIR}/libnettle.a)
add_dependencies(libnettle nettle)
# Configure libnettle support for libarchive
include_directories(nettle)
include_directories(.)
set(HAVE_LIBNETTLE 1)
set(HAVE_NETTLE_AES_H 1)
set(HAVE_NETTLE_HMAC_H 1)
@@ -27,24 +82,83 @@ set(HAVE_NETTLE_PBKDF2_H 1)
set(HAVE_NETTLE_RIPEMD160_H 1)
set(HAVE_NETTLE_SHA_H 1)
# Build liblzma
add_subdirectory(liblzma)
# Configure lzma support for libarchive
include_directories(liblzma/src/liblzma/api)
SET(HAVE_LIBLZMA 1)
SET(HAVE_LZMA_H 1)
SET(HAVE_LZMA_STREAM_ENCODER_MT 1)
SET(HAVE_LZMADEC_H 1)
SET(HAVE_LIBLZMADEC 1)
# Configure libarchive link's static lib
SET(LIBARCHIVE_CUSTOM_LIBS "liblzma" "nettle")
option(ENABLE_OPENSSL OFF)
option(ENABLE_TAR OFF)
option(ENABLE_CPIO OFF)
option(ENABLE_CAT OFF)
option(ENABLE_UNZIP OFF)
option(ENABLE_TEST OFF)
# Build libarchive
add_subdirectory(libarchive)
set(LIBARCHIVE_PATCH
${CMAKE_CURRENT_LIST_DIR}/0001-Fix-zip_time-performance.patch
${CMAKE_CURRENT_LIST_DIR}/0002-Use-UTF-8-as-default-charset-on-bionic.patch
)
FetchContent_Declare(
libarchive
GIT_REPOSITORY https://github.com/libarchive/libarchive.git
GIT_TAG v3.8.7
GIT_SHALLOW 1
PATCH_COMMAND git apply --check -R ${LIBARCHIVE_PATCH} || git apply ${LIBARCHIVE_PATCH}
)
FetchContent_MakeAvailable(libarchive)
target_link_libraries(archive_static liblzma libnettle)
include_directories(${libarchive_SOURCE_DIR}/libarchive)
FetchContent_Declare(
libwebp
GIT_REPOSITORY https://github.com/webmproject/libwebp.git
GIT_TAG v1.6.0
GIT_SHALLOW 1
)
option(WEBP_BUILD_ANIM_UTILS OFF)
option(WEBP_BUILD_CWEBP OFF)
option(WEBP_BUILD_DWEBP OFF)
option(WEBP_BUILD_VWEBP OFF)
option(WEBP_BUILD_WEBPINFO OFF)
option(WEBP_BUILD_LIBWEBPMUX OFF)
option(WEBP_BUILD_EXTRAS OFF)
option(WEBP_ENABLE_SWAP_16BIT_CSP ON)
# Disable runtime detection of NEON support as NEON is required since API level 23
# https://source.android.com/docs/compatibility/6.0/android-6.0-cdd#3_3_1_application_binary_interfaces
unset(ANDROID)
FetchContent_MakeAvailable(libwebp)
if (CMAKE_SYSTEM_NAME STREQUAL "Android")
set(ANDROID 1)
endif ()
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ../../../../rust-toolchain.toml)
unset(Rust_TOOLCHAIN CACHE)
FetchContent_Declare(
Corrosion
GIT_REPOSITORY https://github.com/FooIbar/corrosion.git
GIT_TAG v0.6.1
GIT_SHALLOW 1
)
FetchContent_MakeAvailable(Corrosion)
corrosion_import_crate(
MANIFEST_PATH ../rust/Cargo.toml
LOCKED
FEATURES $<IF:$<VERSION_GREATER_EQUAL:${ANDROID_NATIVE_API_LEVEL},26>,android-26,android>
FLAGS $<$<NOT:$<CONFIG:Debug>>:-Z build-std -Z build-std-features=>
)
corrosion_add_target_rustflags(ehviewer_rust $<$<NOT:$<CONFIG:Debug>>:-Z unstable-options -C panic=immediate-abort -Z location-detail=none -Z fmt-debug=none>)
corrosion_link_libraries(ehviewer_rust android jnigraphics log webp webpdemux)
# Build and link our app's native lib
add_library(${PROJECT_NAME} SHARED archive.c fdutils.c gifutils.c natsort/strnatcmp.c)
target_include_directories(${PROJECT_NAME} PUBLIC libarchive/libarchive)
target_link_libraries(${PROJECT_NAME} archive_static log -Wl,--gc-sections)
add_library(${PROJECT_NAME} SHARED archive.c gifutils.c hash.c natsort/strnatcmp.c)
target_link_libraries(
${PROJECT_NAME} archive_static ehviewer_rust
-Wl,-u,JNI_OnLoad -Wl,--undefined-glob,Java_*
-Wl,--version-script,${CMAKE_SOURCE_DIR}/libehviewer.map.txt
)
+232 -223
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Tarsin Norbin
* Copyright 2022-2024 Tarsin Norbin
*
* This file is part of EhViewer
*
@@ -45,33 +45,29 @@ typedef struct {
typedef struct {
const char *filename;
int index;
size_t size;
ssize_t size;
void *addr;
} entry;
pthread_mutex_t ctx_lock;
static archive_ctx **ctx_pool;
#define CTX_POOL_SIZE 20
#define MAX_PARALLEL_DECOMP 4
#define max(a, b) ((a) > (b) ? (a) : (b))
static void *mempool = NULL;
static size_t *mempoolofs = NULL;
#define PAGE_ALIGN(x) ((x + ~PAGE_MASK) & PAGE_MASK)
#define MEMPOOL_ADDR_BY_SORTED_IDX(x) (mempool + (index ? mempoolofs[index - 1] : 0))
#define MEMPOOL_SIZE (mempoolofs[entryCount - 1])
#define MEMPOOL_ENTITY_SIZE(x) PAGE_ALIGN(entries[x].size)
#define PROT_RW (PROT_WRITE | PROT_READ)
#define MAP_ANON_POOL (MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE | MAP_UNINITIALIZED)
static pthread_mutex_t ctx_pool_mutex = PTHREAD_MUTEX_INITIALIZER;
static archive_ctx **ctx_pool = NULL;
static pthread_mutex_t buffer_mutex = PTHREAD_MUTEX_INITIALIZER;
static void *decode_buffer[MAX_PARALLEL_DECOMP];
static bool need_encrypt = false;
static char *passwd = NULL;
static void *archiveAddr = NULL;
static void *archiveAddr = MAP_FAILED;
static size_t archiveSize = 0;
static entry *entries = NULL;
static size_t entryCount = 0;
static ssize_t max_file_size = 0;
const char supportExt[9][6] = {
#define SUPPORT_EXT_COUNT 11
const char supportExt[SUPPORT_EXT_COUNT][5] = {
"jpeg",
"jpg",
"png",
@@ -80,92 +76,104 @@ const char supportExt[9][6] = {
"bmp",
"ico",
"wbmp",
"heif"
"heic",
"heif",
"avif"
};
static inline int filename_is_playable_file(const char *name) {
if (!name)
return false;
const char *dotptr = strrchr(name, '.');
if (!dotptr++)
return false;
int i;
for (i = 0; i < 9; i++)
for (i = 0; i < SUPPORT_EXT_COUNT; i++)
if (strcmp(dotptr, supportExt[i]) == 0)
return true;
return false;
}
static inline bool archive_entry_is_file(struct archive_entry *entry) {
return archive_entry_filetype(entry) == AE_IFREG;
}
static inline bool archive_entry_is_playable(struct archive_entry *entry) {
return archive_entry_is_file(entry) &&
filename_is_playable_file(archive_entry_pathname(entry));
}
static inline int compare_entries(const void *a, const void *b) {
const char *fa = ((entry *) a)->filename;
const char *fb = ((entry *) b)->filename;
return strnatcmp(fa, fb);
}
static long archive_map_entries_index(archive_ctx *ctx) {
long count = 0;
#define ADDR_IN_FILE_MAPPING(addr) (addr >= archiveAddr && addr < archiveAddr + archiveSize)
static bool fill_entry_zero_copy(struct archive *arc, entry *entry) {
void *buffer = NULL;
size_t buffer_size = 0;
la_int64_t output_ofs = 0;
archive_read_data_block(arc, (const void **) &buffer, &buffer_size, &output_ofs);
bool zero_copy = ADDR_IN_FILE_MAPPING(buffer) && !output_ofs && buffer_size == entry->size;
entry->addr = zero_copy ? buffer : NULL;
return zero_copy;
}
static void archive_map_entries_index(archive_ctx *ctx, bool sort) {
int count = 0;
bool zero_copy = true;
while (archive_read_next_header(ctx->arc, &ctx->entry) == ARCHIVE_OK) {
const char *name = archive_entry_pathname(ctx->entry);
if (filename_is_playable_file(name)) {
if (archive_entry_is_file(ctx->entry) && filename_is_playable_file(name)) {
entries[count].filename = strdup(name);
entries[count].index = count;
entries[count].size = archive_entry_size(ctx->entry);
ssize_t size = archive_entry_size(ctx->entry);
max_file_size = max(size, max_file_size);
entries[count].size = size;
// We don't expect zero copy if first content can't do zero copy
if (zero_copy) zero_copy = fill_entry_zero_copy(ctx->arc, &entries[count]);
count++;
}
}
if (!count)
LOGE("%s", archive_error_string(ctx->arc));
qsort(entries, entryCount, sizeof(entry), compare_entries);
return count;
if (sort) qsort(entries, entryCount, sizeof(entry), compare_entries);
}
static bool archive_prealloc_mempool() {
mempoolofs = calloc(entryCount, sizeof(size_t));
for (int i = 0; i < entryCount; ++i) {
if (!i)
mempoolofs[i] = PAGE_ALIGN(entries[i].size);
else
mempoolofs[i] = PAGE_ALIGN(entries[i].size) + mempoolofs[i - 1];
static void *acquire_decode_buffer() {
void *addr = NULL;
pthread_mutex_lock(&buffer_mutex);
for (int i = 0; i < MAX_PARALLEL_DECOMP; ++i) {
addr = decode_buffer[i];
if (addr) {
decode_buffer[i] = NULL;
break;
}
}
mempool = mmap(0, MEMPOOL_SIZE, PROT_RW, MAP_ANON_POOL, -1, 0);
if (mempool == MAP_FAILED) {
LOGE("%s%s", "mmap failed with error ", strerror(errno));
return false;
pthread_mutex_unlock(&buffer_mutex);
if (!addr) addr = malloc(max_file_size);
return addr;
}
static void release_decode_buffer(void *buffer) {
pthread_mutex_lock(&buffer_mutex);
for (int i = 0; i < MAX_PARALLEL_DECOMP; ++i) {
void *addr = decode_buffer[i];
if (!addr) {
decode_buffer[i] = buffer;
pthread_mutex_unlock(&buffer_mutex);
return;
}
}
return true;
pthread_mutex_unlock(&buffer_mutex);
free(buffer);
}
// Mincore does not support anon mapping yet
// Now that we use MADV_FREE, how can we detect whether pages is reclaimed?
static bool is_mempool_pages_present_and_lock(int index) {
void *addr = MEMPOOL_ADDR_BY_SORTED_IDX(index);
size_t size = MEMPOOL_ENTITY_SIZE(index);
mlock(addr, size);
#if 0
unsigned char vec[size / PAGE_SIZE];
unsigned char r = 1;
mincore(addr, size, vec);
for (int i = 0; i < size / PAGE_SIZE; ++i) r &= vec[i];
return r;
#endif
return false;
}
#define MEMPOOL_IN_CORE_AND_LOCK(x) is_mempool_pages_present_and_lock(x)
static void mempool_release_pages(void *addr, size_t size) {
size = PAGE_ALIGN(size);
munlock(addr, size);
int ret = madvise(addr, size, MADV_FREE);
if (ret == -EINVAL) madvise(addr, size, MADV_DONTNEED);
}
static long archive_list_all_entries(archive_ctx *ctx) {
long count = 0;
static int archive_list_all_entries(archive_ctx *ctx) {
int count = 0;
while (archive_read_next_header(ctx->arc, &ctx->entry) == ARCHIVE_OK)
if (filename_is_playable_file(archive_entry_pathname(ctx->entry)))
if (archive_entry_is_playable(ctx->entry))
count++;
if (!count)
LOGE("%s", archive_error_string(ctx->arc));
return count;
}
@@ -177,18 +185,10 @@ static void archive_release_ctx(archive_ctx *ctx) {
}
}
static int archive_alloc_ctx(archive_ctx **ctxptr) {
archive_ctx *ctx;
int err;
ctx = calloc(1, sizeof(archive_ctx));
if (!ctx)
return -ENOMEM;
static archive_ctx *archive_alloc_ctx() {
archive_ctx *ctx = calloc(1, sizeof(archive_ctx));
ctx->arc = archive_read_new();
ctx->using = 1;
if (!ctx->arc) {
free(ctx);
return -ENOMEM;
}
archive_read_support_format_tar(ctx->arc);
archive_read_support_format_7zip(ctx->arc);
archive_read_support_format_rar5(ctx->arc);
@@ -198,19 +198,19 @@ static int archive_alloc_ctx(archive_ctx **ctxptr) {
archive_read_set_option(ctx->arc, "zip", "ignorecrc32", "1");
if (passwd)
archive_read_add_passphrase(ctx->arc, passwd);
err = archive_read_open_memory(ctx->arc, archiveAddr, archiveSize);
if (err) {
int err = archive_read_open_memory(ctx->arc, archiveAddr, archiveSize);
if (err < ARCHIVE_OK) {
LOGE("%s%s", "Open archive failed: ", archive_error_string(ctx->arc));
archive_read_free(ctx->arc);
free(ctx);
return err;
return NULL;
}
*ctxptr = ctx;
return 0;
return ctx;
}
static int archive_skip_to_index(archive_ctx *ctx, int index) {
while (archive_read_next_header(ctx->arc, &ctx->entry) == ARCHIVE_OK) {
if (!filename_is_playable_file(archive_entry_pathname(ctx->entry)))
if (!archive_entry_is_playable(ctx->entry))
continue;
if (ctx->next_index++ == index) {
return ctx->next_index - 1;
@@ -222,7 +222,7 @@ static int archive_skip_to_index(archive_ctx *ctx, int index) {
static int archive_get_ctx(archive_ctx **ctxptr, int idx) {
int ret;
archive_ctx *ctx = NULL;
pthread_mutex_lock(&ctx_lock);
pthread_mutex_lock(&ctx_pool_mutex);
for (int i = 0; i < CTX_POOL_SIZE; i++) {
if (!ctx_pool[i])
continue;
@@ -237,16 +237,14 @@ static int archive_get_ctx(archive_ctx **ctxptr, int idx) {
}
if (ctx)
ctx->using = 1;
pthread_mutex_unlock(&ctx_lock);
pthread_mutex_unlock(&ctx_pool_mutex);
if (!ctx) {
archive_ctx *victimCtx = NULL;
int victimIdx = 0;
int replace = 1;
ret = archive_alloc_ctx(&ctx);
if (ret)
return ret;
pthread_mutex_lock(&ctx_lock);
ctx = archive_alloc_ctx();
pthread_mutex_lock(&ctx_pool_mutex);
for (int i = 0; i < CTX_POOL_SIZE; i++) {
if (!ctx_pool[i]) {
ctx_pool[i] = ctx;
@@ -260,16 +258,14 @@ static int archive_get_ctx(archive_ctx **ctxptr, int idx) {
victimIdx = i;
}
}
if (replace) {
archive_release_ctx(victimCtx);
ctx_pool[victimIdx] = ctx;
}
pthread_mutex_unlock(&ctx_lock);
if (replace) ctx_pool[victimIdx] = ctx;
pthread_mutex_unlock(&ctx_pool_mutex);
if (replace) archive_release_ctx(victimCtx);
}
ret = archive_skip_to_index(ctx, idx);
if (ret != idx) {
ret = archive_errno(ctx->arc);
LOGE("Skip to index failed:%s", archive_error_string(ctx->arc));
LOGE("Skip to index failed: %s", archive_error_string(ctx->arc));
archive_release_ctx(ctx);
return ret;
}
@@ -278,163 +274,146 @@ static int archive_get_ctx(archive_ctx **ctxptr, int idx) {
}
JNIEXPORT jint JNICALL
Java_com_hippo_UriArchiveAccessor_openArchive(JNIEnv *env, jobject thiz, jint fd, jlong size) {
Java_com_hippo_ehviewer_jni_ArchiveKt_openArchive(JNIEnv *env, jclass thiz, jint fd, jlong size, jboolean sort_entries) {
EH_UNUSED(env);
EH_UNUSED(thiz);
archive_ctx *ctx = NULL;
int mmap_flags = MAP_PRIVATE;
archiveAddr = mmap64(0, size, PROT_READ, mmap_flags, fd, 0);
archiveAddr = mmap(0, size, PROT_READ, MAP_PRIVATE, fd, 0);
if (archiveAddr == MAP_FAILED) {
LOGE("%s%s", "mmap64 failed with error ", strerror(errno));
LOGE("%s%s", "mmap failed with error ", strerror(errno));
return 0;
}
archiveSize = size;
madvise_log_if_error(archiveAddr, archiveSize, MADV_WILLNEED);
pthread_mutex_init(&ctx_lock, 0);
ctx_pool = calloc(CTX_POOL_SIZE, sizeof(archive_ctx **));
if (!ctx_pool) {
LOGE("Allocate archive ctx pool failed:ENOMEM");
ctx = archive_alloc_ctx();
if (!ctx) return 0;
entryCount = archive_list_all_entries(ctx);
LOGI("%s%zu%s", "Found ", entryCount, " images in archive");
if (!entryCount) {
LOGE("%s%s", "Archive read failed: ", archive_error_string(ctx->arc));
archive_release_ctx(ctx);
return 0;
}
long r = archive_alloc_ctx(&ctx);
if (r) {
if (r == -ENOMEM)
LOGE("%s", "Mem alloc failed");
LOGE("%s%s", "Archive open failed:", archive_error_string(ctx->arc));
} else {
entryCount = archive_list_all_entries(ctx);
LOGI("%s%zu%s", "Found ", entryCount, " image entries in archive");
// We must read through the file|vm then we can know whether it is encrypted
int encryptRet = archive_read_has_encrypted_entries(ctx->arc);
switch (encryptRet) {
case 1: // At lease 1 encrypted entry
need_encrypt = true;
break;
case 0: // format supports but no encrypted entry found
default:
need_encrypt = false;
}
int format = archive_format(ctx->arc);
switch (format) {
case ARCHIVE_FORMAT_ZIP:
case ARCHIVE_FORMAT_RAR_V5:
madvise_log_if_error(archiveAddr, archiveSize, MADV_SEQUENTIAL);
break;
case ARCHIVE_FORMAT_7ZIP: // Seek is bad
madvise_log_if_error(archiveAddr, archiveSize, MADV_RANDOM);
break;
default:;
}
// We must read through the file|vm then we can know whether it is encrypted
int encryptRet = archive_read_has_encrypted_entries(ctx->arc);
switch (encryptRet) {
case 1: // At lease 1 encrypted entry
need_encrypt = true;
break;
case 0: // format supports but no encrypted entry found
default:
need_encrypt = false;
}
archive_release_ctx(ctx);
r = archive_alloc_ctx(&ctx);
if (r) {
if (r == -ENOMEM)
LOGE("%s", "Mem alloc failed");
r = 0;
LOGE("%s%s", "Archive open failed:", archive_error_string(ctx->arc));
} else {
entries = calloc(entryCount, sizeof(entry));
r = archive_map_entries_index(ctx);
if (!archive_prealloc_mempool()) {
r = 0;
for (int i = 0; i < entryCount; ++i) {
free((void *) entries[i].filename);
}
free(entries);
}
int format = archive_format(ctx->arc);
switch (format) {
case ARCHIVE_FORMAT_ZIP:
case ARCHIVE_FORMAT_RAR_V5:
madvise_log_if_error(archiveAddr, archiveSize, MADV_SEQUENTIAL);
break;
case ARCHIVE_FORMAT_7ZIP: // Seek is bad
madvise_log_if_error(archiveAddr, archiveSize, MADV_RANDOM);
break;
default:;
}
archive_release_ctx(ctx);
return r;
ctx = archive_alloc_ctx();
if (!ctx) return 0;
entries = calloc(entryCount, sizeof(entry));
archive_map_entries_index(ctx, sort_entries);
archive_release_ctx(ctx);
return (int) entryCount;
}
#pragma clang diagnostic push
#pragma ide diagnostic ignored "ConstantConditionsOC"
#pragma ide diagnostic ignored "UnreachableCode"
JNIEXPORT jobject JNICALL
Java_com_hippo_UriArchiveAccessor_extractToByteBuffer(JNIEnv *env, jobject thiz, jint index) {
Java_com_hippo_ehviewer_jni_ArchiveKt_extractToByteBuffer(JNIEnv *env, jclass thiz, jint index) {
EH_UNUSED(env);
EH_UNUSED(thiz);
void *addr = MEMPOOL_ADDR_BY_SORTED_IDX(index);
size_t size = entries[index].size;
if (!MEMPOOL_IN_CORE_AND_LOCK(index)) {
index = entries[index].index;
archive_ctx *ctx = NULL;
int ret;
ret = archive_get_ctx(&ctx, index);
if (ret) return 0;
ret = archive_read_data(ctx->arc, addr, size);
ctx->using = 0;
if (ret == size)
return (*env)->NewDirectByteBuffer(env, addr, size);
if (ret != size)
LOGE("%s", "No enough data read, WTF?");
if (ret < 0)
LOGE("%s%s", "Archive read failed:", archive_error_string(ctx->arc));
mempool_release_pages(addr, size);
entry *entry = &entries[index];
ssize_t size = entry->size;
if (entry->addr) {
return (*env)->NewDirectByteBuffer(env, entry->addr, size);
} else {
return (*env)->NewDirectByteBuffer(env, addr, size);
archive_ctx *ctx = NULL;
if (!archive_get_ctx(&ctx, entry->index)) {
void *addr = acquire_decode_buffer();
ssize_t bytes = archive_read_data(ctx->arc, addr, size);
ctx->using = 0;
if (bytes == size) {
return (*env)->NewDirectByteBuffer(env, addr, size);
} else {
if (bytes < 0) {
LOGE("%s%s", "Archive read failed: ", archive_error_string(ctx->arc));
} else {
LOGE("%s", "No enough data read, WTF?");
}
}
release_decode_buffer(addr);
}
}
return 0;
}
#pragma clang diagnostic pop
JNIEXPORT void JNICALL
Java_com_hippo_UriArchiveAccessor_closeArchive(JNIEnv *env, jobject thiz) {
Java_com_hippo_ehviewer_jni_ArchiveKt_closeArchive(JNIEnv *env, jclass thiz) {
EH_UNUSED(env);
EH_UNUSED(thiz);
for (int i = 0; i < CTX_POOL_SIZE; i++)
archive_release_ctx(ctx_pool[i]);
if (ctx_pool) {
for (int i = 0; i < CTX_POOL_SIZE; i++)
archive_release_ctx(ctx_pool[i]);
free(ctx_pool);
ctx_pool = NULL;
}
free(passwd);
free(ctx_pool);
pthread_mutex_destroy(&ctx_lock);
passwd = NULL;
need_encrypt = false;
munmap(archiveAddr, archiveSize);
munmap(mempool, MEMPOOL_SIZE);
free(mempoolofs);
for (int i = 0; i < entryCount; ++i) {
free((void *) entries[i].filename);
if (archiveAddr != MAP_FAILED) {
munmap(archiveAddr, archiveSize);
archiveAddr = MAP_FAILED;
}
for (int i = 0; i < MAX_PARALLEL_DECOMP; ++i) {
free(decode_buffer[i]);
decode_buffer[i] = NULL;
}
max_file_size = 0;
if (entries) {
for (int i = 0; i < entryCount; ++i) {
free((void *) entries[i].filename);
}
free(entries);
entries = NULL;
}
free(entries);
}
JNIEXPORT jboolean JNICALL
Java_com_hippo_UriArchiveAccessor_needPassword(JNIEnv *env, jobject thiz) {
Java_com_hippo_ehviewer_jni_ArchiveKt_needPassword(JNIEnv *env, jclass thiz) {
EH_UNUSED(env);
EH_UNUSED(thiz);
return need_encrypt;
}
JNIEXPORT jboolean JNICALL
Java_com_hippo_UriArchiveAccessor_providePassword(JNIEnv *env, jobject thiz, jstring str) {
Java_com_hippo_ehviewer_jni_ArchiveKt_providePassword(JNIEnv *env, jclass thiz, jstring str) {
EH_UNUSED(thiz);
struct archive_entry *entry;
archive_ctx *ctx;
jboolean ret = true;
int len = (*env)->GetStringUTFLength(env, str);
passwd = realloc(passwd, len * sizeof(char));
if (!passwd) {
LOGE("Allocate passwd buffer failed");
return false;
}
strcpy(passwd, (*env)->GetStringUTFChars(env, str, NULL));
archive_alloc_ctx(&ctx);
void *tmpBuf = alloca(4096);
passwd = realloc(passwd, len + 1);
(*env)->GetStringUTFRegion(env, str, 0, len, passwd);
passwd[len] = 0;
ctx = archive_alloc_ctx();
char tmpBuf[4096];
while (archive_read_next_header(ctx->arc, &entry) == ARCHIVE_OK) {
if (!filename_is_playable_file(archive_entry_pathname(entry)))
if (!archive_entry_is_playable(entry))
continue;
if (!archive_entry_is_encrypted(entry))
continue;
if (archive_read_data(ctx->arc, tmpBuf, 4096) < ARCHIVE_OK) {
LOGE("%s%s", "Archive read failed:", archive_error_string(ctx->arc));
LOGE("%s%s", "Archive read failed: ", archive_error_string(ctx->arc));
ret = false;
}
break;
@@ -444,22 +423,15 @@ Java_com_hippo_UriArchiveAccessor_providePassword(JNIEnv *env, jobject thiz, jst
}
JNIEXPORT jstring JNICALL
Java_com_hippo_UriArchiveAccessor_getFilename(JNIEnv *env, jobject thiz, jint index) {
Java_com_hippo_ehviewer_jni_ArchiveKt_getExtension(JNIEnv *env, jclass thiz, jint index) {
EH_UNUSED(env);
EH_UNUSED(thiz);
index = entries[index].index;
archive_ctx *ctx = NULL;
int ret;
ret = archive_get_ctx(&ctx, index);
if (ret)
return NULL;
jstring str = (*env)->NewStringUTF(env, archive_entry_pathname(ctx->entry));
ctx->using = 0;
return str;
const char *ext = strrchr(entries[index].filename, '.') + 1;
return (*env)->NewStringUTF(env, ext);
}
JNIEXPORT void JNICALL
Java_com_hippo_UriArchiveAccessor_extractToFd(JNIEnv *env, jobject thiz, jint index, jint fd) {
JNIEXPORT jboolean JNICALL
Java_com_hippo_ehviewer_jni_ArchiveKt_extractToFd(JNIEnv *env, jclass thiz, jint index, jint fd) {
EH_UNUSED(env);
EH_UNUSED(thiz);
index = entries[index].index;
@@ -467,15 +439,52 @@ Java_com_hippo_UriArchiveAccessor_extractToFd(JNIEnv *env, jobject thiz, jint in
int ret;
ret = archive_get_ctx(&ctx, index);
if (!ret) {
archive_read_data_into_fd(ctx->arc, fd);
ret = archive_read_data_into_fd(ctx->arc, fd);
ctx->using = 0;
}
return ret == ARCHIVE_OK;
}
JNIEXPORT void JNICALL
Java_com_hippo_ehviewer_jni_ArchiveKt_releaseByteBuffer(JNIEnv *env, jclass thiz, jobject buffer) {
EH_UNUSED(thiz);
void *addr = (*env)->GetDirectBufferAddress(env, buffer);
if (!ADDR_IN_FILE_MAPPING(addr)) {
release_decode_buffer(addr);
}
}
JNIEXPORT void JNICALL
Java_com_hippo_UriArchiveAccessor_releaseByteBuffer(JNIEnv *env, jobject thiz, jobject buffer) {
EH_UNUSED(thiz);
void *addr = (*env)->GetDirectBufferAddress(env, buffer);
size_t size = (*env)->GetDirectBufferCapacity(env, buffer);
mempool_release_pages(addr, size);
Java_com_hippo_ehviewer_jni_ArchiveKt_archiveFdBatch(JNIEnv *env, jclass clazz, jintArray fd_batch, jobjectArray names, jint arc_fd, jint size) {
EH_UNUSED(clazz);
struct archive *arc = archive_write_new();
struct stat st;
char buff[8192];
jint fdBatch[size];
(*env)->GetIntArrayRegion(env, fd_batch, 0, size, fdBatch);
archive_write_set_format_zip(arc);
archive_write_zip_set_compression_store(arc);
archive_write_open_fd(arc, arc_fd);
struct archive_entry *entry = archive_entry_new();
for (int i = 0; i < size; i++) {
int fd = fdBatch[i];
jobject name = (*env)->GetObjectArrayElement(env, names, i);
const char *cname = (*env)->GetStringUTFChars(env, name, false);
archive_entry_set_pathname(entry, cname);
(*env)->ReleaseStringUTFChars(env, name, cname);
fstat(fd, &st);
archive_entry_copy_stat(entry, &st);
archive_entry_set_perm(entry, 0644);
archive_write_header(arc, entry);
size_t len;
do {
len = read(fd, buff, sizeof(buff));
archive_write_data(arc, buff, len);
} while (len > 0);
archive_write_finish_entry(arc);
archive_entry_clear(entry);
}
archive_entry_free(entry);
archive_write_close(arc);
archive_write_free(arc);
}
-36
View File
@@ -1,36 +0,0 @@
#include <jni.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/sendfile.h>
#include <android/log.h>
#include <string.h>
#include <errno.h>
#define LOG_TAG "mmap_utils"
#include "ehviewer.h"
// TODO: Replace it with AFileDescriptor_getFd when minsdk 31
// https://developer.android.com/ndk/reference/group/file-descriptor
JNIEXPORT jint JNICALL
Java_com_hippo_Native_getFd(JNIEnv *env, jclass clazz, jobject fileDescriptor) {
jint fd = -1;
jclass fdClass = (*env)->FindClass(env, "java/io/FileDescriptor");
if (fdClass != NULL) {
jfieldID fdClassDescriptorFieldID = (*env)->GetFieldID(env, fdClass, "descriptor", "I");
if (fdClassDescriptorFieldID != NULL && fileDescriptor != NULL) {
fd = (*env)->GetIntField(env, fileDescriptor, fdClassDescriptorFieldID);
}
}
return fd;
}
JNIEXPORT void JNICALL
Java_com_hippo_Native_sendfile(JNIEnv *env, jclass clazz, jint from, jint to) {
struct stat st;
fstat(from, &st);
sendfile(to, from, 0, st.st_size);
}
+39 -6
View File
@@ -1,7 +1,10 @@
#include <jni.h>
#include <string.h>
#include <stdbool.h>
#include <unistd.h>
#include <android/log.h>
#include <sys/stat.h>
#include <sys/mman.h>
#define LOG_TAG "gifUtils"
@@ -9,6 +12,7 @@
#define GIF_HEADER_87A "GIF87a"
#define GIF_HEADER_89A "GIF89a"
#define GIF_HEADER_LENGTH 6
static int FRAME_DELAY_START_MARKER = 0x0021F904;
@@ -19,13 +23,11 @@ typedef signed char byte;
#define DEFAULT_FRAME_DELAY 10
static inline bool isGif(void *addr) {
return !memcmp(addr, GIF_HEADER_87A, 6) || !memcmp(addr, GIF_HEADER_89A, 6);
return !memcmp(addr, GIF_HEADER_87A, GIF_HEADER_LENGTH) ||
!memcmp(addr, GIF_HEADER_89A, GIF_HEADER_LENGTH);
}
JNIEXPORT void JNICALL
Java_com_hippo_image_Image_rewriteGifSource(JNIEnv *env, jclass clazz, jobject buffer) {
byte *addr = (*env)->GetDirectBufferAddress(env, buffer);
size_t size = (*env)->GetDirectBufferCapacity(env, buffer);
static void doRewrite(byte *addr, size_t size) {
if (size < 7 || !isGif(addr)) return;
for (size_t i = 0; i < size - 8; i++) {
// TODO: Optimize this hex find with SIMD?
@@ -35,10 +37,41 @@ Java_com_hippo_image_Image_rewriteGifSource(JNIEnv *env, jclass clazz, jobject b
byte *end = addr + i + 4;
if (end[4] != 0) continue;
int frameDelay = end[2] << 8 | end[1];
if (frameDelay > MINIMUM_FRAME_DELAY)
if (frameDelay >= MINIMUM_FRAME_DELAY)
break; // Quit if the first block looks normal, for performance
end[1] = DEFAULT_FRAME_DELAY;
end[2] = 0;
}
}
}
JNIEXPORT jboolean JNICALL
Java_com_hippo_ehviewer_jni_GifUtilsKt_isGif(JNIEnv *env, jclass clazz, jint fd) {
byte buffer[GIF_HEADER_LENGTH];
return read(fd, buffer, GIF_HEADER_LENGTH) == GIF_HEADER_LENGTH &&
isGif(buffer);
}
JNIEXPORT void JNICALL
Java_com_hippo_ehviewer_jni_GifUtilsKt_rewriteGifSource(JNIEnv *env, jclass clazz, jobject buffer) {
byte *addr = (*env)->GetDirectBufferAddress(env, buffer);
size_t size = (*env)->GetDirectBufferCapacity(env, buffer);
doRewrite(addr, size);
}
JNIEXPORT jobject JNICALL
Java_com_hippo_ehviewer_jni_GifUtilsKt_mmap(JNIEnv *env, jclass clazz, jint fd) {
struct stat64 st;
fstat64(fd, &st);
size_t size = st.st_size;
byte *addr = mmap64(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
if (addr == MAP_FAILED) return NULL;
return (*env)->NewDirectByteBuffer(env, addr, size);
}
JNIEXPORT void JNICALL
Java_com_hippo_ehviewer_jni_GifUtilsKt_munmap(JNIEnv *env, jclass clazz, jobject buffer) {
byte *addr = (*env)->GetDirectBufferAddress(env, buffer);
size_t size = (*env)->GetDirectBufferCapacity(env, buffer);
munmap(addr, size);
}
+39
View File
@@ -0,0 +1,39 @@
#include <unistd.h>
#include <jni.h>
#include <nettle/sha1.h>
#include "ehviewer.h"
#define BUFFER_SIZE 8192
typedef uint8_t byte;
const char hex_digits[] = "0123456789abcdef";
JNIEXPORT jstring JNICALL
Java_com_hippo_ehviewer_jni_HashKt_sha1(JNIEnv *env, jclass clazz, jint fd) {
EH_UNUSED(clazz);
struct sha1_ctx ctx;
sha1_init(&ctx);
size_t bytes_read;
byte buffer[BUFFER_SIZE];
while ((bytes_read = read(fd, buffer, BUFFER_SIZE)) > 0) {
sha1_update(&ctx, bytes_read, buffer);
}
byte digest[SHA1_DIGEST_SIZE];
sha1_digest(&ctx, digest);
byte byte;
char hex_digest[2 * SHA1_DIGEST_SIZE + 1];
for (int i = 0; i < SHA1_DIGEST_SIZE; i++) {
byte = digest[i];
hex_digest[2 * i] = hex_digits[byte >> 4 & 0xF];
hex_digest[2 * i + 1] = hex_digits[byte & 0xF];
}
hex_digest[2 * SHA1_DIGEST_SIZE] = '\0';
return (*env)->NewStringUTF(env, hex_digest);
}
+7
View File
@@ -0,0 +1,7 @@
{
global:
JNI_OnLoad;
Java_*;
local:
*;
};
+24 -85
View File
@@ -30,7 +30,6 @@
* negative chars in their default char type.
*/
#include <stddef.h> /* size_t */
#include <ctype.h>
#include "strnatcmp.h"
@@ -39,28 +38,21 @@
/* These are defined as macros to make it easier to adapt this code to
* different characters types or comparison functions. */
static inline int
nat_isdigit(nat_char a)
nat_isdigit(const char *a)
{
return isdigit((unsigned char) a);
return isdigit((unsigned char) *a);
}
static inline int
nat_isspace(nat_char a)
nat_isspace(const char *a)
{
return isspace((unsigned char) a);
}
static inline nat_char
nat_toupper(nat_char a)
{
return toupper((unsigned char) a);
return isspace((unsigned char) *a) || *a == '0' && nat_isdigit(a + 1);
}
static int
compare_right(nat_char const *a, nat_char const *b)
compare_right(const char *a, const char *b)
{
int bias = 0;
@@ -69,11 +61,11 @@ compare_right(nat_char const *a, nat_char const *b)
both numbers to know that they have the same magnitude, so we
remember it in BIAS. */
for (;; a++, b++) {
if (!nat_isdigit(*a) && !nat_isdigit(*b))
if (!nat_isdigit(a) && !nat_isdigit(b))
return bias;
if (!nat_isdigit(*a))
if (!nat_isdigit(a))
return -1;
if (!nat_isdigit(*b))
if (!nat_isdigit(b))
return +1;
if (*a < *b) {
if (!bias)
@@ -84,94 +76,41 @@ compare_right(nat_char const *a, nat_char const *b)
} else if (!*a && !*b)
return bias;
}
return 0;
}
static int
compare_left(nat_char const *a, nat_char const *b)
int
strnatcmp(const char *a, const char *b)
{
/* Compare two left-aligned numbers: the first to have a
different value wins. */
for (;; a++, b++) {
if (!nat_isdigit(*a) && !nat_isdigit(*b))
return 0;
if (!nat_isdigit(*a))
return -1;
if (!nat_isdigit(*b))
return +1;
if (*a < *b)
return -1;
if (*a > *b)
return +1;
}
int result;
return 0;
}
while (1) {
/* skip over leading spaces or zeros */
while (nat_isspace(a))
a++;
static int
strnatcmp0(nat_char const *a, nat_char const *b, int fold_case)
{
int ai, bi;
nat_char ca, cb;
int fractional, result;
ai = bi = 0;
while (1) {
ca = a[ai]; cb = b[bi];
/* skip over leading spaces or zeros */
while (nat_isspace(ca))
ca = a[++ai];
while (nat_isspace(cb))
cb = b[++bi];
while (nat_isspace(b))
b++;
/* process run of digits */
if (nat_isdigit(ca) && nat_isdigit(cb)) {
fractional = (ca == '0' || cb == '0');
if (fractional) {
if ((result = compare_left(a+ai, b+bi)) != 0)
return result;
} else {
if ((result = compare_right(a+ai, b+bi)) != 0)
return result;
}
if (nat_isdigit(a) && nat_isdigit(b)) {
if ((result = compare_right(a, b)) != 0)
return result;
}
if (!ca && !cb) {
if (!*a && !*b) {
/* The strings compare the same. Perhaps the caller
will want to call strcmp to break the tie. */
return 0;
}
if (fold_case) {
ca = nat_toupper(ca);
cb = nat_toupper(cb);
}
if (ca < cb)
if (*a < *b)
return -1;
if (ca > cb)
if (*a > *b)
return +1;
++ai; ++bi;
a++; b++;
}
}
int
strnatcmp(nat_char const *a, nat_char const *b) {
return strnatcmp0(a, b, 0);
}
/* Compare, recognizing numeric string and ignoring case. */
int
strnatcasecmp(nat_char const *a, nat_char const *b) {
return strnatcmp0(a, b, 1);
}
+1 -8
View File
@@ -24,14 +24,7 @@
extern "C" {
#endif
/* CUSTOMIZATION SECTION
*
* You can change this typedef, but must then also change the inline
* functions in strnatcmp.c */
typedef char nat_char;
int strnatcmp(nat_char const *a, nat_char const *b);
int strnatcasecmp(nat_char const *a, nat_char const *b);
int strnatcmp(const char *a, const char *b);
#ifdef __cplusplus
}
-239
View File
@@ -1,239 +0,0 @@
cmake_minimum_required(VERSION 3.4.1)
project(nettle C)
set(LIBNETTLE_DEFINITIONS
-DHAVE_CONFIG_H)
set(LIBNETTLE_SOURCES
nettle/aes-decrypt-internal.c
nettle/aes-decrypt.c
nettle/aes-decrypt-table.c
nettle/aes128-decrypt.c
nettle/aes192-decrypt.c
nettle/aes256-decrypt.c
nettle/aes-encrypt-internal.c
nettle/aes-encrypt.c
nettle/aes-encrypt-table.c
nettle/aes128-encrypt.c
nettle/aes192-encrypt.c
nettle/aes256-encrypt.c
nettle/aes-invert-internal.c
nettle/aes-set-key-internal.c
nettle/aes-set-encrypt-key.c
nettle/aes-set-decrypt-key.c
nettle/aes128-set-encrypt-key.c
nettle/aes128-set-decrypt-key.c
nettle/aes128-meta.c
nettle/aes192-set-encrypt-key.c
nettle/aes192-set-decrypt-key.c
nettle/aes192-meta.c
nettle/aes256-set-encrypt-key.c
nettle/aes256-set-decrypt-key.c
nettle/aes256-meta.c
nettle/nist-keywrap.c
nettle/arcfour.c
nettle/arcfour-crypt.c
nettle/arctwo.c
nettle/arctwo-meta.c
nettle/blowfish.c
nettle/blowfish-bcrypt.c
nettle/base16-encode.c
nettle/base16-decode.c
nettle/base16-meta.c
nettle/base64-encode.c
nettle/base64-decode.c
nettle/base64-meta.c
nettle/base64url-encode.c
nettle/base64url-decode.c
nettle/base64url-meta.c
nettle/buffer.c
nettle/buffer-init.c
nettle/camellia-crypt-internal.c
nettle/camellia-table.c
nettle/camellia-absorb.c
nettle/camellia-invert-key.c
nettle/camellia128-set-encrypt-key.c
nettle/camellia128-crypt.c
nettle/camellia128-set-decrypt-key.c
nettle/camellia128-meta.c
nettle/camellia192-meta.c
nettle/camellia256-set-encrypt-key.c
nettle/camellia256-crypt.c
nettle/camellia256-set-decrypt-key.c
nettle/camellia256-meta.c
nettle/cast128.c
nettle/cast128-meta.c
nettle/cbc.c
nettle/cbc-aes128-encrypt.c
nettle/cbc-aes192-encrypt.c
nettle/cbc-aes256-encrypt.c
nettle/ccm.c
nettle/ccm-aes128.c
nettle/ccm-aes192.c
nettle/ccm-aes256.c
nettle/cfb.c
nettle/siv-cmac.c
nettle/siv-cmac-aes128.c
nettle/siv-cmac-aes256.c
nettle/cnd-memcpy.c
nettle/chacha-crypt.c
nettle/chacha-core-internal.c
nettle/chacha-poly1305.c
nettle/chacha-poly1305-meta.c
nettle/chacha-set-key.c
nettle/chacha-set-nonce.c
nettle/ctr.c
nettle/ctr16.c
nettle/des.c
nettle/des3.c
nettle/eax.c
nettle/eax-aes128.c
nettle/eax-aes128-meta.c
nettle/ghash-set-key.c
nettle/ghash-update.c
nettle/gcm.c
nettle/gcm-aes.c
nettle/gcm-aes128.c
nettle/gcm-aes128-meta.c
nettle/gcm-aes192.c
nettle/gcm-aes192-meta.c
nettle/gcm-aes256.c
nettle/gcm-aes256-meta.c
nettle/gcm-camellia128.c
nettle/gcm-camellia128-meta.c
nettle/gcm-camellia256.c
nettle/gcm-camellia256-meta.c
nettle/cmac.c
nettle/cmac64.c
nettle/cmac-aes128.c
nettle/cmac-aes256.c
nettle/cmac-des3.c
nettle/cmac-aes128-meta.c
nettle/cmac-aes256-meta.c
nettle/cmac-des3-meta.c
nettle/gost28147.c
nettle/gosthash94.c
nettle/gosthash94-meta.c
nettle/hmac.c
nettle/hmac-gosthash94.c
nettle/hmac-md5.c
nettle/hmac-ripemd160.c
nettle/hmac-sha1.c
nettle/hmac-sha224.c
nettle/hmac-sha256.c
nettle/hmac-sha384.c
nettle/hmac-sha512.c
nettle/hmac-streebog.c
nettle/hmac-sm3.c
nettle/hmac-md5-meta.c
nettle/hmac-ripemd160-meta.c
nettle/hmac-sha1-meta.c
nettle/hmac-sha224-meta.c
nettle/hmac-sha256-meta.c
nettle/hmac-sha384-meta.c
nettle/hmac-sha512-meta.c
nettle/hmac-streebog-meta.c
nettle/hmac-sm3-meta.c
nettle/knuth-lfib.c
nettle/hkdf.c
nettle/md2.c
nettle/md2-meta.c
nettle/md4.c
nettle/md4-meta.c
nettle/md5.c
nettle/md5-compress.c
nettle/md5-compat.c
nettle/md5-meta.c
nettle/memeql-sec.c
nettle/memxor.c
nettle/memxor3.c
nettle/nettle-lookup-hash.c
nettle/nettle-meta-aeads.c
nettle/nettle-meta-armors.c
nettle/nettle-meta-ciphers.c
nettle/nettle-meta-hashes.c
nettle/nettle-meta-macs.c
nettle/pbkdf2.c
nettle/pbkdf2-hmac-gosthash94.c
nettle/pbkdf2-hmac-sha1.c
nettle/pbkdf2-hmac-sha256.c
nettle/pbkdf2-hmac-sha384.c
nettle/pbkdf2-hmac-sha512.c
nettle/poly1305-aes.c
nettle/poly1305-internal.c
nettle/realloc.c
nettle/ripemd160.c
nettle/ripemd160-compress.c
nettle/ripemd160-meta.c
nettle/salsa20-core-internal.c
nettle/salsa20-crypt-internal.c
nettle/salsa20-crypt.c
nettle/salsa20r12-crypt.c
nettle/salsa20-set-key.c
nettle/salsa20-set-nonce.c
nettle/salsa20-128-set-key.c
nettle/salsa20-256-set-key.c
nettle/sha1.c
nettle/sha1-compress.c
nettle/sha1-meta.c
nettle/sha256.c
nettle/sha256-compress.c
nettle/sha224-meta.c
nettle/sha256-meta.c
nettle/sha512.c
nettle/sha512-compress.c
nettle/sha384-meta.c
nettle/sha512-meta.c
nettle/sha512-224-meta.c
nettle/sha512-256-meta.c
nettle/sha3.c
nettle/sha3-permute.c
nettle/sha3-224.c
nettle/sha3-224-meta.c
nettle/sha3-256.c
nettle/sha3-256-meta.c
nettle/sha3-384.c
nettle/sha3-384-meta.c
nettle/sha3-512.c
nettle/sha3-512-meta.c
nettle/shake256.c
nettle/sm3.c
nettle/sm3-meta.c
nettle/serpent-set-key.c
nettle/serpent-encrypt.c
nettle/serpent-decrypt.c
nettle/serpent-meta.c
nettle/streebog.c
nettle/streebog-meta.c
nettle/twofish.c
nettle/twofish-meta.c
nettle/umac-nh.c
nettle/umac-nh-n.c
nettle/umac-l2.c
nettle/umac-l3.c
nettle/umac-poly64.c
nettle/umac-poly128.c
nettle/umac-set-key.c
nettle/umac32.c
nettle/umac64.c
nettle/umac96.c
nettle/umac128.c
nettle/version.c
nettle/write-be32.c
nettle/write-le32.c
nettle/write-le64.c
nettle/yarrow256.c
nettle/yarrow_key_event.c
nettle/xts.c
nettle/xts-aes128.c
nettle/xts-aes256.c
)
set(LIBNETTLE_INCLUDES
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/nettle
)
add_library(nettle STATIC ${LIBNETTLE_SOURCES})
target_include_directories(nettle PUBLIC ${LIBNETTLE_INCLUDES})
target_compile_definitions(nettle PRIVATE ${LIBNETTLE_DEFINITIONS})
-275
View File
@@ -1,275 +0,0 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define to 1 if using 'alloca.c'. */
/* #undef C_ALLOCA */
/* Define to 1 if you have 'alloca', as a function or macro. */
#define HAVE_ALLOCA 1
/* Define to 1 if <alloca.h> works. */
#define HAVE_ALLOCA_H 1
/* Define if __builtin_bswap64 is available */
#define HAVE_BUILTIN_BSWAP64 1
/* Define if clock_gettime is available */
#define HAVE_CLOCK_GETTIME 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define if fcntl file locking is available */
#define HAVE_FCNTL_LOCKING 1
/* Define if the compiler understands __attribute__ */
#define HAVE_GCC_ATTRIBUTE 1
/* Define to 1 if you have the `getline' function. */
#define HAVE_GETLINE 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have dlopen (with -ldl). */
#define HAVE_LIBDL 1
/* Define to 1 if you have the `gmp' library (-lgmp). */
/* #undef HAVE_LIBGMP */
/* Define if compiler and linker supports __attribute__ ifunc */
#define HAVE_LINK_IFUNC 1
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define to 1 each of the following for which a native (ie. CPU specific)
implementation of the corresponding routine exists. */
/* #undef HAVE_NATIVE_memxor3 */
/* #undef HAVE_NATIVE_aes_decrypt */
/* #undef HAVE_NATIVE_aes_encrypt */
/* #undef HAVE_NATIVE_aes128_decrypt */
/* #undef HAVE_NATIVE_aes128_encrypt */
/* #undef HAVE_NATIVE_aes128_invert_key */
/* #undef HAVE_NATIVE_aes128_set_decrypt_key */
/* #undef HAVE_NATIVE_aes128_set_encrypt_key */
/* #undef HAVE_NATIVE_aes192_decrypt */
/* #undef HAVE_NATIVE_aes192_encrypt */
/* #undef HAVE_NATIVE_aes192_invert_key */
/* #undef HAVE_NATIVE_aes192_set_decrypt_key */
/* #undef HAVE_NATIVE_aes192_set_encrypt_key */
/* #undef HAVE_NATIVE_aes256_decrypt */
/* #undef HAVE_NATIVE_aes256_encrypt */
/* #undef HAVE_NATIVE_aes256_invert_key */
/* #undef HAVE_NATIVE_aes256_set_decrypt_key */
/* #undef HAVE_NATIVE_aes256_set_encrypt_key */
/* #undef HAVE_NATIVE_cbc_aes128_encrypt */
/* #undef HAVE_NATIVE_cbc_aes192_encrypt */
/* #undef HAVE_NATIVE_cbc_aes256_encrypt */
/* #undef HAVE_NATIVE_chacha_core */
/* #undef HAVE_NATIVE_chacha_2core */
/* #undef HAVE_NATIVE_chacha_3core */
/* #undef HAVE_NATIVE_chacha_4core */
/* #undef HAVE_NATIVE_fat_chacha_2core */
/* #undef HAVE_NATIVE_fat_chacha_3core */
/* #undef HAVE_NATIVE_fat_chacha_4core */
/* #undef HAVE_NATIVE_ecc_curve25519_modp */
/* #undef HAVE_NATIVE_ecc_curve448_modp */
/* #undef HAVE_NATIVE_ecc_secp192r1_modp */
/* #undef HAVE_NATIVE_ecc_secp192r1_redc */
/* #undef HAVE_NATIVE_ecc_secp224r1_modp */
/* #undef HAVE_NATIVE_ecc_secp224r1_redc */
/* #undef HAVE_NATIVE_ecc_secp256r1_modp */
/* #undef HAVE_NATIVE_ecc_secp256r1_redc */
/* #undef HAVE_NATIVE_ecc_secp384r1_modp */
/* #undef HAVE_NATIVE_ecc_secp384r1_redc */
/* #undef HAVE_NATIVE_ecc_secp521r1_modp */
/* #undef HAVE_NATIVE_ecc_secp521r1_redc */
/* #undef HAVE_NATIVE_ghash_set_key */
/* #undef HAVE_NATIVE_ghash_update */
/* #undef HAVE_NATIVE_salsa20_core */
/* #undef HAVE_NATIVE_salsa20_2core */
/* #undef HAVE_NATIVE_fat_salsa20_2core */
/* #undef HAVE_NATIVE_sha1_compress */
/* #undef HAVE_NATIVE_sha256_compress */
/* #undef HAVE_NATIVE_sha512_compress */
/* #undef HAVE_NATIVE_sha3_permute */
/* #undef HAVE_NATIVE_umac_nh */
/* #undef HAVE_NATIVE_umac_nh_n */
/* Define to 1 if you have the <openssl/ecdsa.h> header file. */
/* #undef HAVE_OPENSSL_ECDSA_H */
/* Define to 1 if you have the <openssl/evp.h> header file. */
/* #undef HAVE_OPENSSL_EVP_H */
/* Define to 1 if you have the `secure_getenv' function. */
/* #undef HAVE_SECURE_GETENV */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
/* #undef HAVE_VALGRIND_MEMCHECK_H */
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "nettle-bugs@lists.lysator.liu.se"
/* Define to the full name of this package. */
#define PACKAGE_NAME "nettle"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "nettle 3.8.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "nettle"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "3.8.1"
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG __SIZEOF_LONG__
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T __SIZEOF_SIZE_T__
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
macro is obsolete. */
#define TIME_WITH_SYS_TIME 1
/* Defined if public key features are enabled */
/* #undef WITH_HOGWEED */
/* Define if you have openssl's libcrypto (used for benchmarking) */
/* #undef WITH_OPENSSL */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef gid_t */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef uid_t */
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
/* Needed for alloca on windows */
# if HAVE_MALLOC_H
# include <malloc.h>
# endif
# endif
#else /* defined __GNUC__ */
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
/* Needed for alloca on windows, also with gcc */
# if HAVE_MALLOC_H
# include <malloc.h>
# endif
# endif
#endif
#if HAVE_STRERROR
#define STRERROR strerror
#else
#define STRERROR(x) (sys_errlist[x])
#endif
#if __GNUC__ && HAVE_GCC_ATTRIBUTE
# define NORETURN __attribute__ ((__noreturn__))
# define PRINTF_STYLE(f, a) __attribute__ ((__format__ (__printf__, f, a)))
# define UNUSED __attribute__ ((__unused__))
#else
# define NORETURN
# define PRINTF_STYLE(f, a)
# define UNUSED
#endif
#if defined(__x86_64__) || defined(__arch64__)
# define HAVE_NATIVE_64_BIT 1
#else
/* Needs include of <limits.h> before use. */
# define HAVE_NATIVE_64_BIT (SIZEOF_LONG * CHAR_BIT >= 64)
#endif
-1
View File
@@ -1 +0,0 @@
-1
View File
@@ -1 +0,0 @@
-64
View File
@@ -1,64 +0,0 @@
/* version.h
Information about library version.
Copyright (C) 2015 Red Hat, Inc.
Copyright (C) 2015 Niels Möller
This file is part of GNU Nettle.
GNU Nettle is free software: you can redistribute it and/or
modify it under the terms of either:
* the GNU Lesser General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at your
option) any later version.
or
* the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your
option) any later version.
or both in parallel, as here.
GNU Nettle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received copies of the GNU General Public License and
the GNU Lesser General Public License along with this program. If
not, see http://www.gnu.org/licenses/.
*/
#ifndef NETTLE_VERSION_H_INCLUDED
#define NETTLE_VERSION_H_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
/* Individual version numbers in decimal */
#define NETTLE_VERSION_MAJOR 3
#define NETTLE_VERSION_MINOR 8
#define NETTLE_USE_MINI_GMP 0
/* We need a preprocessor constant for GMP_NUMB_BITS, simply using
sizeof(mp_limb_t) * CHAR_BIT is not good enough. */
#if NETTLE_USE_MINI_GMP
# define GMP_NUMB_BITS n/a
#endif
int
nettle_version_major (void);
int
nettle_version_minor (void);
#ifdef __cplusplus
}
#endif
#endif /* NETTLE_VERSION_H_INCLUDED */
@@ -1,40 +0,0 @@
package androidx.navigation.ui
import android.view.MenuItem
import androidx.annotation.IdRes
import androidx.navigation.ActivityNavigator
import androidx.navigation.NavController
import androidx.navigation.NavDestination
import androidx.navigation.NavDestination.Companion.hierarchy
import androidx.navigation.NavOptions
fun onNavDestinationSelected2(item: MenuItem, navController: NavController): Boolean {
if (navController.currentDestination?.matchDestination(item.itemId) == true) return true
val builder = NavOptions.Builder().setLaunchSingleTop(true)
if (
navController.currentDestination!!.parent!!.findNode(item.itemId)
is ActivityNavigator.Destination
) {
builder.setEnterAnim(R.anim.nav_default_enter_anim)
.setExitAnim(R.anim.nav_default_exit_anim)
.setPopEnterAnim(R.anim.nav_default_pop_enter_anim)
.setPopExitAnim(R.anim.nav_default_pop_exit_anim)
} else {
builder.setEnterAnim(com.hippo.ehviewer.R.anim.scene_open_enter)
.setExitAnim(com.hippo.ehviewer.R.anim.scene_open_exit)
.setPopEnterAnim(com.hippo.ehviewer.R.anim.scene_close_enter)
.setPopExitAnim(com.hippo.ehviewer.R.anim.scene_close_exit)
}
val options = builder.build()
return try {
// TODO provide proper API instead of using Exceptions as Control-Flow.
navController.navigate(item.itemId, null, options)
// Return true only if the destination we've navigated to matches the MenuItem
navController.currentDestination?.matchDestination(item.itemId) == true
} catch (e: IllegalArgumentException) {
false
}
}
fun NavDestination.matchDestination(@IdRes destId: Int): Boolean =
hierarchy.any { it.id == destId }
@@ -1,25 +0,0 @@
package androidx.swiperefreshlayout.widget
import android.annotation.SuppressLint
import android.content.Context
import android.graphics.drawable.ShapeDrawable
import android.util.AttributeSet
import androidx.core.graphics.ColorUtils
import rikka.core.res.resolveColor
@SuppressLint("PrivateResource")
class ThemedSwipeRefreshLayout @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null
) : SwipeRefreshLayout(context, attrs) {
init {
val surfaceColor =
context.theme.resolveColor(com.google.android.material.R.attr.colorSurface)
val overlayColor =
context.getColor(com.google.android.material.R.color.m3_popupmenu_overlay_color)
val backgroundColor = ColorUtils.compositeColors(overlayColor, surfaceColor)
(mCircleView.background as ShapeDrawable).paint.color = backgroundColor
setColorSchemeColors(context.theme.resolveColor(com.google.android.material.R.attr.colorAccent))
}
}
@@ -1,66 +0,0 @@
@file:JvmName("GifDecodeUtils")
package coil.decode
import kotlin.experimental.and
import okio.BufferedSource
import okio.ByteString.Companion.encodeUtf8
// https://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp
private val GIF_HEADER_87A = "GIF87a".encodeUtf8()
private val GIF_HEADER_89A = "GIF89a".encodeUtf8()
// https://developers.google.com/speed/webp/docs/riff_container
private val WEBP_HEADER_RIFF = "RIFF".encodeUtf8()
private val WEBP_HEADER_WEBP = "WEBP".encodeUtf8()
private val WEBP_HEADER_VPX8 = "VP8X".encodeUtf8()
// https://nokiatech.github.io/heif/technical.html
private val HEIF_HEADER_FTYP = "ftyp".encodeUtf8()
private val HEIF_HEADER_MSF1 = "msf1".encodeUtf8()
private val HEIF_HEADER_HEVC = "hevc".encodeUtf8()
private val HEIF_HEADER_HEVX = "hevx".encodeUtf8()
/**
* Return 'true' if the [source] contains a GIF image. The [source] is not consumed.
*/
fun DecodeUtils.isGif(source: BufferedSource): Boolean {
return source.rangeEquals(0, GIF_HEADER_89A) ||
source.rangeEquals(0, GIF_HEADER_87A)
}
/**
* Return 'true' if the [source] contains a WebP image. The [source] is not consumed.
*/
fun DecodeUtils.isWebP(source: BufferedSource): Boolean {
return source.rangeEquals(0, WEBP_HEADER_RIFF) &&
source.rangeEquals(8, WEBP_HEADER_WEBP)
}
/**
* Return 'true' if the [source] contains an animated WebP image. The [source] is not consumed.
*/
fun DecodeUtils.isAnimatedWebP(source: BufferedSource): Boolean {
return isWebP(source) &&
source.rangeEquals(12, WEBP_HEADER_VPX8) &&
source.request(17) &&
(source.buffer[16] and 0b00000010) > 0
}
/**
* Return 'true' if the [source] contains an HEIF image. The [source] is not consumed.
*/
fun DecodeUtils.isHeif(source: BufferedSource): Boolean {
return source.rangeEquals(4, HEIF_HEADER_FTYP)
}
/**
* Return 'true' if the [source] contains an animated HEIF image sequence. The [source] is not
* consumed.
*/
fun DecodeUtils.isAnimatedHeif(source: BufferedSource): Boolean {
return isHeif(source) &&
(source.rangeEquals(8, HEIF_HEADER_MSF1) ||
source.rangeEquals(8, HEIF_HEADER_HEVC) ||
source.rangeEquals(8, HEIF_HEADER_HEVX))
}
@@ -1,88 +0,0 @@
@file:Suppress("SameParameterValue")
package coil.decode
import okio.Buffer
import okio.ByteString
import okio.ByteString.Companion.decodeHex
import okio.ForwardingSource
import okio.Source
/**
* A [ForwardingSource] that rewrites the GIF frame delay in every graphics control block if it's
* below a threshold.
*/
internal class FrameDelayRewritingSource(delegate: Source) : ForwardingSource(delegate) {
// An intermediary buffer so we can read and alter the data before it's written to the destination.
private val buffer = Buffer()
override fun read(sink: Buffer, byteCount: Long): Long {
// Ensure our buffer has enough bytes to satisfy this read.
request(byteCount)
// Short circuit if there are no bytes in the buffer.
if (buffer.size == 0L) {
return if (byteCount == 0L) 0L else -1L
}
// Search through the buffer and rewrite any frame delays below the threshold.
var bytesWritten = 0L
while (true) {
val index = indexOf(FRAME_DELAY_START_MARKER)
if (index == -1L) break
// Write up until the end of the frame delay start marker.
bytesWritten += write(sink, index + FRAME_DELAY_START_MARKER_SIZE_BYTES)
// Check for the end of the graphics control extension block.
if (!request(5) || buffer[4] != 0.toByte()) continue
// Rewrite the frame delay if it is below the threshold.
// The frame delay is stored as two unsigned bytes in reverse order
// (i.e. the most significant bits are in the byte that's read second).
val frameDelay = (buffer[2].toUByte().toInt() shl 8) or buffer[1].toUByte().toInt()
if (frameDelay < MINIMUM_FRAME_DELAY) {
sink.writeByte(buffer[0].toInt())
sink.writeByte(DEFAULT_FRAME_DELAY)
sink.writeByte(0)
buffer.skip(3)
}
}
// Write anything left in the source.
if (bytesWritten < byteCount) {
bytesWritten += write(sink, byteCount - bytesWritten)
}
return if (bytesWritten == 0L) -1 else bytesWritten
}
private fun indexOf(bytes: ByteString): Long {
var index = -1L
while (true) {
index = buffer.indexOf(bytes[0], index + 1)
if (index == -1L) break
if (request(bytes.size.toLong()) && buffer.rangeEquals(index, bytes)) break
}
return index
}
private fun write(sink: Buffer, byteCount: Long): Long {
return buffer.read(sink, byteCount).coerceAtLeast(0)
}
private fun request(byteCount: Long): Boolean {
if (buffer.size >= byteCount) return true
val toRead = byteCount - buffer.size
return super.read(buffer, toRead) == toRead
}
private companion object {
// https://www.matthewflickinger.com/lab/whatsinagif/bits_and_bytes.asp
// See: "Graphics Control Extension"
private val FRAME_DELAY_START_MARKER = "0021F904".decodeHex()
private const val FRAME_DELAY_START_MARKER_SIZE_BYTES = 4
private const val MINIMUM_FRAME_DELAY = 2
private const val DEFAULT_FRAME_DELAY = 10
}
}
@@ -1,111 +0,0 @@
package com.davemorrissey.labs.subscaleview
import android.graphics.Bitmap
import android.graphics.Rect
import com.davemorrissey.labs.subscaleview.provider.InputProvider
/**
* Helper class used to set the source and additional attributes from a variety of sources. Supports
* use of a bitmap, asset, resource, external file or any other URI.
*
*
* When you are using a preview image, you must set the dimensions of the full size image on the
* ImageSource object for the full size image using the [.dimensions] method.
*/
class ImageSource {
val bitmap: Bitmap?
val provider: InputProvider?
private var sWidth = 0
private var sHeight = 0
var sRegion = Rect(0, 0, 0, 0)
private set
var isCached = false
private set
private constructor(bitmap: Bitmap, cached: Boolean) {
this.bitmap = bitmap
provider = null
sWidth = bitmap.width
sHeight = bitmap.height
isCached = cached
}
private constructor(provider: InputProvider) {
bitmap = null
this.provider = provider
}
/**
* Use a region of the source image. Region must be set independently for the full size image and the preview if
* you are using one.
*
* @param sRegion the region of the source image to be displayed.
* @return this instance for chaining.
*/
fun region(sRegion: Rect): ImageSource {
this.sRegion = sRegion
setInvariants()
return this
}
/**
* Declare the dimensions of the image. This is only required for a full size image, when you are specifying a URI
* and also a preview image. When displaying a bitmap object, or not using a preview, you do not need to declare
* the image dimensions. Note if the declared dimensions are found to be incorrect, the view will reset.
*
* @param sWidth width of the source image.
* @param sHeight height of the source image.
* @return this instance for chaining.
*/
fun dimensions(sWidth: Int, sHeight: Int): ImageSource {
if (bitmap == null) {
this.sWidth = sWidth
this.sHeight = sHeight
}
setInvariants()
return this
}
private fun setInvariants() {
if (!sRegion.isEmpty) {
sWidth = sRegion.width()
sHeight = sRegion.height()
}
}
companion object {
/**
* Create an instance from an input provider.
*
* @param provider input stream provider.
* @return an [ImageSource] instance.
*/
fun provider(provider: InputProvider): ImageSource {
return ImageSource(provider)
}
/**
* Provide a loaded bitmap for display.
*
* @param bitmap bitmap to be displayed.
* @return an [ImageSource] instance.
*/
fun bitmap(bitmap: Bitmap): ImageSource {
return ImageSource(bitmap, false)
}
/**
* Provide a loaded and cached bitmap for display. This bitmap will not be recycled when it is no
* longer needed. Use this method if you loaded the bitmap with an image loader such as Picasso
* or Volley.
*
* @param bitmap bitmap to be displayed.
* @return an [ImageSource] instance.
*/
fun cachedBitmap(bitmap: Bitmap): ImageSource {
return ImageSource(bitmap, true)
}
}
}
@@ -1,15 +0,0 @@
package com.davemorrissey.labs.subscaleview
import android.graphics.PointF
import java.io.Serializable
/**
* Wraps the scale, center and orientation of a displayed image for easy restoration on screen rotate.
*/
class ImageViewState(val scale: Float, center: PointF) : Serializable {
private val centerX: Float = center.x
private val centerY: Float = center.y
val center: PointF
get() = PointF(centerX, centerY)
}
File diff suppressed because it is too large. Load diff
@@ -1,53 +0,0 @@
package com.davemorrissey.labs.subscaleview.decoder
import android.content.Context
import android.graphics.Bitmap
import android.graphics.Point
import android.graphics.Rect
import kotlin.Throws
import com.davemorrissey.labs.subscaleview.provider.InputProvider
import java.lang.Exception
/**
* Interface for image decoding classes.
*/
interface Decoder {
/**
* Initialise the decoder. When possible, perform initial setup work once in this method. The
* dimensions of the image must be returned.
*
* @param context Application context. A reference may be held, but must be cleared on recycle.
* @param provider Provider of the image.
* @return Dimensions of the image.
* @throws Exception if initialisation fails.
*/
@Throws(Exception::class)
fun init(context: Context, provider: InputProvider): Point
/**
* Decode a region of the image with the given sample size. This method is called off the UI
* thread so it can safely load the image on the current thread. It is called from
* [android.os.AsyncTask]s running in an executor that may have multiple threads, so
* implementations must be thread safe. Adding `synchronized` to the method signature
* is the simplest way to achieve this, but bear in mind the [.recycle] method can be
* called concurrently.
*
* @param sRect Source image rectangle to decode.
* @param sampleSize Sample size.
* @return The decoded region. It is safe to return null if decoding fails.
*/
fun decodeRegion(sRect: Rect, sampleSize: Int): Bitmap
/**
* Status check. Should return false before initialisation and after recycle.
*
* @return true if the decoder is ready to be used.
*/
val isReady: Boolean
/**
* This method will be called when the decoder is no longer required. It should clean up any
* resources still in use.
*/
fun recycle()
}
@@ -1,62 +0,0 @@
package com.davemorrissey.labs.subscaleview.decoder
import android.content.Context
import android.graphics.Bitmap
import android.graphics.Point
import android.graphics.Rect
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
import com.davemorrissey.labs.subscaleview.provider.InputProvider
class ImageDecoder @JvmOverloads constructor(
private val cropBorders: Boolean,
bitmapConfig: Bitmap.Config? = null
) : Decoder {
init {
val globalBitmapConfig = SubsamplingScaleImageView.preferredBitmapConfig
}
/**
* Initialise the decoder. When possible, perform initial setup work once in this method. The
* dimensions of the image must be returned.
*
* @param context Application context. A reference may be held, but must be cleared on recycle.
* @param provider Provider of the image.
* @return Dimensions of the image.
* @throws Exception if initialisation fails.
*/
@Throws(Exception::class)
override fun init(context: Context, provider: InputProvider): Point {
TODO()
}
/**
* Decode a region of the image with the given sample size. This method is called off the UI
* thread so it can safely load the image on the current thread. It is called from
* [android.os.AsyncTask]s running in an executor that may have multiple threads, so
* implementations must be thread safe. Adding `synchronized` to the method signature
* is the simplest way to achieve this, but bear in mind the [.recycle] method can be
* called concurrently.
*
* @param sRect Source image rectangle to decode.
* @param sampleSize Sample size.
* @return The decoded region. It is safe to return null if decoding fails.
*/
override fun decodeRegion(sRect: Rect, sampleSize: Int): Bitmap {
TODO()
}
/**
* Status check. Should return false before initialisation and after recycle.
*
* @return true if the decoder is ready to be used.
*/
override val isReady: Boolean = TODO()
/**
* This method will be called when the decoder is no longer required. It should clean up any
* resources still in use.
*/
override fun recycle() {
TODO()
}
}
@@ -1,3 +0,0 @@
package com.davemorrissey.labs.subscaleview.provider
interface InputProvider
-48
View File
@@ -1,48 +0,0 @@
/*
* Copyright 2022 Tarsin Norbin
*
* This file is part of EhViewer
*
* EhViewer is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* EhViewer is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with EhViewer.
* If not, see <https://www.gnu.org/licenses/>.
*/
package com.hippo
import android.os.ParcelFileDescriptor
import java.io.FileDescriptor
object Native {
fun initialize() {
System.loadLibrary("ehviewer")
}
@JvmStatic
external fun getFd(fd: FileDescriptor?): Int
@JvmStatic
external fun sendfile(from: Int, to: Int)
}
val FileDescriptor.fd
get() = Native.getFd(this)
infix fun ParcelFileDescriptor.receivefrom(fd: FileDescriptor) {
Native.sendfile(fd.fd, getFd())
}
infix fun ParcelFileDescriptor.copyTo(fd: FileDescriptor) {
Native.sendfile(getFd(), fd.fd)
}
infix fun ParcelFileDescriptor.copyTo(fd: ParcelFileDescriptor) {
Native.sendfile(getFd(), fd.fd)
}
@@ -1,69 +0,0 @@
/*
* Copyright 2022 Tarsin Norbin
*
* This file is part of EhViewer
*
* EhViewer is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* EhViewer is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with EhViewer.
* If not, see <https://www.gnu.org/licenses/>.
*/
package com.hippo
import android.content.Context
import android.graphics.ImageDecoder
import android.net.Uri
import android.util.Log
import com.hippo.image.Image
import java.nio.ByteBuffer
class UriArchiveAccessor(ctx: Context, private val uri: Uri) {
val pfd by lazy { ctx.contentResolver.openFileDescriptor(uri, "r")!! }
fun open(): Int {
Log.d(DEBUG_TAG, "Open archive $uri")
return openArchive(pfd.fd, pfd.statSize)
}
private external fun openArchive(fd: Int, size: Long): Int
private external fun extractToByteBuffer(index: Int): ByteBuffer?
external fun extractToFd(index: Int, fd: Int)
external fun getFilename(index: Int): String
external fun needPassword(): Boolean
external fun providePassword(str: String): Boolean
private external fun closeArchive()
fun close() {
closeArchive()
pfd.close()
Log.d(DEBUG_TAG, "Close archive $uri successfully!")
}
fun getImageSource(index: Int): Image.CloseableSource? {
val buffer = extractToByteBuffer(index)
buffer ?: return null
check(buffer.isDirect)
Image.rewriteGifSource(buffer)
val source = ImageDecoder.createSource(buffer)
return object : Image.CloseableSource {
override val source: ImageDecoder.Source
get() = source
override fun close() {
releaseByteBuffer(buffer)
}
}
}
companion object {
@JvmStatic
private external fun releaseByteBuffer(buffer: ByteBuffer)
}
}
private const val DEBUG_TAG = "UriArchiveAccessor"
@@ -1,8 +0,0 @@
package com.hippo.app
import android.content.Context
import com.google.android.material.dialog.MaterialAlertDialogBuilder
open class BaseDialogBuilder constructor(
context: Context
) : MaterialAlertDialogBuilder(context)
@@ -1,44 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.app
import android.content.Context
import android.view.LayoutInflater
import android.widget.CheckBox
import com.hippo.ehviewer.R
class CheckBoxDialogBuilder constructor(
context: Context,
message: String?,
checkText: String?,
checked: Boolean
) : BaseDialogBuilder(
context
) {
private val mCheckBox: CheckBox
val isChecked: Boolean
get() = mCheckBox.isChecked
init {
val view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_checkbox_builder, null)
setView(view)
setMessage(message)
mCheckBox = view.findViewById(R.id.checkbox)
mCheckBox.text = checkText
mCheckBox.isChecked = checked
view.setOnClickListener { mCheckBox.toggle() }
}
}
@@ -1,71 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.app
import android.content.Context
import android.content.DialogInterface
import android.view.KeyEvent
import android.view.LayoutInflater
import android.widget.EditText
import android.widget.TextView
import android.widget.TextView.OnEditorActionListener
import androidx.appcompat.app.AlertDialog
import com.google.android.material.textfield.TextInputLayout
import com.hippo.ehviewer.R
class EditTextDialogBuilder constructor(
context: Context,
text: String?,
hint: String?
) : BaseDialogBuilder(
context
), OnEditorActionListener {
private val mTextInputLayout: TextInputLayout
val editText: EditText
private var mDialog: AlertDialog? = null
val text: String
get() = editText.text.toString()
fun setError(error: CharSequence?) {
mTextInputLayout.error = error
}
override fun create(): AlertDialog {
mDialog = super.create()
return mDialog as AlertDialog
}
override fun onEditorAction(v: TextView?, p1: Int, event: KeyEvent?): Boolean {
return if (mDialog != null) {
val button = mDialog!!.getButton(DialogInterface.BUTTON_POSITIVE)
button?.performClick()
true
} else {
false
}
}
init {
val view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_edittext_builder, null)
setView(view)
mTextInputLayout = view as TextInputLayout
editText = view.findViewById(R.id.edit_text)
editText.setText(text)
editText.setSelection(editText.text.length)
editText.setOnEditorActionListener(this)
mTextInputLayout.hint = hint
}
}
@@ -1,14 +0,0 @@
package com.hippo.app
import android.content.Context
import android.util.AttributeSet
import android.view.HapticFeedbackConstants
import com.google.android.material.slider.Slider
class HapticSlider @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null
) : Slider(context, attrs) {
init {
addOnChangeListener { _, _, _ -> performHapticFeedback(HapticFeedbackConstants.CLOCK_TICK) }
}
}
@@ -1,63 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.app
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.widget.AdapterView
import android.widget.ArrayAdapter
import android.widget.CheckBox
import android.widget.ListView
import androidx.appcompat.app.AlertDialog
import com.hippo.ehviewer.R
import com.hippo.yorozuya.ViewUtils
class ListCheckBoxDialogBuilder(
context: Context,
items: List<CharSequence>,
listener: (ListCheckBoxDialogBuilder?, AlertDialog?, Int) -> Unit,
checkText: String?,
checked: Boolean
) : BaseDialogBuilder(
context
) {
private val mCheckBox: CheckBox
private var mDialog: AlertDialog? = null
val isChecked: Boolean
get() = mCheckBox.isChecked
override fun create(): AlertDialog {
mDialog = super.create()
return mDialog as AlertDialog
}
init {
val view =
LayoutInflater.from(getContext()).inflate(R.layout.dialog_list_checkbox_builder, null)
setView(view)
val listView = ViewUtils.`$$`(view, R.id.list_view) as ListView
mCheckBox = ViewUtils.`$$`(view, R.id.checkbox) as CheckBox
listView.adapter = ArrayAdapter(getContext(), R.layout.item_select_dialog, items)
listView.onItemClickListener =
AdapterView.OnItemClickListener { _: AdapterView<*>?, _: View?, position: Int, _: Long ->
listener(this@ListCheckBoxDialogBuilder, mDialog, position)
mDialog?.dismiss()
}
mCheckBox.text = checkText
mCheckBox.isChecked = checked
}
}
@@ -1,40 +0,0 @@
package com.hippo.compat
import com.hippo.ehviewer.spider.SpiderInfo
import com.hippo.yorozuya.IOUtils
import java.io.InputStream
fun readLegacySpiderInfo(inputStream: InputStream): SpiderInfo {
fun read(): String {
return IOUtils.readAsciiLine(inputStream)
}
fun readInt(): Int {
return read().toInt()
}
fun readLong(): Long {
return read().toLong()
}
repeat(2) { read() } // We assert that only info v2
val gid = readLong()
val token = read()
read()
val previewPages = readInt()
val previewPerPage = readInt()
val pages = read().toInt()
val pTokenMap = hashMapOf<Int, String>()
val info = SpiderInfo(gid, pages, pTokenMap, 0, token, previewPages, previewPerPage)
runCatching {
val line = read()
val pos = line.indexOf(" ")
if (pos > 0) {
val index = line.substring(0, pos).toInt()
val pToken = line.substring(pos + 1)
if (pToken.isNotEmpty()) {
pTokenMap[index] = pToken
}
}
}
return info
}
@@ -1,124 +0,0 @@
/*
* Copyright 2017 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.database
import android.content.Context
import android.database.sqlite.SQLiteOpenHelper
import android.util.SparseArray
class MSQLiteBuilder {
companion object {
const val COLUMN_ID = "_id"
private val JAVA_TYPE_TO_SQLITE_TYPE: MutableMap<Class<*>?, String> = HashMap()
private fun javaTypeToSQLiteType(clazz: Class<*>?): String {
return JAVA_TYPE_TO_SQLITE_TYPE[clazz]
?: throw IllegalStateException("Unknown type: $clazz")
}
init {
JAVA_TYPE_TO_SQLITE_TYPE[Boolean::class.javaPrimitiveType] =
"INTEGER NOT NULL DEFAULT 0"
JAVA_TYPE_TO_SQLITE_TYPE[Byte::class.javaPrimitiveType] =
"INTEGER NOT NULL DEFAULT 0"
JAVA_TYPE_TO_SQLITE_TYPE[Short::class.javaPrimitiveType] =
"INTEGER NOT NULL DEFAULT 0"
JAVA_TYPE_TO_SQLITE_TYPE[Int::class.javaPrimitiveType] = "INTEGER NOT NULL DEFAULT 0"
JAVA_TYPE_TO_SQLITE_TYPE[Long::class.javaPrimitiveType] =
"INTEGER NOT NULL DEFAULT 0"
JAVA_TYPE_TO_SQLITE_TYPE[Float::class.javaPrimitiveType] =
"REAL NOT NULL DEFAULT 0"
JAVA_TYPE_TO_SQLITE_TYPE[Double::class.javaPrimitiveType] = "REAL NOT NULL DEFAULT 0"
JAVA_TYPE_TO_SQLITE_TYPE[String::class.java] = "TEXT"
}
}
private val statementsMap = SparseArray<List<String>?>()
private var version = 0
private var statements: MutableList<String>? = null
/**
* Bump database version.
*/
fun version(version: Int): MSQLiteBuilder {
check(version > this.version) {
("New version must be bigger than current version. "
+ "current version: " + this.version + ", new version: " + version + ".")
}
this.version = version
statements = ArrayList()
statementsMap.put(version, statements)
return this
}
/**
* Creates a table.
*/
/**
* Creates a table with int [.COLUMN_ID] primary key.
*/
@JvmOverloads
fun createTable(
table: String,
column: String = COLUMN_ID,
clazz: Class<*>? = Int::class.javaPrimitiveType
): MSQLiteBuilder {
return statement("CREATE TABLE " + table + " (" + column + " " + javaTypeToSQLiteType(clazz) + " PRIMARY KEY);")
}
/**
* Drops a table.
*/
fun dropTable(table: String): MSQLiteBuilder {
return statement("DROP TABLE $table;")
}
/**
* Inserts a column to the table.
*/
fun insertColumn(table: String, column: String, clazz: Class<*>?): MSQLiteBuilder {
return statement(
"ALTER TABLE $table ADD COLUMN $column " + javaTypeToSQLiteType(
clazz
) + ";"
)
}
/**
* Add a statement.
*/
fun statement(statement: String): MSQLiteBuilder {
check(!(version == 0 || statements == null)) { "Call version() first!" }
statements!!.add(statement)
return this
}
/**
* Build a SQLiteOpenHelper from it.
*/
fun build(context: Context?, name: String?, version: Int): SQLiteOpenHelper {
return MSQLiteOpenHelper(context, name, version, this)
}
fun getStatements(oldVersion: Int, newVersion: Int): List<String> {
val result: MutableList<String> = ArrayList()
for (i in oldVersion + 1..newVersion) {
val list = statementsMap[i]
if (list != null) {
result.addAll(list)
}
}
return result
}
}
@@ -1,43 +0,0 @@
/*
* Copyright 2017 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.database
import android.content.Context
import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper
import com.hippo.util.SqlUtils
internal class MSQLiteOpenHelper(
context: Context?,
name: String?,
private val version: Int,
private val builder: MSQLiteBuilder
) : SQLiteOpenHelper(context, name, null, version) {
override fun onCreate(db: SQLiteDatabase) {
onUpgrade(db, 0, version)
}
override fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {
for (command in builder.getStatements(oldVersion, newVersion)) {
db.execSQL(command)
}
}
override fun onDowngrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {
SqlUtils.dropAllTable(db)
onCreate(db)
}
}
@@ -1,166 +0,0 @@
/*
* Copyright (C) 2015 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.drawable;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import androidx.annotation.Keep;
import com.hippo.ehviewer.R;
import com.hippo.yorozuya.MathUtils;
public class AddDeleteDrawable extends Drawable {
private final Paint mPaint = new Paint();
private final Path mPath = new Path();
private final int mSize;
private float mProgress;
private boolean mAutoUpdateMirror = false;
private boolean mVerticalMirror = false;
/**
* @param context used to get the configuration for the drawable from
*/
public AddDeleteDrawable(Context context, int color) {
Resources resources = context.getResources();
mSize = resources.getDimensionPixelSize(R.dimen.add_size);
float barThickness = Math.round(resources.getDimension(R.dimen.add_thickness));
mPaint.setColor(color);
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setStrokeJoin(Paint.Join.MITER);
mPaint.setStrokeCap(Paint.Cap.BUTT);
mPaint.setStrokeWidth(barThickness);
float halfSize = mSize / 2;
mPath.moveTo(0f, -halfSize);
mPath.lineTo(0, halfSize);
mPath.moveTo(-halfSize, 0);
mPath.lineTo(halfSize, 0);
}
@Override
public void draw(Canvas canvas) {
Rect bounds = getBounds();
float canvasRotate;
if (mVerticalMirror) {
canvasRotate = MathUtils.lerp(270, 135f, mProgress);
} else {
canvasRotate = MathUtils.lerp(0f, 135f, mProgress);
}
canvas.save();
canvas.translate(bounds.centerX(), bounds.centerY());
canvas.rotate(canvasRotate);
canvas.drawPath(mPath, mPaint);
canvas.restore();
}
public void setColor(int color) {
mPaint.setColor(color);
invalidateSelf();
}
@Override
public void setAlpha(int alpha) {
mPaint.setAlpha(alpha);
}
@Override
public void setColorFilter(ColorFilter cf) {
mPaint.setColorFilter(cf);
}
@Override
public int getIntrinsicHeight() {
return mSize * 6 / 5;
}
@Override
public int getIntrinsicWidth() {
return mSize * 6 / 5;
}
/**
* If set, canvas is flipped when progress reached to end and going back to start.
*/
protected void setVerticalMirror(boolean verticalMirror) {
mVerticalMirror = verticalMirror;
}
public void setAutoUpdateMirror(boolean autoUpdateMirror) {
mAutoUpdateMirror = autoUpdateMirror;
}
@Keep
public float getProgress() {
return mProgress;
}
@Keep
public void setProgress(float progress) {
if (mAutoUpdateMirror) {
if (progress == 1f) {
setVerticalMirror(true);
} else if (progress == 0f) {
setVerticalMirror(false);
}
}
mProgress = progress;
invalidateSelf();
}
public void setAdd(long duration) {
setShape(false, duration);
}
public void setDelete(long duration) {
setShape(true, duration);
}
public void setShape(boolean delete, long duration) {
if (!((!delete && mProgress == 0f) || (delete && mProgress == 1f))) {
float endProgress = delete ? 1f : 0f;
if (duration <= 0) {
setProgress(endProgress);
} else {
ObjectAnimator oa = ObjectAnimator.ofFloat(this, "progress", endProgress);
oa.setDuration(duration);
oa.setAutoCancel(true);
oa.start();
}
}
}
@Override
public int getOpacity() {
return PixelFormat.TRANSLUCENT;
}
}
@@ -1,68 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.drawable
import android.graphics.Canvas
import android.graphics.Rect
import android.graphics.RectF
import android.graphics.drawable.Drawable
import android.graphics.drawable.DrawableWrapper
import androidx.core.graphics.withClip
/**
* Show a part of the original drawable
*/
class PreciselyClipDrawable(
drawable: Drawable,
offsetX: Int,
offsetY: Int,
width: Int,
height: Int
) : DrawableWrapper(drawable) {
private val mScale: RectF
private val mTemp = Rect()
init {
val originWidth = drawable.intrinsicWidth.toFloat()
val originHeight = drawable.intrinsicHeight.toFloat()
mScale = RectF(
(offsetX / originWidth).coerceIn(0.0f, 1.0f),
(offsetY / originHeight).coerceIn(0.0f, 1.0f),
((offsetX + width) / originWidth).coerceIn(0.0f, 1.0f),
((offsetY + height) / originHeight).coerceIn(0.0f, 1.0f),
)
}
override fun onBoundsChange(bounds: Rect) {
mTemp.left = ((mScale.left * bounds.right - mScale.right * bounds.left) / (mScale.left * (1 - mScale.right) - mScale.right * (1 - mScale.left))).toInt()
mTemp.right = (((1 - mScale.right) * bounds.left - (1 - mScale.left) * bounds.right) / (mScale.left * (1 - mScale.right) - mScale.right * (1 - mScale.left))).toInt()
mTemp.top = ((mScale.top * bounds.bottom - mScale.bottom * bounds.top) / (mScale.top * (1 - mScale.bottom) - mScale.bottom * (1 - mScale.top))).toInt()
mTemp.bottom = (((1 - mScale.bottom) * bounds.top - (1 - mScale.top) * bounds.bottom) / (mScale.top * (1 - mScale.bottom) - mScale.bottom * (1 - mScale.top))).toInt()
super.onBoundsChange(mTemp)
}
override fun getIntrinsicWidth(): Int {
return (super.getIntrinsicWidth() * mScale.width()).toInt()
}
override fun getIntrinsicHeight(): Int {
return (super.getIntrinsicHeight() * mScale.height()).toInt()
}
override fun draw(canvas: Canvas) {
canvas.withClip(bounds) { super.draw(canvas) }
}
}
@@ -1,72 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.drawable;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
public class TriangleDrawable extends Drawable {
private final Paint mPaint;
private final Path mPath;
public TriangleDrawable(int color) {
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG);
mPaint.setColor(color);
mPath = new Path();
}
public void setColor(int color) {
mPaint.setColor(color);
invalidateSelf();
}
@Override
protected void onBoundsChange(Rect bounds) {
super.onBoundsChange(bounds);
mPath.reset();
mPath.moveTo(bounds.left, bounds.top);
mPath.lineTo(bounds.right, bounds.top);
mPath.lineTo(bounds.right, bounds.bottom);
mPath.close();
}
@Override
public void draw(Canvas canvas) {
canvas.drawPath(mPath, mPaint);
}
@Override
public void setAlpha(int alpha) {
mPaint.setAlpha(alpha);
}
@Override
public void setColorFilter(ColorFilter colorFilter) {
mPaint.setColorFilter(colorFilter);
}
@Override
public int getOpacity() {
return PixelFormat.OPAQUE;
}
}
@@ -1,104 +0,0 @@
/*
* Copyright 2015 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.drawable;
import android.graphics.drawable.AnimatedImageDrawable;
import android.graphics.drawable.Drawable;
import com.hippo.widget.ObservedTextView;
import coil.Coil;
import coil.request.Disposable;
import coil.request.ImageRequest;
public class UnikeryDrawable extends WrapDrawable implements ObservedTextView.OnWindowAttachListener {
private static final String TAG = UnikeryDrawable.class.getSimpleName();
private final ObservedTextView mTextView;
private String mUrl;
private Disposable task;
public UnikeryDrawable(ObservedTextView textView) {
mTextView = textView;
mTextView.setOnWindowAttachListener(this);
}
@Override
public void onAttachedToWindow() {
load(mUrl);
}
@Override
public void onDetachedFromWindow() {
if (task != null && !task.isDisposed())
task.dispose();
clearDrawable();
}
public void load(String url) {
if (url != null) {
mUrl = url;
var imageLoader = Coil.imageLoader(mTextView.getContext());
var request = new ImageRequest.Builder(mTextView.getContext()).data(url).memoryCacheKey(url).diskCacheKey(url).target(
drawable -> null,
drawable -> null,
drawable -> {
onGetValue(drawable);
return null;
}
).build();
task = imageLoader.enqueue(request);
}
}
private void clearDrawable() {
setDrawable(null);
}
@Override
public void setDrawable(Drawable drawable) {
// Remove old callback
Drawable oldDrawable = getDrawable();
if (oldDrawable != null) {
oldDrawable.setCallback(null);
}
super.setDrawable(drawable);
if (drawable != null) {
drawable.setCallback(mTextView);
}
updateBounds();
if (drawable != null) {
invalidateSelf();
}
}
@Override
public void invalidateSelf() {
CharSequence cs = mTextView.getText();
mTextView.setText(cs);
}
public void onGetValue(Drawable drawable) {
clearDrawable();
setDrawable(drawable);
if (drawable instanceof AnimatedImageDrawable animatedImageDrawable)
animatedImageDrawable.start();
}
}
@@ -1,143 +0,0 @@
/*
* Copyright 2015 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.drawable;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
public class WrapDrawable extends Drawable {
private Drawable mDrawable;
public Drawable getDrawable() {
return mDrawable;
}
public void setDrawable(Drawable drawable) {
mDrawable = drawable;
}
public void updateBounds() {
setBounds(0, 0, getIntrinsicWidth(), getIntrinsicHeight());
}
@Override
public void draw(Canvas canvas) {
if (mDrawable != null) {
mDrawable.draw(canvas);
}
}
@Override
public void setBounds(int left, int top, int right, int bottom) {
super.setBounds(left, top, right, bottom);
if (mDrawable != null) {
mDrawable.setBounds(left, top, right, bottom);
}
}
@Override
public void setBounds(Rect bounds) {
super.setBounds(bounds);
if (mDrawable != null) {
mDrawable.setBounds(bounds);
}
}
@Override
public int getChangingConfigurations() {
if (mDrawable != null) {
return mDrawable.getChangingConfigurations();
} else {
return super.getChangingConfigurations();
}
}
@Override
public void setChangingConfigurations(int configs) {
super.setChangingConfigurations(configs);
if (mDrawable != null) {
mDrawable.setChangingConfigurations(configs);
}
}
@Override
public void setDither(boolean dither) {
super.setDither(dither);
if (mDrawable != null) {
mDrawable.setDither(dither);
}
}
@Override
public void setFilterBitmap(boolean filter) {
super.setFilterBitmap(filter);
if (mDrawable != null) {
mDrawable.setFilterBitmap(filter);
}
}
@Override
public void setAlpha(int alpha) {
if (mDrawable != null) {
mDrawable.setAlpha(alpha);
}
}
@Override
public void setColorFilter(ColorFilter cf) {
if (mDrawable != null) {
mDrawable.setColorFilter(cf);
}
}
@Override
public int getOpacity() {
if (mDrawable != null) {
return mDrawable.getOpacity();
} else {
return PixelFormat.UNKNOWN;
}
}
@Override
public int getIntrinsicWidth() {
if (mDrawable != null) {
return mDrawable.getIntrinsicWidth();
} else {
return super.getIntrinsicWidth();
}
}
@Override
public int getIntrinsicHeight() {
if (mDrawable != null) {
return mDrawable.getIntrinsicHeight();
} else {
return super.getIntrinsicHeight();
}
}
}
@@ -1,675 +0,0 @@
/*
* Copyright (C) 2015 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.easyrecyclerview;
import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.SparseBooleanArray;
import android.view.ActionMode;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Checkable;
import androidx.annotation.NonNull;
import androidx.collection.LongSparseArray;
import androidx.recyclerview.widget.RecyclerView;
import com.hippo.yorozuya.NumberUtils;
/**
* Add setChoiceMode for RecyclerView
*/
// Get some code from twoway-view and AbsListView.
public class EasyRecyclerView extends RecyclerView {
/**
* Normal list that does not indicate choices
*/
public static final int CHOICE_MODE_NONE = 0;
/**
* The list allows up to one choice
*/
public static final int CHOICE_MODE_SINGLE = 1;
/**
* The list allows multiple choices
*/
public static final int CHOICE_MODE_MULTIPLE = 2;
/**
* The list allows multiple choices in a modal selection mode
*/
public static final int CHOICE_MODE_MULTIPLE_MODAL = 3;
/**
* The list allows multiple choices in custom action
*/
public static final int CHOICE_MODE_MULTIPLE_CUSTOM = 4;
// Fling friction
public float pageScrollThreshold;
/**
* Wrapper for the multiple choice mode callback; AbsListView needs to perform
* a few extra actions around what application code does.
*/
MultiChoiceModeWrapper mMultiChoiceModeCallback;
/**
* Controls if/how the user may choose/check items in the list
*/
private int mChoiceMode = CHOICE_MODE_NONE;
/**
* Controls CHOICE_MODE_MULTIPLE_MODAL. null when inactive.
*/
private ActionMode mChoiceActionMode;
/**
* Listener for custom multiple choices
*/
private CustomChoiceListener mCustomChoiceListener;
private boolean mCustomChoice = false;
/**
* A lock, avoid OutOfCustomChoiceMode when doing OutOfCustomChoiceMode
*/
private boolean mOutOfCustomChoiceModing = false;
private SparseBooleanArray mTempCheckStates;
/**
* Running count of how many items are currently checked
*/
private int mCheckedItemCount;
/**
* Running state of which positions are currently checked
*/
private SparseBooleanArray mCheckStates;
/**
* Running state of which IDs are currently checked.
* If there is a value for a given key, the checked state for that ID is true
* and the value holds the last known position in the adapter for that id.
*/
private LongSparseArray<Integer> mCheckedIdStates;
private Adapter<?> mAdapter;
public EasyRecyclerView(Context context) {
super(context);
EasyRecyclerView.this.init(context);
}
public EasyRecyclerView(Context context, AttributeSet attrs) {
super(context, attrs);
EasyRecyclerView.this.init(context);
}
public EasyRecyclerView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
EasyRecyclerView.this.init(context);
}
public static void setViewChecked(View view, boolean checked) {
if (view instanceof Checkable) {
((Checkable) view).setChecked(checked);
} else {
view.setActivated(checked);
}
}
/**
* {@inheritDoc}
*/
@Override
public void setAdapter(RecyclerView.Adapter adapter) {
super.setAdapter(adapter);
mAdapter = adapter;
if (adapter != null) {
if (mChoiceMode != CHOICE_MODE_NONE && adapter.hasStableIds() &&
mCheckedIdStates == null) {
mCheckedIdStates = new LongSparseArray<>();
}
}
if (mCheckStates != null) {
mCheckStates.clear();
}
if (mCheckedIdStates != null) {
mCheckedIdStates.clear();
}
}
@Override
public void onChildAttachedToWindow(@NonNull View child) {
super.onChildAttachedToWindow(child);
if (mCheckStates != null) {
int position = getChildAdapterPosition(child);
if (position >= 0) {
setViewChecked(child, mCheckStates.get(position));
}
}
}
public int getCheckedItemCount() {
return mCheckedItemCount;
}
/**
* Returns the checked state of the specified position. The result is only
* valid if the choice mode has been set to {@link #CHOICE_MODE_SINGLE}
* or {@link #CHOICE_MODE_MULTIPLE}.
*
* @param position The item whose checked state to return
* @return The item's checked state or <code>false</code> if choice mode
* is invalid
* @see #setChoiceMode(int)
*/
public boolean isItemChecked(int position) {
//noinspection SimplifiableIfStatement
if (mChoiceMode != CHOICE_MODE_NONE && mCheckStates != null) {
return mCheckStates.get(position);
}
return false;
}
/**
* Returns the set of checked items in the list. The result is only valid if
* the choice mode has not been set to {@link #CHOICE_MODE_NONE}.
*
* @return A SparseBooleanArray which will return true for each call to
* get(int position) where position is a checked position in the
* list and false otherwise, or <code>null</code> if the choice
* mode is set to {@link #CHOICE_MODE_NONE}.
*/
public SparseBooleanArray getCheckedItemPositions() {
if (mChoiceMode != CHOICE_MODE_NONE) {
return mCheckStates;
}
return null;
}
public boolean isInCustomChoice() {
return mCustomChoice;
}
public void intoCustomChoiceMode() {
if (mChoiceMode == CHOICE_MODE_MULTIPLE_CUSTOM && !mCustomChoice) {
mCustomChoice = true;
mCustomChoiceListener.onIntoCustomChoice(this);
}
}
public void outOfCustomChoiceMode() {
if (mChoiceMode == CHOICE_MODE_MULTIPLE_CUSTOM && mCustomChoice && !mOutOfCustomChoiceModing) {
mOutOfCustomChoiceModing = true;
// Copy mCheckStates
mTempCheckStates.clear();
for (int i = 0, n = mCheckStates.size(); i < n; i++) {
mTempCheckStates.put(mCheckStates.keyAt(i), mCheckStates.valueAt(i));
}
// Uncheck remain checked items
for (int i = 0, n = mTempCheckStates.size(); i < n; i++) {
if (mTempCheckStates.valueAt(i)) {
setItemChecked(mTempCheckStates.keyAt(i), false);
}
}
mCustomChoice = false;
mCustomChoiceListener.onOutOfCustomChoice(this);
mOutOfCustomChoiceModing = false;
}
}
/**
* Clear any choices previously set
*/
private void clearChoices() {
if (mCheckStates != null) {
mCheckStates.clear();
}
if (mCheckedIdStates != null) {
mCheckedIdStates.clear();
}
mCheckedItemCount = 0;
updateOnScreenCheckedViews();
}
/**
* Sets all items checked.
*/
public void checkAll() {
if (mChoiceMode == CHOICE_MODE_NONE || mChoiceMode == CHOICE_MODE_SINGLE) {
return;
}
// Check is intoCheckMode
if (mChoiceMode == CHOICE_MODE_MULTIPLE_CUSTOM && !mCustomChoice) {
throw new IllegalStateException("Call intoCheckMode first");
}
// Start selection mode if needed. We don't need to if we're unchecking something.
if (mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL && mChoiceActionMode == null) {
if (mMultiChoiceModeCallback == null ||
!mMultiChoiceModeCallback.hasWrappedCallback()) {
throw new IllegalStateException("EasyRecyclerView: attempted to start selection mode " +
"for CHOICE_MODE_MULTIPLE_MODAL but no choice mode callback was " +
"supplied. Call setMultiChoiceModeListener to set a callback.");
}
mChoiceActionMode = startActionMode(mMultiChoiceModeCallback);
}
for (int i = 0, n = mAdapter.getItemCount(); i < n; i++) {
boolean oldValue = mCheckStates.get(i);
mCheckStates.put(i, true);
if (mCheckedIdStates != null && mAdapter.hasStableIds()) {
mCheckedIdStates.put(mAdapter.getItemId(i), i);
}
if (!oldValue) {
mCheckedItemCount++;
}
if (mChoiceActionMode != null) {
final long id = mAdapter.getItemId(i);
mMultiChoiceModeCallback.onItemCheckedStateChanged(mChoiceActionMode, i, id, true);
}
if (mChoiceMode == CHOICE_MODE_MULTIPLE_CUSTOM) {
final long id = mAdapter.getItemId(i);
mCustomChoiceListener.onItemCheckedStateChanged(this, i, id, true);
}
}
updateOnScreenCheckedViews();
}
public void toggleItemChecked(int position) {
if (mCheckStates != null) {
setItemChecked(position, !mCheckStates.get(position));
}
}
/**
* Sets the checked state of the specified position. The is only valid if
* the choice mode has been set to {@link #CHOICE_MODE_SINGLE} or
* {@link #CHOICE_MODE_MULTIPLE}.
*
* @param position The item whose checked state is to be checked
* @param value The new checked state for the item
*/
public void setItemChecked(int position, boolean value) {
if (mChoiceMode == CHOICE_MODE_NONE) {
return;
}
// Check is intoCheckMode
if (mChoiceMode == CHOICE_MODE_MULTIPLE_CUSTOM && !mCustomChoice) {
throw new IllegalStateException("Call intoCheckMode first");
}
// Start selection mode if needed. We don't need to if we're unchecking something.
if (value && mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL && mChoiceActionMode == null) {
if (mMultiChoiceModeCallback == null ||
!mMultiChoiceModeCallback.hasWrappedCallback()) {
throw new IllegalStateException("EasyRecyclerView: attempted to start selection mode " +
"for CHOICE_MODE_MULTIPLE_MODAL but no choice mode callback was " +
"supplied. Call setMultiChoiceModeListener to set a callback.");
}
mChoiceActionMode = startActionMode(mMultiChoiceModeCallback);
}
if (mChoiceMode == CHOICE_MODE_MULTIPLE || mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL || mChoiceMode == CHOICE_MODE_MULTIPLE_CUSTOM) {
boolean oldValue = mCheckStates.get(position);
mCheckStates.put(position, value);
if (mCheckedIdStates != null && mAdapter.hasStableIds()) {
if (value) {
mCheckedIdStates.put(mAdapter.getItemId(position), position);
} else {
mCheckedIdStates.remove(mAdapter.getItemId(position));
}
}
if (oldValue != value) {
if (value) {
mCheckedItemCount++;
} else {
mCheckedItemCount--;
}
}
if (mChoiceActionMode != null) {
final long id = mAdapter.getItemId(position);
mMultiChoiceModeCallback.onItemCheckedStateChanged(mChoiceActionMode,
position, id, value);
}
if (mChoiceMode == CHOICE_MODE_MULTIPLE_CUSTOM) {
final long id = mAdapter.getItemId(position);
mCustomChoiceListener.onItemCheckedStateChanged(this, position, id, value);
}
} else {
boolean updateIds = mCheckedIdStates != null && mAdapter.hasStableIds();
// Clear all values if we're checking something, or unchecking the currently
// selected item
if (value || isItemChecked(position)) {
mCheckStates.clear();
if (updateIds) {
mCheckedIdStates.clear();
}
}
// this may end up selecting the value we just cleared but this way
// we ensure length of mCheckStates is 1, a fact getCheckedItemPosition relies on
if (value) {
mCheckStates.put(position, true);
if (updateIds) {
mCheckedIdStates.put(mAdapter.getItemId(position), position);
}
mCheckedItemCount = 1;
} else if (mCheckStates.size() == 0 || !mCheckStates.valueAt(0)) {
mCheckedItemCount = 0;
}
}
updateOnScreenCheckedViews();
}
/**
* Defines the choice behavior for the List. By default, Lists do not have any choice behavior
* ({@link #CHOICE_MODE_NONE}). By setting the choiceMode to {@link #CHOICE_MODE_SINGLE}, the
* List allows up to one item to be in a chosen state. By setting the choiceMode to
* {@link #CHOICE_MODE_MULTIPLE}, the list allows any number of items to be chosen.
*
* @param choiceMode One of {@link #CHOICE_MODE_NONE}, {@link #CHOICE_MODE_SINGLE}, or
* {@link #CHOICE_MODE_MULTIPLE}
*/
public void setChoiceMode(int choiceMode) {
mChoiceMode = choiceMode;
if (mChoiceActionMode != null) {
mChoiceActionMode.finish();
mChoiceActionMode = null;
}
if (mChoiceMode != CHOICE_MODE_NONE) {
if (mCheckStates == null) {
mCheckStates = new SparseBooleanArray(0);
}
if (mCheckedIdStates == null && mAdapter != null && mAdapter.hasStableIds()) {
mCheckedIdStates = new LongSparseArray<>(0);
}
// Modal multi-choice mode only has choices when the mode is active. Clear them.
if (mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL) {
clearChoices();
setLongClickable(true);
} else if (mChoiceMode == CHOICE_MODE_MULTIPLE_CUSTOM) {
if (mTempCheckStates == null) {
mTempCheckStates = new SparseBooleanArray(0);
}
clearChoices();
}
}
}
public void setCustomCheckedListener(CustomChoiceListener listener) {
mCustomChoiceListener = listener;
}
/**
* Perform a quick, in-place update of the checked or activated state
* on all visible item views. This should only be called when a valid
* choice mode is active.
*/
private void updateOnScreenCheckedViews() {
final int count = getChildCount();
for (int i = 0; i < count; i++) {
final View child = getChildAt(i);
final int position = getChildAdapterPosition(child);
setViewChecked(child, mCheckStates.get(position));
}
}
private void init(Context context) {
float scale = context.getResources().getDisplayMetrics().density;
// g (m/s^2)
// inch/meter
// A context-specific coefficient adjusted to physical values.
// look and feel tuning
pageScrollThreshold = scale * 80;
}
@Override
public Parcelable onSaveInstanceState() {
final SavedState ss = new SavedState(super.onSaveInstanceState());
ss.choiceMode = mChoiceMode;
ss.customChoice = mCustomChoice;
ss.checkedItemCount = mCheckedItemCount;
ss.checkState = mCheckStates;
ss.checkIdState = mCheckedIdStates;
return ss;
}
@Override
public void onRestoreInstanceState(Parcelable state) {
SavedState ss = (SavedState) state;
super.onRestoreInstanceState(ss.getSuperState());
setChoiceMode(ss.choiceMode);
mCustomChoice = ss.customChoice;
mCheckedItemCount = ss.checkedItemCount;
if (ss.checkState != null) {
mCheckStates = ss.checkState;
}
if (ss.checkIdState != null) {
mCheckedIdStates = ss.checkIdState;
}
if (mChoiceMode == CHOICE_MODE_MULTIPLE_MODAL && mCheckedItemCount > 0) {
mChoiceActionMode = startActionMode(mMultiChoiceModeCallback);
}
updateOnScreenCheckedViews();
}
/**
* A MultiChoiceModeListener receives events for {@link android.widget.AbsListView#CHOICE_MODE_MULTIPLE_MODAL}.
* It acts as the {@link android.view.ActionMode.Callback} for the selection mode and also receives
* {@link #onItemCheckedStateChanged(android.view.ActionMode, int, long, boolean)} events when the user
* selects and deselects list items.
*/
public interface MultiChoiceModeListener extends ActionMode.Callback {
/**
* Called when an item is checked or unchecked during selection mode.
*
* @param mode The {@link android.view.ActionMode} providing the selection mode
* @param position Adapter position of the item that was checked or unchecked
* @param id Adapter ID of the item that was checked or unchecked
* @param checked <code>true</code> if the item is now checked, <code>false</code>
* if the item is now unchecked.
*/
void onItemCheckedStateChanged(ActionMode mode,
int position, long id, boolean checked);
}
/**
* Custom checked
*/
public interface CustomChoiceListener {
void onIntoCustomChoice(EasyRecyclerView view);
void onOutOfCustomChoice(EasyRecyclerView view);
void onItemCheckedStateChanged(EasyRecyclerView view, int position, long id, boolean checked);
}
/**
* This saved state class is a Parcelable and should not extend
* {@link android.view.View.BaseSavedState} nor {@link android.view.AbsSavedState}
* because its super class AbsSavedState's constructor
* currently passes null
* as a class loader to read its superstate from Parcelable.
* This causes {@link android.os.BadParcelableException} when restoring saved states.
* <p/>
* The super class "RecyclerView" is a part of the support library,
* and restoring its saved state requires the class loader that loaded the RecyclerView.
* It seems that the class loader is not required when restoring from RecyclerView itself,
* but it is required when restoring from RecyclerView's subclasses.
*/
static class SavedState implements Parcelable {
public static final SavedState EMPTY_STATE = new SavedState() {
};
public static final Parcelable.Creator<SavedState> CREATOR
= new Parcelable.Creator<SavedState>() {
@Override
public SavedState createFromParcel(Parcel in) {
return new SavedState(in);
}
@Override
public SavedState[] newArray(int size) {
return new SavedState[size];
}
};
int choiceMode;
boolean customChoice;
int checkedItemCount;
SparseBooleanArray checkState;
LongSparseArray<Integer> checkIdState;
// This keeps the parent(RecyclerView)'s state
Parcelable mSuperState;
SavedState() {
mSuperState = null;
}
/**
* Constructor called from {@link #onSaveInstanceState()}
*/
SavedState(Parcelable superState) {
mSuperState = superState != EMPTY_STATE ? superState : null;
}
/**
* Constructor called from {@link #CREATOR}
*/
private SavedState(Parcel in) {
// Parcel 'in' has its parent(RecyclerView)'s saved state.
// To restore it, class loader that loaded RecyclerView is required.
Parcelable superState = in.readParcelable(RecyclerView.class.getClassLoader());
mSuperState = superState != null ? superState : EMPTY_STATE;
choiceMode = in.readInt();
customChoice = NumberUtils.int2boolean(in.readInt());
checkedItemCount = in.readInt();
checkState = in.readSparseBooleanArray();
final int N = in.readInt();
if (N > 0) {
checkIdState = new LongSparseArray<>();
for (int i = 0; i < N; i++) {
final long key = in.readLong();
final int value = in.readInt();
checkIdState.put(key, value);
}
}
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(@NonNull Parcel out, int flags) {
out.writeParcelable(mSuperState, flags);
out.writeInt(choiceMode);
out.writeInt(NumberUtils.boolean2int(customChoice));
out.writeInt(checkedItemCount);
out.writeSparseBooleanArray(checkState);
final int N = checkIdState != null ? checkIdState.size() : 0;
out.writeInt(N);
for (int i = 0; i < N; i++) {
out.writeLong(checkIdState.keyAt(i));
out.writeInt(checkIdState.valueAt(i));
}
}
public Parcelable getSuperState() {
return mSuperState;
}
}
class MultiChoiceModeWrapper implements MultiChoiceModeListener {
private MultiChoiceModeListener mWrapped;
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
public boolean hasWrappedCallback() {
return mWrapped != null;
}
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
if (mWrapped.onCreateActionMode(mode, menu)) {
// Initialize checked graphic state?
setLongClickable(false);
return true;
}
return false;
}
@Override
public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
return mWrapped.onPrepareActionMode(mode, menu);
}
@Override
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
return mWrapped.onActionItemClicked(mode, item);
}
@Override
public void onDestroyActionMode(ActionMode mode) {
mWrapped.onDestroyActionMode(mode);
mChoiceActionMode = null;
// Ending selection mode means deselecting everything.
clearChoices();
requestLayout();
setLongClickable(true);
}
@Override
public void onItemCheckedStateChanged(ActionMode mode,
int position, long id, boolean checked) {
mWrapped.onItemCheckedStateChanged(mode, position, id, checked);
// If there are no items selected we no longer need the selection mode.
if (getCheckedItemCount() == 0) {
mode.finish();
}
}
}
}
@@ -1,404 +0,0 @@
/*
* Copyright 2015 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.easyrecyclerview;
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.hippo.ehviewer.R;
import com.hippo.yorozuya.AnimationUtils;
import com.hippo.yorozuya.LayoutUtils;
import com.hippo.yorozuya.MathUtils;
import com.hippo.yorozuya.SimpleAnimatorListener;
import com.hippo.yorozuya.SimpleHandler;
public class FastScroller extends View {
private static final int INVALID = -1;
private static final int SCROLL_BAR_FADE_DURATION = 500;
private static final int SCROLL_BAR_DELAY = 1000;
private static final int MIN_HANDLER_HEIGHT_DP = 32;
private Handler mSimpleHandler;
private boolean mDraggable;
private int mMinHandlerHeight;
private RecyclerView mRecyclerView;
private RecyclerView.OnScrollListener mOnScrollChangeListener;
private RecyclerView.Adapter<?> mAdapter;
private RecyclerView.AdapterDataObserver mAdapterDataObserver;
private Drawable mHandler;
private int mHandlerOffset = INVALID;
private int mHandlerHeight = INVALID;
private float mDownX = INVALID;
private float mDownY = INVALID;
private float mLastMotionY = INVALID;
private boolean mDragged = false;
private boolean mCantDrag = false;
private int mTouchSlop;
private OnDragHandlerListener mListener;
private ObjectAnimator mShowAnimator;
private ObjectAnimator mHideAnimator;
private final Runnable mHideRunnable = new Runnable() {
@Override
public void run() {
mHideAnimator.start();
}
};
public FastScroller(Context context) {
super(context);
init(context, null, 0);
}
public FastScroller(Context context, AttributeSet attrs) {
super(context, attrs);
init(context, attrs, 0);
}
public FastScroller(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context, attrs, defStyleAttr);
}
private void init(Context context, AttributeSet attrs, int defStyleAttr) {
mSimpleHandler = SimpleHandler.getInstance();
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.FastScroller, defStyleAttr, 0);
mHandler = a.getDrawable(R.styleable.FastScroller_handler);
mDraggable = a.getBoolean(R.styleable.FastScroller_draggable, true);
a.recycle();
setAlpha(0.0f);
setVisibility(INVISIBLE);
mMinHandlerHeight = LayoutUtils.dp2pix(context, MIN_HANDLER_HEIGHT_DP);
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
mShowAnimator = ObjectAnimator.ofFloat(this, "alpha", 1.0f);
mShowAnimator.setInterpolator(AnimationUtils.FAST_SLOW_INTERPOLATOR);
mShowAnimator.setDuration(SCROLL_BAR_FADE_DURATION);
mHideAnimator = ObjectAnimator.ofFloat(this, "alpha", 0.0f);
mHideAnimator.setInterpolator(AnimationUtils.SLOW_FAST_INTERPOLATOR);
mHideAnimator.setDuration(SCROLL_BAR_FADE_DURATION);
mHideAnimator.addListener(new SimpleAnimatorListener() {
private boolean mCancel;
@Override
public void onAnimationCancel(Animator animation) {
mCancel = true;
}
@Override
public void onAnimationEnd(Animator animation) {
if (mCancel) {
mCancel = false;
} else {
setVisibility(INVISIBLE);
}
}
});
}
public void setOnDragHandlerListener(OnDragHandlerListener listener) {
mListener = listener;
}
private void updatePosition(boolean show) {
if (mRecyclerView == null) {
return;
}
int paddingTop = getPaddingTop();
int paddingBottom = getPaddingBottom();
int height = getHeight() - paddingTop - paddingBottom;
int offset = mRecyclerView.computeVerticalScrollOffset();
int extent = mRecyclerView.computeVerticalScrollExtent();
int range = mRecyclerView.computeVerticalScrollRange();
if (height <= 0 || extent >= range || extent <= 0) {
return;
}
int endOffset = height * offset / range;
int endHeight = height * extent / range;
endHeight = Math.max(endHeight, mMinHandlerHeight);
endOffset = Math.min(endOffset, height - endHeight);
mHandlerOffset = endOffset + paddingTop;
mHandlerHeight = endHeight;
if (show) {
if (mHideAnimator.isRunning()) {
mHideAnimator.cancel();
mShowAnimator.start();
} else if (getVisibility() != VISIBLE && !mShowAnimator.isRunning()) {
setVisibility(VISIBLE);
mShowAnimator.start();
}
Handler handler = mSimpleHandler;
handler.removeCallbacks(mHideRunnable);
if (!mDragged) {
handler.postDelayed(mHideRunnable, SCROLL_BAR_DELAY);
}
}
}
public void setHandlerDrawable(Drawable drawable) {
mHandler = drawable;
invalidate();
}
public boolean isDraggable() {
return mDraggable;
}
public void setDraggable(boolean draggable) {
mDraggable = draggable;
if (mDragged) {
mDragged = false;
}
mSimpleHandler.removeCallbacks(mHideRunnable);
mHideRunnable.run();
}
public boolean isAttached() {
return mRecyclerView != null;
}
public void attachToRecyclerView(RecyclerView recyclerView) {
if (recyclerView == null) {
return;
}
if (mRecyclerView != null) {
throw new IllegalStateException("The FastScroller is already attached to a RecyclerView, " +
"call detachedFromRecyclerView first");
}
mRecyclerView = recyclerView;
mOnScrollChangeListener = new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
}
@Override
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
updatePosition(true);
invalidate();
}
};
recyclerView.addOnScrollListener(mOnScrollChangeListener);
mAdapter = recyclerView.getAdapter();
if (mAdapter != null) {
mAdapterDataObserver = new RecyclerView.AdapterDataObserver() {
@Override
public void onItemRangeChanged(int positionStart, int itemCount) {
super.onItemRangeChanged(positionStart, itemCount);
updatePosition(false);
invalidate();
}
@Override
public void onItemRangeChanged(int positionStart, int itemCount, Object payload) {
super.onItemRangeChanged(positionStart, itemCount, payload);
updatePosition(false);
invalidate();
}
@Override
public void onItemRangeInserted(int positionStart, int itemCount) {
super.onItemRangeInserted(positionStart, itemCount);
updatePosition(false);
invalidate();
}
@Override
public void onItemRangeRemoved(int positionStart, int itemCount) {
super.onItemRangeRemoved(positionStart, itemCount);
updatePosition(false);
invalidate();
}
@Override
public void onItemRangeMoved(int fromPosition, int toPosition, int itemCount) {
super.onItemRangeMoved(fromPosition, toPosition, itemCount);
updatePosition(false);
invalidate();
}
};
mAdapter.registerAdapterDataObserver(mAdapterDataObserver);
}
}
public void detachedFromRecyclerView() {
if (mRecyclerView != null && mOnScrollChangeListener != null) {
mRecyclerView.removeOnScrollListener(mOnScrollChangeListener);
}
mRecyclerView = null;
mOnScrollChangeListener = null;
if (mAdapter != null && mAdapterDataObserver != null) {
mAdapter.unregisterAdapterDataObserver(mAdapterDataObserver);
}
mAdapter = null;
mAdapterDataObserver = null;
setAlpha(0.0f);
setVisibility(INVISIBLE);
}
@Override
protected void onDraw(Canvas canvas) {
if (mRecyclerView == null || mHandler == null) {
return;
}
if (mHandlerHeight == INVALID) {
updatePosition(false);
}
if (mHandlerHeight == INVALID) {
return;
}
int paddingLeft = getPaddingLeft();
int saved = canvas.save();
canvas.translate(paddingLeft, mHandlerOffset);
mHandler.setBounds(0, 0, getWidth() - paddingLeft - getPaddingRight(), mHandlerHeight);
mHandler.draw(canvas);
canvas.restoreToCount(saved);
}
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouchEvent(MotionEvent event) {
if (!mDraggable || getVisibility() != VISIBLE || mRecyclerView == null || mHandlerHeight == INVALID) {
return false;
}
int action = event.getAction();
if (action == MotionEvent.ACTION_DOWN) {
mCantDrag = false;
}
if (mCantDrag) {
return false;
}
switch (action) {
case MotionEvent.ACTION_DOWN: {
mDragged = false;
mDownX = event.getX();
mDownY = event.getY();
if (mDownY < mHandlerOffset || mDownY > mHandlerOffset + mHandlerHeight) {
mCantDrag = true;
return false;
}
break;
}
case MotionEvent.ACTION_MOVE: {
if (!mDragged) {
float x = event.getX();
float y = event.getY();
// Check touch slop
if (MathUtils.dist(x, y, mDownX, mDownY) < mTouchSlop) {
return true;
}
if (Math.abs(x - mDownX) > Math.abs(y - mDownY) ||
y < mHandlerOffset || y > mHandlerOffset + mHandlerHeight) {
mCantDrag = true;
return false;
} else {
mDragged = true;
mSimpleHandler.removeCallbacks(mHideRunnable);
// Update mLastMotionY
if (mDownY < mHandlerOffset || mDownY >= mHandlerOffset + mHandlerHeight) {
// the point out of handler, make the point in handler center
mLastMotionY = mHandlerOffset + mHandlerHeight / 2;
} else {
mLastMotionY = mDownY;
}
// Notify
if (mListener != null) {
mListener.onStartDragHandler();
}
}
}
int range = mRecyclerView.computeVerticalScrollRange();
if (range <= 0) {
break;
}
float y = event.getY();
int scroll = (int) (range * (y - mLastMotionY) / (getHeight() - getPaddingTop() - getPaddingBottom()));
mRecyclerView.scrollBy(0, scroll);
mLastMotionY = y;
break;
}
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
// Notify
if (mDragged && mListener != null) {
mListener.onEndDragHandler();
}
mDragged = false;
mSimpleHandler.postDelayed(mHideRunnable, SCROLL_BAR_DELAY);
break;
}
return true;
}
public interface OnDragHandlerListener {
void onStartDragHandler();
void onEndDragHandler();
}
}
@@ -1,86 +0,0 @@
/*
* Copyright 2015 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.easyrecyclerview;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import androidx.annotation.NonNull;
public class HandlerDrawable extends Drawable {
private final Paint mPaint;
private final RectF mTemp = new RectF();
private int mColor = Color.BLACK;
public HandlerDrawable() {
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mPaint.setColor(mColor);
mPaint.setStyle(Paint.Style.FILL);
}
@Override
public void draw(@NonNull Canvas canvas) {
int width = getBounds().width();
int height = getBounds().height();
if (width > height) {
canvas.drawRect(0, 0, width, height, mPaint);
} else {
mTemp.set(0, 0, width, width);
canvas.drawArc(mTemp, -180, 180, true, mPaint);
mTemp.set(0, height - width, width, height);
canvas.drawArc(mTemp, 0, 180, true, mPaint);
float halfWidth = (float) width / 2.0f;
canvas.drawRect(0, halfWidth, width, height - halfWidth, mPaint);
}
}
public void setColor(int color) {
if (mColor != color) {
mColor = color;
mPaint.setColor(color);
}
}
@Override
public void setAlpha(int alpha) {
mPaint.setAlpha(alpha);
}
@Override
public void setColorFilter(ColorFilter colorFilter) {
mPaint.setColorFilter(colorFilter);
}
@Override
public int getOpacity() {
int alpha = Color.alpha(mColor);
if (alpha == 0xff) {
return PixelFormat.OPAQUE;
} else if (alpha == 0x00) {
return PixelFormat.TRANSPARENT;
} else {
return PixelFormat.TRANSLUCENT;
}
}
}
@@ -1,151 +0,0 @@
/*
* Copyright 2015 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.easyrecyclerview;
import android.content.Context;
import android.graphics.PointF;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
import com.hippo.yorozuya.MathUtils;
import com.hippo.yorozuya.SimpleHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public final class LayoutManagerUtils {
private static Method sCsdfp = null;
static {
try {
sCsdfp = StaggeredGridLayoutManager.class.getDeclaredMethod("calculateScrollDirectionForPosition", int.class);
sCsdfp.setAccessible(true);
} catch (NoSuchMethodException e) {
// Ignore
e.printStackTrace();
}
}
public static void scrollToPositionWithOffset(
RecyclerView.LayoutManager layoutManager, int position, int offset) {
if (layoutManager instanceof LinearLayoutManager) {
((LinearLayoutManager) layoutManager).scrollToPositionWithOffset(position, offset);
} else if (layoutManager instanceof StaggeredGridLayoutManager) {
((StaggeredGridLayoutManager) layoutManager).scrollToPositionWithOffset(position, offset);
} else {
throw new IllegalStateException("Can't do scrollToPositionWithOffset for " +
layoutManager.getClass().getName());
}
}
public static void smoothScrollToPosition(
RecyclerView.LayoutManager layoutManager, Context context, int position) {
smoothScrollToPosition(layoutManager, context, position, -1);
}
public static void smoothScrollToPosition(
RecyclerView.LayoutManager layoutManager, Context context, int position,
int millisecondsPerInch) {
SimpleSmoothScroller smoothScroller;
if (layoutManager instanceof final LinearLayoutManager linearLayoutManager) {
smoothScroller = new SimpleSmoothScroller(context, millisecondsPerInch) {
@Override
public PointF computeScrollVectorForPosition(int targetPosition) {
return linearLayoutManager.computeScrollVectorForPosition(targetPosition);
}
};
} else if (layoutManager instanceof final StaggeredGridLayoutManager staggeredGridLayoutManager) {
smoothScroller = new SimpleSmoothScroller(context, millisecondsPerInch) {
@Override
public PointF computeScrollVectorForPosition(int targetPosition) {
int direction = 0;
try {
direction = (Integer) sCsdfp.invoke(staggeredGridLayoutManager, targetPosition);
} catch (IllegalAccessException | InvocationTargetException e) {
e.printStackTrace();
}
if (direction == 0) {
return null;
}
if (staggeredGridLayoutManager.getOrientation() == StaggeredGridLayoutManager.HORIZONTAL) {
return new PointF(direction, 0);
} else {
return new PointF(0, direction);
}
}
};
} else {
throw new IllegalStateException("Can't do smoothScrollToPosition for " +
layoutManager.getClass().getName());
}
smoothScroller.setTargetPosition(position);
layoutManager.startSmoothScroll(smoothScroller);
}
public static void scrollToPositionProperly(final RecyclerView.LayoutManager layoutManager,
final Context context, final int position, final OnScrollToPositionListener listener) {
SimpleHandler.getInstance().postDelayed(() -> {
int first = getFirstVisibleItemPosition(layoutManager);
int last = getLastVisibleItemPosition(layoutManager);
int offset = Math.abs(position - first);
int max = last - first;
if (offset < max && max > 0) {
smoothScrollToPosition(layoutManager, context, position,
MathUtils.lerp(100, 25, (offset / max)));
} else {
scrollToPositionWithOffset(layoutManager, position, 0);
if (listener != null) {
listener.onScrollToPosition(position);
}
}
}, 200);
}
public static int getFirstVisibleItemPosition(RecyclerView.LayoutManager layoutManager) {
if (layoutManager instanceof LinearLayoutManager) {
return ((LinearLayoutManager) layoutManager).findFirstVisibleItemPosition();
} else if (layoutManager instanceof StaggeredGridLayoutManager) {
int[] positions = ((StaggeredGridLayoutManager) layoutManager).findFirstVisibleItemPositions(null);
return MathUtils.min(positions);
} else {
throw new IllegalStateException("Can't do getFirstVisibleItemPosition for " +
layoutManager.getClass().getName());
}
}
public static int getLastVisibleItemPosition(RecyclerView.LayoutManager layoutManager) {
if (layoutManager instanceof LinearLayoutManager) {
return ((LinearLayoutManager) layoutManager).findLastVisibleItemPosition();
} else if (layoutManager instanceof StaggeredGridLayoutManager) {
int[] positions = ((StaggeredGridLayoutManager) layoutManager).findLastVisibleItemPositions(null);
return MathUtils.max(positions);
} else {
throw new IllegalStateException("Can't do getLastVisibleItemPosition for " +
layoutManager.getClass().getName());
}
}
public interface OnScrollToPositionListener {
void onScrollToPosition(int position);
}
}
@@ -1,63 +0,0 @@
/*
* Copyright (C) 2015 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.easyrecyclerview;
import android.graphics.Rect;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
public class MarginItemDecoration extends RecyclerView.ItemDecoration {
private int mMargin;
private int mPaddingLeft;
private int mPaddingTop;
private int mPaddingRight;
private int mPaddingBottom;
public MarginItemDecoration(int margin, int paddingLeft, int paddingTop,
int paddingRight, int paddingBottom) {
setMargin(margin, paddingLeft, paddingTop, paddingRight, paddingBottom);
}
@Override
public void getItemOffsets(Rect outRect, View view,
RecyclerView parent, RecyclerView.State state) {
outRect.set(mMargin, mMargin, mMargin, mMargin);
}
/**
* @param margin gap between two item
* @param paddingLeft gap between RecyclerView left and left item left
* @param paddingTop gap between RecyclerView top and top item top
* @param paddingRight gap between RecyclerView right and right item right
* @param paddingBottom gap between RecyclerView bottom and bottom item bottom
*/
public void setMargin(int margin, int paddingLeft, int paddingTop,
int paddingRight, int paddingBottom) {
int halfMargin = margin / 2;
mMargin = halfMargin;
mPaddingLeft = paddingLeft - halfMargin;
mPaddingTop = paddingTop - halfMargin;
mPaddingRight = paddingRight - halfMargin;
mPaddingBottom = paddingBottom - halfMargin;
}
public void applyPaddings(View view) {
view.setPadding(mPaddingLeft, mPaddingTop, mPaddingRight, mPaddingBottom);
}
}
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2015 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.easyrecyclerview;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
public class SimpleHolder extends RecyclerView.ViewHolder {
public SimpleHolder(View itemView) {
super(itemView);
}
}
@@ -1,40 +0,0 @@
/*
* Copyright (C) 2015 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.easyrecyclerview;
import android.content.Context;
import androidx.recyclerview.widget.LinearSmoothScroller;
public abstract class SimpleSmoothScroller extends LinearSmoothScroller {
private final float mMillisecondsPerPx;
public SimpleSmoothScroller(Context context, float millisecondsPerInch) {
super(context);
mMillisecondsPerPx = millisecondsPerInch / context.getResources().getDisplayMetrics().densityDpi;
}
@Override
protected int calculateTimeForScrolling(int dx) {
if (mMillisecondsPerPx <= 0) {
return super.calculateTimeForScrolling(dx);
} else {
return (int) Math.ceil(Math.abs(dx) * mMillisecondsPerPx);
}
}
}
@@ -1,178 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Environment;
import androidx.annotation.Nullable;
import com.hippo.ehviewer.client.exception.ParseException;
import com.hippo.util.ReadableTime;
import com.hippo.yorozuya.FileUtils;
import com.hippo.yorozuya.IOUtils;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
public class AppConfig {
public static final String APP_DIRNAME = "EhViewer";
private static final String DOWNLOAD = "download";
private static final String TEMP = "temp";
private static final String PARSE_ERROR = "parse_error";
private static final String CRASH = "crash";
@SuppressLint("StaticFieldLeak")
private static Context sContext;
public static void initialize(Context context) {
sContext = context.getApplicationContext();
}
@Nullable
public static File getExternalAppDir() {
if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
File dir = sContext.getExternalFilesDir(null);
return FileUtils.ensureDirectory(dir) ? dir : null;
}
return null;
}
/**
* mkdirs and get
*/
@Nullable
public static File getDirInExternalAppDir(String filename) {
File appFolder = getExternalAppDir();
if (appFolder != null) {
File dir = new File(appFolder, filename);
return FileUtils.ensureDirectory(dir) ? dir : null;
}
return null;
}
@Nullable
public static File getFileInExternalAppDir(String filename) {
File appFolder = getExternalAppDir();
if (appFolder != null) {
File file = new File(appFolder, filename);
return FileUtils.ensureFile(file) ? file : null;
}
return null;
}
@Nullable
public static File getDefaultDownloadDir() {
return getDirInExternalAppDir(DOWNLOAD);
}
@Nullable
public static File getExternalTempDir() {
File dir = sContext.getExternalCacheDir();
File file;
if (null != dir && FileUtils.ensureDirectory(file = new File(dir, TEMP))) {
return file;
} else {
return null;
}
}
@Nullable
public static File getExternalCopyTempDir() {
File dir = sContext.getExternalCacheDir();
File file;
if (null != dir && FileUtils.ensureDirectory(file = new File(dir, "copy"))) {
return file;
} else {
return null;
}
}
@Nullable
public static File getExternalParseErrorDir() {
return getDirInExternalAppDir(PARSE_ERROR);
}
@Nullable
public static File getExternalCrashDir() {
return getDirInExternalAppDir(CRASH);
}
@Nullable
public static File getTempDir() {
File dir = sContext.getCacheDir();
File file;
if (null != dir && FileUtils.ensureDirectory(file = new File(dir, TEMP))) {
return file;
} else {
return null;
}
}
@Nullable
public static File createTempFile() {
return FileUtils.createTempFile(getTempDir(), null);
}
public static void saveParseErrorBody(ParseException e) {
File dir = getExternalParseErrorDir();
if (null == dir) {
return;
}
File file = new File(dir, ReadableTime.getFilenamableTime(System.currentTimeMillis()) + ".txt");
OutputStream os = null;
try {
os = new FileOutputStream(file);
String message = e.getMessage();
String body = e.getBody();
if (null != message) {
os.write(message.getBytes(StandardCharsets.UTF_8));
os.write('\n');
}
if (null != body) {
os.write(body.getBytes(StandardCharsets.UTF_8));
}
os.flush();
} catch (IOException e1) {
// Ignore
} finally {
IOUtils.closeQuietly(os);
}
}
@Nullable
public static File getFilesDir(String name) {
File dir = sContext.getFilesDir();
if (dir == null) {
return null;
}
dir = new File(dir, name);
if (dir.isDirectory() || dir.mkdirs()) {
return dir;
} else {
return null;
}
}
}
@@ -1,173 +0,0 @@
/*
* Copyright 2019 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer
import android.os.Build
import android.os.Debug
import com.hippo.util.ReadableTime
import com.hippo.yorozuya.FileUtils
import com.hippo.yorozuya.IOUtils
import com.hippo.yorozuya.OSUtils
import java.io.File
import java.io.FileWriter
import java.io.IOException
import java.io.PrintWriter
import java.util.Arrays
object Crash {
@Throws(IOException::class)
private fun collectInfo(fw: FileWriter) {
fw.write("======== PackageInfo ========\r\n")
fw.write("PackageName=")
fw.write(BuildConfig.APPLICATION_ID)
fw.write("\r\n")
fw.write("VersionName=")
fw.write(BuildConfig.VERSION_NAME)
fw.write("\r\n")
fw.write("VersionCode=")
fw.write(BuildConfig.VERSION_CODE)
fw.write("\r\n")
fw.write("CommitSha=")
fw.write(BuildConfig.COMMIT_SHA)
fw.write("\r\n")
fw.write("BuildTime=")
fw.write(BuildConfig.BUILD_TIME)
fw.write("\r\n")
fw.write("\r\n")
// Runtime
val topActivityClazzName = EhApplication.application.topActivity?.javaClass?.name
fw.write("======== Runtime ========\r\n")
fw.write("TopActivity=")
fw.write(topActivityClazzName ?: "null")
fw.write("\r\n")
fw.write("\r\n")
fw.write("\r\n")
// Device info
fw.write("======== DeviceInfo ========\r\n")
fw.write("BOARD=")
fw.write(Build.BOARD)
fw.write("\r\n")
fw.write("BOOTLOADER=")
fw.write(Build.BOOTLOADER)
fw.write("\r\n")
fw.write("SUPPORTED_ABIS=")
fw.write(Arrays.toString(Build.SUPPORTED_ABIS))
fw.write("\r\n")
fw.write("DEVICE=")
fw.write(Build.DEVICE)
fw.write("\r\n")
fw.write("DISPLAY=")
fw.write(Build.DISPLAY)
fw.write("\r\n")
fw.write("FINGERPRINT=")
fw.write(Build.FINGERPRINT)
fw.write("\r\n")
fw.write("HARDWARE=")
fw.write(Build.HARDWARE)
fw.write("\r\n")
fw.write("HOST=")
fw.write(Build.HOST)
fw.write("\r\n")
fw.write("ID=")
fw.write(Build.ID)
fw.write("\r\n")
fw.write("MANUFACTURER=")
fw.write(Build.MANUFACTURER)
fw.write("\r\n")
fw.write("MODEL=")
fw.write(Build.MODEL)
fw.write("\r\n")
fw.write("PRODUCT=")
fw.write(Build.PRODUCT)
fw.write("\r\n")
fw.write("RADIO=")
fw.write(Build.getRadioVersion())
fw.write("\r\n")
fw.write("TAGS=")
fw.write(Build.TAGS)
fw.write("\r\n")
fw.write("TYPE=")
fw.write(Build.TYPE)
fw.write("\r\n")
fw.write("USER=")
fw.write(Build.USER)
fw.write("\r\n")
fw.write("CODENAME=")
fw.write(Build.VERSION.CODENAME)
fw.write("\r\n")
fw.write("INCREMENTAL=")
fw.write(Build.VERSION.INCREMENTAL)
fw.write("\r\n")
fw.write("RELEASE=")
fw.write(Build.VERSION.RELEASE)
fw.write("\r\n")
fw.write("SDK=")
fw.write(Build.VERSION.SDK_INT.toString())
fw.write("\r\n")
fw.write("MEMORY=")
fw.write(
FileUtils.humanReadableByteCount(OSUtils.getAppAllocatedMemory(), false)
)
fw.write("\r\n")
fw.write("MEMORY_NATIVE=")
fw.write(FileUtils.humanReadableByteCount(Debug.getNativeHeapAllocatedSize(), false))
fw.write("\r\n")
fw.write("MEMORY_MAX=")
fw.write(FileUtils.humanReadableByteCount(OSUtils.getAppMaxMemory(), false))
fw.write("\r\n")
fw.write("MEMORY_TOTAL=")
fw.write(FileUtils.humanReadableByteCount(OSUtils.getTotalMemory(), false))
fw.write("\r\n")
fw.write("\r\n")
}
private fun getThrowableInfo(t: Throwable, fw: FileWriter) {
val printWriter = PrintWriter(fw)
t.printStackTrace(printWriter)
var cause = t.cause
while (cause != null) {
cause.printStackTrace(printWriter)
cause = cause.cause
}
}
fun saveCrashLog(t: Throwable) {
val dir = AppConfig.getExternalCrashDir() ?: return
val nowString = ReadableTime.getFilenamableTime(System.currentTimeMillis())
val fileName = "crash-$nowString.log"
val file = File(dir, fileName)
var fw: FileWriter? = null
try {
fw = FileWriter(file)
fw.write("TIME=")
fw.write(nowString)
fw.write("\r\n")
fw.write("\r\n")
collectInfo(fw)
fw.write("======== CrashInfo ========\r\n")
getThrowableInfo(t, fw)
fw.write("\r\n")
fw.flush()
} catch (e: Exception) {
file.delete()
} finally {
IOUtils.closeQuietly(fw)
}
}
}
@@ -1,248 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer
import android.annotation.SuppressLint
import android.app.Activity
import android.app.Application
import android.content.ComponentCallbacks2
import androidx.appcompat.app.AppCompatDelegate
import androidx.collection.LruCache
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.ProcessLifecycleOwner
import coil.ImageLoader
import coil.ImageLoaderFactory
import com.hippo.Native
import com.hippo.ehviewer.client.EhCookieStore
import com.hippo.ehviewer.client.EhDns
import com.hippo.ehviewer.client.EhSSLSocketFactory
import com.hippo.ehviewer.client.EhTagDatabase
import com.hippo.ehviewer.client.data.GalleryDetail
import com.hippo.ehviewer.coil.MergeInterceptor
import com.hippo.ehviewer.dao.buildMainDB
import com.hippo.ehviewer.download.DownloadManager
import com.hippo.ehviewer.ui.CommonOperations
import com.hippo.ehviewer.ui.EhActivity
import com.hippo.util.ExceptionUtils
import com.hippo.util.ReadableTime
import com.hippo.yorozuya.FileUtils
import com.hippo.yorozuya.IntIdGenerator
import eu.kanade.tachiyomi.core.preference.AndroidPreferenceStore
import eu.kanade.tachiyomi.ui.reader.setting.ReaderPreferences
import eu.kanade.tachiyomi.util.lang.launchIO
import kotlinx.coroutines.DelicateCoroutinesApi
import okhttp3.OkHttpClient
import java.net.Proxy
import java.security.KeyStore
import javax.net.ssl.TrustManagerFactory
import javax.net.ssl.X509TrustManager
class EhApplication : Application(), DefaultLifecycleObserver, ImageLoaderFactory {
private val mIdGenerator = IntIdGenerator()
private val mGlobalStuffMap = HashMap<Int, Any>()
private val mActivityList = ArrayList<Activity>()
val topActivity: EhActivity?
get() = if (mActivityList.isNotEmpty()) {
mActivityList[mActivityList.size - 1] as EhActivity
} else {
null
}
fun recreateAllActivity() {
mActivityList.forEach { it.recreate() }
}
@OptIn(DelicateCoroutinesApi::class)
@SuppressLint("StaticFieldLeak")
override fun onCreate() {
ProcessLifecycleOwner.get().lifecycle.addObserver(this)
application = this
val handler = Thread.getDefaultUncaughtExceptionHandler()
Thread.setDefaultUncaughtExceptionHandler { t, e ->
try {
if (Settings.getSaveCrashLog()) {
Crash.saveCrashLog(e)
}
} catch (ignored: Throwable) {
}
handler?.uncaughtException(t, e)
}
super<Application>.onCreate()
Native.initialize()
GetText.initialize(this)
Settings.initialize()
ReadableTime.initialize(this)
AppConfig.initialize(this)
EhTagDatabase.update()
AppCompatDelegate.setDefaultNightMode(Settings.getTheme())
launchIO {
launchIO {
ehDatabase
}
launchIO {
DownloadManager.isIdle
}
launchIO {
cleanupDownload()
}
}
mIdGenerator.setNextId(Settings.getInt(KEY_GLOBAL_STUFF_NEXT_ID, 0))
}
private fun cleanupDownload() {
try {
val downloadLocation = Settings.getDownloadLocation()
if (Settings.getMediaScan()) {
CommonOperations.removeNoMediaFile(downloadLocation)
} else {
CommonOperations.ensureNoMediaFile(downloadLocation)
}
} catch (t: Throwable) {
t.printStackTrace()
ExceptionUtils.throwIfFatal(t)
}
// Clear temp files
try {
clearTempDir()
} catch (t: Throwable) {
t.printStackTrace()
ExceptionUtils.throwIfFatal(t)
}
}
private fun clearTempDir() {
var dir = AppConfig.getTempDir()
if (null != dir) {
FileUtils.deleteContent(dir)
}
dir = AppConfig.getExternalTempDir()
if (null != dir) {
FileUtils.deleteContent(dir)
}
}
override fun onTrimMemory(level: Int) {
super.onTrimMemory(level)
if (level >= ComponentCallbacks2.TRIM_MEMORY_RUNNING_LOW) {
galleryDetailCache.evictAll()
}
}
fun putGlobalStuff(o: Any): Int {
val id = mIdGenerator.nextId()
mGlobalStuffMap[id] = o
Settings.putInt(KEY_GLOBAL_STUFF_NEXT_ID, mIdGenerator.nextId())
return id
}
fun containGlobalStuff(id: Int): Boolean {
return mGlobalStuffMap.containsKey(id)
}
fun getGlobalStuff(id: Int): Any? {
return mGlobalStuffMap[id]
}
fun removeGlobalStuff(id: Int): Any? {
return mGlobalStuffMap.remove(id)
}
fun removeGlobalStuff(o: Any) {
mGlobalStuffMap.values.removeAll(setOf(o))
}
fun registerActivity(activity: Activity) {
mActivityList.add(activity)
}
fun unregisterActivity(activity: Activity) {
mActivityList.remove(activity)
}
override fun onPause(owner: LifecycleOwner) {
if (!locked)
locked_last_leave_time = System.currentTimeMillis() / 1000
locked = true
}
override fun newImageLoader(): ImageLoader {
return ImageLoader.Builder(this).apply {
okHttpClient(okHttpClient)
components { add(MergeInterceptor) }
crossfade(300)
}.build()
}
companion object {
private const val KEY_GLOBAL_STUFF_NEXT_ID = "global_stuff_next_id"
var locked = true
var locked_last_leave_time: Long = 0
@JvmStatic
lateinit var application: EhApplication
private set
@JvmStatic
val ehCookieStore by lazy { EhCookieStore }
@JvmStatic
val ehProxySelector by lazy { EhProxySelector() }
@JvmStatic
val okHttpClient by lazy {
val builder = OkHttpClient.Builder()
.cookieJar(ehCookieStore)
.dns(EhDns)
.proxySelector(ehProxySelector)
if (Settings.getDF()) {
val factory =
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm())!!
factory.init(null as KeyStore?)
val manager = factory.trustManagers!!
val trustManager = manager.filterIsInstance<X509TrustManager>().first()
builder.sslSocketFactory(EhSSLSocketFactory, trustManager)
builder.proxy(Proxy.NO_PROXY)
}
builder.build()
}
@JvmStatic
val galleryDetailCache by lazy {
LruCache<Long, GalleryDetail>(25).also {
favouriteStatusRouter.addListener { gid, slot ->
it[gid]?.favoriteSlot = slot
}
}
}
@JvmStatic
val hosts by lazy { Hosts(application, "hosts.db") }
@JvmStatic
val favouriteStatusRouter by lazy { FavouriteStatusRouter() }
@JvmStatic
val readerPreferences by lazy { ReaderPreferences(AndroidPreferenceStore(application)) }
@JvmStatic
val ehDatabase by lazy { buildMainDB(application) }
}
}
@@ -1,459 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer
import android.content.Context
import android.net.Uri
import android.os.ParcelFileDescriptor
import android.os.ParcelFileDescriptor.MODE_READ_ONLY
import androidx.paging.PagingSource
import androidx.room.Room.databaseBuilder
import com.hippo.Native
import com.hippo.ehviewer.EhApplication.Companion.ehDatabase
import com.hippo.ehviewer.client.data.GalleryInfo
import com.hippo.ehviewer.dao.BasicDao
import com.hippo.ehviewer.dao.DownloadDirname
import com.hippo.ehviewer.dao.DownloadInfo
import com.hippo.ehviewer.dao.DownloadLabel
import com.hippo.ehviewer.dao.EhDatabase
import com.hippo.ehviewer.dao.Filter
import com.hippo.ehviewer.dao.HistoryInfo
import com.hippo.ehviewer.dao.LocalFavoriteInfo
import com.hippo.ehviewer.dao.QuickSearch
import com.hippo.ehviewer.download.DownloadManager
object EhDB {
private const val CUR_DB_VER = 4
private val db = ehDatabase
// Fix state
@get:Synchronized
val allDownloadInfo: List<DownloadInfo>
get() = db.downloadsDao().list().onEach {
if (it.state == DownloadInfo.STATE_WAIT || it.state == DownloadInfo.STATE_DOWNLOAD) {
it.state = DownloadInfo.STATE_NONE
}
}
@Synchronized
fun updateDownloadInfo(downloadInfos: List<DownloadInfo>) {
val dao = db.downloadsDao()
dao.update(downloadInfos)
}
@Synchronized
fun putDownloadInfo(downloadInfo: DownloadInfo) {
db.downloadsDao().run {
if (load(downloadInfo.gid) != null) {
update(downloadInfo)
} else {
insert(downloadInfo)
}
}
}
@Synchronized
fun removeDownloadInfo(downloadInfo: DownloadInfo) {
db.downloadsDao().delete(downloadInfo)
}
@Synchronized
fun getDownloadDirname(gid: Long): String? {
val dao = db.downloadDirnameDao()
val raw = dao.load(gid)
return raw?.dirname
}
@Synchronized
fun putDownloadDirname(gid: Long, dirname: String?) {
val dao = db.downloadDirnameDao()
var raw = dao.load(gid)
if (raw != null) {
raw.dirname = dirname
dao.update(raw)
} else {
raw = DownloadDirname(gid, dirname)
dao.insert(raw)
}
}
@Synchronized
fun removeDownloadDirname(gid: Long) {
val dao = db.downloadDirnameDao()
dao.deleteByKey(gid)
}
@Synchronized
fun clearDownloadDirname() {
val dao = db.downloadDirnameDao()
dao.deleteAll()
}
@get:Synchronized
val allDownloadLabelList: List<DownloadLabel>
get() = db.downloadLabelDao().list()
@Synchronized
fun addDownloadLabel(label: String): DownloadLabel {
val dao = db.downloadLabelDao()
val raw = DownloadLabel()
raw.label = label
raw.time = System.currentTimeMillis()
raw.id = dao.insert(raw)
return raw
}
@Synchronized
fun addDownloadLabel(raw: DownloadLabel): DownloadLabel {
// Reset id
raw.id = null
val dao = db.downloadLabelDao()
raw.id = dao.insert(raw)
return raw
}
@Synchronized
fun updateDownloadLabel(raw: DownloadLabel?) {
val dao = db.downloadLabelDao()
dao.update(raw!!)
}
@Synchronized
fun moveDownloadLabel(fromPosition: Int, toPosition: Int) {
if (fromPosition == toPosition) {
return
}
val reverse = fromPosition > toPosition
val offset = if (reverse) toPosition else fromPosition
val limit = if (reverse) fromPosition - toPosition + 1 else toPosition - fromPosition + 1
val dao = db.downloadLabelDao()
val list = dao.list(offset, limit)
val step = if (reverse) 1 else -1
val start = if (reverse) limit - 1 else 0
val end = if (reverse) 0 else limit - 1
val toTime = list[end].time
var i = end
while (if (reverse) i < start else i > start) {
list[i].time = list[i + step].time
i += step
}
list[start].time = toTime
dao.update(list)
}
@Synchronized
fun removeDownloadLabel(raw: DownloadLabel?) {
val dao = db.downloadLabelDao()
dao.delete(raw!!)
}
@get:Synchronized
val allLocalFavorites: List<GalleryInfo>
get() {
val dao = db.localFavoritesDao()
val list = dao.list()
return ArrayList<GalleryInfo>(list)
}
@Synchronized
fun searchLocalFavorites(query: String): List<GalleryInfo> {
val dao = db.localFavoritesDao()
val list = dao.list("%$query%")
return ArrayList<GalleryInfo>(list)
}
@Synchronized
fun removeLocalFavorites(gid: Long) {
db.localFavoritesDao().deleteByKey(gid)
}
@Synchronized
fun removeLocalFavorites(gidArray: LongArray) {
val dao = db.localFavoritesDao()
for (gid in gidArray) {
dao.deleteByKey(gid)
}
}
@JvmStatic
@Synchronized
fun containLocalFavorites(gid: Long): Boolean {
val dao = db.localFavoritesDao()
return null != dao.load(gid)
}
@Synchronized
fun putLocalFavorites(galleryInfo: GalleryInfo) {
val dao = db.localFavoritesDao()
if (null == dao.load(galleryInfo.gid)) {
val info: LocalFavoriteInfo
if (galleryInfo is LocalFavoriteInfo) {
info = galleryInfo
} else {
info = LocalFavoriteInfo(galleryInfo)
info.time = System.currentTimeMillis()
}
dao.insert(info)
}
}
@Synchronized
fun putLocalFavorites(galleryInfoList: List<GalleryInfo>) {
for (gi in galleryInfoList) {
putLocalFavorites(gi)
}
}
@get:Synchronized
val allQuickSearch: List<QuickSearch>
get() {
val dao = db.quickSearchDao()
return dao.list()
}
@Synchronized
fun insertQuickSearch(quickSearch: QuickSearch) {
val dao = db.quickSearchDao()
quickSearch.id = null
quickSearch.time = System.currentTimeMillis()
quickSearch.id = dao.insert(quickSearch)
}
@Synchronized
fun importQuickSearch(quickSearchList: List<QuickSearch?>) {
val dao = db.quickSearchDao()
for (quickSearch in quickSearchList) {
dao.insert(quickSearch!!)
}
}
@Synchronized
fun deleteQuickSearch(quickSearch: QuickSearch?) {
val dao = db.quickSearchDao()
dao.delete(quickSearch)
}
@Synchronized
fun moveQuickSearch(fromPosition: Int, toPosition: Int) {
if (fromPosition == toPosition) {
return
}
val reverse = fromPosition > toPosition
val offset = if (reverse) toPosition else fromPosition
val limit = if (reverse) fromPosition - toPosition + 1 else toPosition - fromPosition + 1
val dao = db.quickSearchDao()
val list = dao.list(offset, limit)
val step = if (reverse) 1 else -1
val start = if (reverse) limit - 1 else 0
val end = if (reverse) 0 else limit - 1
val toTime = list[end].time
var i = end
while (if (reverse) i < start else i > start) {
list[i].time = list[i + step].time
i += step
}
list[start].time = toTime
dao.update(list)
}
@get:Synchronized
val historyLazyList: PagingSource<Int, HistoryInfo>
get() = db.historyDao().listLazy()
@Synchronized
fun putHistoryInfo(galleryInfo: GalleryInfo?) {
val dao = db.historyDao()
val info: HistoryInfo = if (galleryInfo is HistoryInfo) {
galleryInfo
} else {
HistoryInfo(galleryInfo!!)
}
info.time = System.currentTimeMillis()
if (null != dao.load(info.gid)) {
dao.update(info)
} else {
dao.insert(info)
}
}
@Synchronized
fun putHistoryInfoNonRefresh(info: GalleryInfo) {
val dao = db.historyDao()
val i = dao.load(info.gid)
if (null != i) {
val historyInfo: HistoryInfo
if (info is HistoryInfo) {
historyInfo = info
} else {
historyInfo = HistoryInfo(info)
historyInfo.time = i.time
}
dao.update(historyInfo)
}
}
@Synchronized
fun putHistoryInfo(historyInfoList: List<HistoryInfo>) {
val dao = db.historyDao()
for (info in historyInfoList) {
if (null == dao.load(info.gid)) {
dao.insert(info)
}
}
}
@Synchronized
fun deleteHistoryInfo(info: HistoryInfo?) {
val dao = db.historyDao()
dao.delete(info!!)
}
@Synchronized
fun clearHistoryInfo() {
val dao = db.historyDao()
dao.deleteAll()
}
@get:Synchronized
val allFilter: List<Filter>
get() = db.filterDao().list()
@Synchronized
fun addFilter(filter: Filter): Boolean {
val existFilter: Filter? = try {
db.filterDao().load(filter.text!!, filter.mode)
} catch (e: Exception) {
null
}
return if (existFilter == null) {
filter.id = null
filter.id = db.filterDao().insert(filter)
true
} else {
false
}
}
@Synchronized
fun deleteFilter(filter: Filter) {
db.filterDao().delete(filter)
}
@Synchronized
fun triggerFilter(filter: Filter) {
filter.enable = filter.enable?.not() ?: false
db.filterDao().update(filter)
}
private fun <T> copyDao(from: BasicDao<T>, to: BasicDao<T>) {
val list = from.list()
for (item in list) to.insert(item)
}
@Synchronized
fun exportDB(context: Context, uri: Uri): Boolean {
val ehExportName = "eh.export.db"
runCatching {
context.deleteDatabase(ehExportName)
val newDb = databaseBuilder(context, EhDatabase::class.java, ehExportName).build()
copyDao(db.downloadsDao(), newDb.downloadsDao())
copyDao(db.downloadLabelDao(), newDb.downloadLabelDao())
copyDao(db.downloadDirnameDao(), newDb.downloadDirnameDao())
copyDao(db.historyDao(), newDb.historyDao())
copyDao(db.quickSearchDao(), newDb.quickSearchDao())
copyDao(db.localFavoritesDao(), newDb.localFavoritesDao())
copyDao(db.filterDao(), newDb.filterDao())
val dbFile = context.getDatabasePath(ehExportName)
context.contentResolver.openFileDescriptor(uri, "rw")!!.use { toFd ->
ParcelFileDescriptor.open(dbFile, MODE_READ_ONLY).use { fromFd ->
Native.sendfile(fromFd.fd, toFd.fd)
}
}
return true
}.onFailure {
it.printStackTrace()
}
return false
}
/**
* @return error string, null for no error
*/
@Synchronized
fun importDB(context: Context, uri: Uri): String? {
runCatching {
val oldDB = databaseBuilder(context, EhDatabase::class.java, "tmp.db")
.createFromInputStream { context.contentResolver.openInputStream(uri) }.build()
// Download label
val manager = DownloadManager
runCatching {
val downloadLabelList = oldDB.downloadLabelDao().list()
manager.addDownloadLabel(downloadLabelList)
}
// Downloads
runCatching {
val downloadInfoList = oldDB.downloadsDao().list()
manager.addDownload(downloadInfoList, false)
}
// Download dirname
runCatching {
oldDB.downloadDirnameDao().list().forEach {
putDownloadDirname(it.gid, it.dirname)
}
}
// History
runCatching {
val historyInfoList = oldDB.historyDao().list()
putHistoryInfo(historyInfoList)
}
// QuickSearch
runCatching {
val quickSearchList = oldDB.quickSearchDao().list()
val currentQuickSearchList = db.quickSearchDao().list()
val importList = quickSearchList.mapNotNull { newQS ->
newQS.takeIf { currentQuickSearchList.find { it.name == newQS.name } == null }
}
importQuickSearch(importList)
}
// LocalFavorites
runCatching {
oldDB.localFavoritesDao().list().forEach {
putLocalFavorites(it)
}
}
// Filter
runCatching {
val filterList = oldDB.filterDao().list()
val currentFilterList = db.filterDao().list()
filterList.forEach {
if (it !in currentFilterList) addFilter(it)
}
}
oldDB.close()
}.onFailure {
it.printStackTrace()
return context.getString(R.string.cant_read_the_file)
}
return null
}
}
@@ -1,110 +0,0 @@
/*
* Copyright 2019 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer;
import android.text.TextUtils;
import com.hippo.network.InetValidator;
import com.hippo.util.ExceptionUtils;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.ProxySelector;
import java.net.SocketAddress;
import java.net.URI;
import java.util.Collections;
import java.util.List;
public class EhProxySelector extends ProxySelector {
public static final int TYPE_DIRECT = 0;
public static final int TYPE_SYSTEM = 1;
public static final int TYPE_HTTP = 2;
public static final int TYPE_SOCKS = 3;
private ProxySelector delegation;
private ProxySelector alternative;
EhProxySelector() {
alternative = ProxySelector.getDefault();
if (alternative == null) {
alternative = new NullProxySelector();
}
updateProxy();
}
public void updateProxy() {
switch (Settings.getProxyType()) {
case TYPE_DIRECT:
delegation = new NullProxySelector();
break;
default:
case TYPE_SYSTEM:
delegation = alternative;
break;
case TYPE_HTTP:
case TYPE_SOCKS:
delegation = null;
break;
}
}
@Override
public List<Proxy> select(URI uri) {
int type = Settings.getProxyType();
if (type == TYPE_HTTP || type == TYPE_SOCKS) {
try {
String ip = Settings.getProxyIp();
int port = Settings.getProxyPort();
if (!TextUtils.isEmpty(ip) && InetValidator.isValidInetPort(port)) {
InetAddress inetAddress = InetAddress.getByName(ip);
SocketAddress socketAddress = new InetSocketAddress(inetAddress, port);
return Collections.singletonList(new Proxy(type == TYPE_HTTP ? Proxy.Type.HTTP : Proxy.Type.SOCKS, socketAddress));
}
} catch (Throwable t) {
ExceptionUtils.throwIfFatal(t);
}
}
if (delegation != null) {
return delegation.select(uri);
}
return alternative.select(uri);
}
@Override
public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {
if (delegation != null) {
delegation.select(uri);
}
}
private static class NullProxySelector extends ProxySelector {
@Override
public List<Proxy> select(URI uri) {
return Collections.singletonList(Proxy.NO_PROXY);
}
@Override
public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {
}
}
}
@@ -1,74 +0,0 @@
/*
* Copyright 2019 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer;
import android.annotation.SuppressLint;
import com.hippo.ehviewer.client.data.GalleryInfo;
import com.hippo.yorozuya.IntIdGenerator;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class FavouriteStatusRouter {
private static final String KEY_DATA_MAP_NEXT_ID = "data_map_next_id";
private final IntIdGenerator idGenerator = new IntIdGenerator(Settings.getInt(KEY_DATA_MAP_NEXT_ID, 0));
@SuppressLint("UseSparseArrays")
private final HashMap<Integer, Map<Long, GalleryInfo>> maps = new HashMap<>();
private final List<Listener> listeners = new ArrayList<>();
public int saveDataMap(Map<Long, GalleryInfo> map) {
int id = idGenerator.nextId();
maps.put(id, map);
Settings.putInt(KEY_DATA_MAP_NEXT_ID, idGenerator.nextId());
return id;
}
public Map<Long, GalleryInfo> restoreDataMap(int id) {
return maps.remove(id);
}
public void modifyFavourites(long gid, int slot) {
for (Map<Long, GalleryInfo> map : maps.values()) {
GalleryInfo info = map.get(gid);
if (info != null) {
info.setFavoriteSlot(slot);
}
}
for (Listener listener : listeners) {
listener.onModifyFavourites(gid, slot);
}
}
public void addListener(Listener listener) {
listeners.add(listener);
}
public void removeListener(Listener listener) {
listeners.remove(listener);
}
public interface Listener {
void onModifyFavourites(long gid, int slot);
}
}
@@ -1,42 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer;
import android.content.Context;
import android.content.res.Resources;
import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
public class GetText {
private static Resources sResources;
public static void initialize(Context context) {
sResources = context.getApplicationContext().getResources();
}
@NonNull
public static String getString(@StringRes int id) {
return sResources.getString(id);
}
@NonNull
public static String getString(@StringRes int id, Object... formatArgs) {
return sResources.getString(id, formatArgs);
}
}
@@ -1,343 +0,0 @@
/*
* Copyright 2018 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer;
/*
* Created by Hippo on 2018/3/21.
*/
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Pair;
import androidx.annotation.Nullable;
import com.hippo.database.MSQLiteBuilder;
import com.hippo.util.SqlUtils;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
public class Hosts {
private static final int VERSION_1 = 1;
private static final String TABLE_HOSTS = "HOSTS";
private static final String COLUMN_HOST = "HOST";
private static final String COLUMN_IP = "IP";
private static final int DB_VERSION = VERSION_1;
private final SQLiteDatabase db;
public Hosts(Context context, String name) {
SQLiteOpenHelper helper = new MSQLiteBuilder()
.version(VERSION_1)
.createTable(TABLE_HOSTS)
.insertColumn(TABLE_HOSTS, COLUMN_HOST, String.class)
.insertColumn(TABLE_HOSTS, COLUMN_IP, String.class)
.build(context, name, DB_VERSION);
db = helper.getWritableDatabase();
}
@Nullable
public static InetAddress toInetAddress(String host, String ip) {
if (!isValidHost(host)) {
return null;
}
if (ip == null) {
return null;
}
byte[] bytes = parseV4(ip);
if (bytes == null) {
bytes = parseV6(ip);
}
if (bytes == null) {
return null;
}
try {
return InetAddress.getByAddress(host, bytes);
} catch (UnknownHostException e) {
return null;
}
}
/**
* Returns true if the host is valid.
*/
public static boolean isValidHost(String host) {
if (host == null) {
return false;
}
if (host.length() > 253) {
return false;
}
int labelLength = 0;
for (int i = 0, n = host.length(); i < n; i++) {
char ch = host.charAt(i);
if (ch == '.') {
if (labelLength < 1 || labelLength > 63) {
return false;
}
labelLength = 0;
} else {
labelLength++;
}
if ((ch < 'a' || ch > 'z') && (ch < '0' || ch > '9') && ch != '-' && ch != '.') {
return false;
}
}
return labelLength >= 1 && labelLength <= 63;
}
/**
* Returns true if ips are valid.
*/
public static boolean isValidIp(String ips) {
if (ips == null) {
return false;
}
String[] list = ips.split("\\+");
for (String ip : list) {
if (parseV4(ip) == null && parseV6(ip) == null) {
return false;
}
}
return true;
}
// org.xbill.DNS.Address.parseV4
@Nullable
private static byte[] parseV4(String s) {
int numDigits;
int currentOctet;
byte[] values = new byte[4];
int currentValue;
int length = s.length();
currentOctet = 0;
currentValue = 0;
numDigits = 0;
for (int i = 0; i < length; i++) {
char c = s.charAt(i);
if (c >= '0' && c <= '9') {
/* Can't have more than 3 digits per octet. */
if (numDigits == 3)
return null;
/* Octets shouldn't start with 0, unless they are 0. */
if (numDigits > 0 && currentValue == 0)
return null;
numDigits++;
currentValue *= 10;
currentValue += (c - '0');
/* 255 is the maximum value for an octet. */
if (currentValue > 255)
return null;
} else if (c == '.') {
/* Can't have more than 3 dots. */
if (currentOctet == 3)
return null;
/* Two consecutive dots are bad. */
if (numDigits == 0)
return null;
values[currentOctet++] = (byte) currentValue;
currentValue = 0;
numDigits = 0;
} else
return null;
}
/* Must have 4 octets. */
if (currentOctet != 3)
return null;
/* The fourth octet can't be empty. */
if (numDigits == 0)
return null;
values[currentOctet] = (byte) currentValue;
return values;
}
// org.xbill.DNS.Address.parseV6
@Nullable
private static byte[] parseV6(String s) {
int range = -1;
byte[] data = new byte[16];
String[] tokens = s.split(":", -1);
int first = 0;
int last = tokens.length - 1;
if (tokens[0].length() == 0) {
// If the first two tokens are empty, it means the string
// started with ::, which is fine. If only the first is
// empty, the string started with :, which is bad.
if (last - first > 0 && tokens[1].length() == 0)
first++;
else
return null;
}
if (tokens[last].length() == 0) {
// If the last two tokens are empty, it means the string
// ended with ::, which is fine. If only the last is
// empty, the string ended with :, which is bad.
if (last - first > 0 && tokens[last - 1].length() == 0)
last--;
else
return null;
}
if (last - first + 1 > 8)
return null;
int i, j;
for (i = first, j = 0; i <= last; i++) {
if (tokens[i].length() == 0) {
if (range >= 0)
return null;
range = j;
continue;
}
if (tokens[i].indexOf('.') >= 0) {
// An IPv4 address must be the last component
if (i < last)
return null;
// There can't have been more than 6 components.
if (i > 6)
return null;
byte[] v4addr = parseV4(tokens[i]);
if (v4addr == null)
return null;
for (int k = 0; k < 4; k++)
data[j++] = v4addr[k];
break;
}
try {
for (int k = 0; k < tokens[i].length(); k++) {
char c = tokens[i].charAt(k);
if (Character.digit(c, 16) < 0)
return null;
}
int x = Integer.parseInt(tokens[i], 16);
if (x > 0xFFFF || x < 0)
return null;
data[j++] = (byte) (x >>> 8);
data[j++] = (byte) (x & 0xFF);
} catch (NumberFormatException e) {
return null;
}
}
if (j < 16 && range < 0)
return null;
if (range >= 0) {
int empty = 16 - j;
System.arraycopy(data, range, data, range + empty, j - range);
for (i = range; i < range + empty; i++)
data[i] = 0;
}
return data;
}
/**
* Gets a InetAddress with the host.
*/
@Nullable
public List<InetAddress> get(String host) {
if (!isValidHost(host)) {
return null;
}
try (Cursor cursor = db.rawQuery("SELECT * FROM " + TABLE_HOSTS + " WHERE " + COLUMN_HOST + " = ?;", new String[]{host})) {
if (cursor.moveToNext()) {
String[] ips = SqlUtils.getString(cursor, COLUMN_IP, null).split("\\+");
List<InetAddress> addresses = new ArrayList<>();
for (String ip : ips) {
addresses.add(toInetAddress(host, ip));
}
return addresses;
} else {
return null;
}
}
}
public boolean contains(String host) {
try (Cursor cursor = db.rawQuery("SELECT * FROM " + TABLE_HOSTS + " WHERE " + COLUMN_HOST + " = ?;", new String[]{host})) {
return cursor.moveToNext();
}
}
/**
* Puts the host-ip pair into this hosts.
*/
public boolean put(String host, String ip) {
if (!isValidHost(host) || !isValidIp(ip)) {
return false;
}
ContentValues values = new ContentValues();
values.put(COLUMN_HOST, host);
values.put(COLUMN_IP, ip);
if (contains(host)) {
db.update(TABLE_HOSTS, values, COLUMN_HOST + " = ?", new String[]{host});
} else {
db.insert(TABLE_HOSTS, null, values);
}
return true;
}
/**
* Puts delete the entry with the host.
*/
public void delete(String host) {
db.delete(TABLE_HOSTS, COLUMN_HOST + " = ?", new String[]{host});
}
/**
* Get all data from this host.
*/
public List<Pair<String, String>> getAll() {
List<Pair<String, String>> result = new ArrayList<>();
try (Cursor cursor = db.rawQuery("SELECT * FROM " + TABLE_HOSTS + ";", null)) {
while (cursor.moveToNext()) {
String host = SqlUtils.getString(cursor, COLUMN_HOST, null);
String ip = SqlUtils.getString(cursor, COLUMN_IP, null);
result.add(new Pair<>(host, ip));
}
}
return result;
}
}
@@ -1,756 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer;
import android.content.SharedPreferences;
import android.net.Uri;
import android.util.Log;
import androidx.annotation.DimenRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.preference.PreferenceManager;
import com.hippo.ehviewer.client.EhConfig;
import com.hippo.ehviewer.client.data.FavListUrlBuilder;
import com.hippo.ehviewer.ui.CommonOperations;
import com.hippo.ehviewer.ui.scene.GalleryListScene;
import com.hippo.unifile.UniFile;
import com.hippo.yorozuya.AssertUtilsKt;
import com.hippo.yorozuya.NumberUtils;
import java.util.Locale;
import java.util.Set;
public class Settings {
/********************
****** Eh
********************/
public static final String KEY_THEME = "theme";
public static final String KEY_ACCOUNT = "account";
public static final String KEY_IMAGE_LIMITS = "image_limits";
public static final String KEY_U_CONFIG = "uconfig";
public static final String KEY_MY_TAGS = "mytags";
public static final String KEY_BLACK_DARK_THEME = "black_dark_theme";
public static final int THEME_SYSTEM = -1;
public static final String KEY_GALLERY_SITE = "gallery_site";
public static final String KEY_LIST_MODE = "list_mode";
public static final String KEY_DETAIL_SIZE = "detail_size";
public static final String KEY_THUMB_SIZE = "thumb_size_";
public static final String KEY_THUMB_RESOLUTION = "thumb_resolution";
public static final String KEY_SHOW_JPN_TITLE = "show_jpn_title";
public static final String KEY_SHOW_TAG_TRANSLATIONS = "show_tag_translations";
public static final String KEY_TAG_TRANSLATIONS_SOURCE = "tag_translations_source";
public static final String KEY_DEFAULT_CATEGORIES = "default_categories";
public static final int DEFAULT_DEFAULT_CATEGORIES = EhConfig.ALL_CATEGORY;
public static final String KEY_EXCLUDED_TAG_NAMESPACES = "excluded_tag_namespaces";
public static final String KEY_EXCLUDED_LANGUAGES = "excluded_languages";
public static final String KEY_REQUEST_NEWS = "request_news";
public static final String KEY_REQUEST_NEWS_TIMER = "request_news_timer";
public static final String KEY_REQUEST_NEWS_TIMER_HOUR = "request_news_timer_hour";
public static final String KEY_REQUEST_NEWS_TIMER_MINUTE = "request_news_timer_minute";
public static final String KEY_HIDE_HV_EVENTS = "hide_hv_events";
public static final String[] SIGN_IN_REQUIRED = {
KEY_IMAGE_LIMITS,
KEY_GALLERY_SITE,
KEY_U_CONFIG,
KEY_MY_TAGS,
KEY_SHOW_JPN_TITLE,
KEY_REQUEST_NEWS,
KEY_REQUEST_NEWS_TIMER,
KEY_HIDE_HV_EVENTS
};
/********************
****** Privacy and Security
********************/
public static final String KEY_SEC_SECURITY = "enable_secure";
public static final boolean VALUE_SEC_SECURITY = false;
/********************
****** Download
********************/
public static final String KEY_DOWNLOAD_SAVE_SCHEME = "image_scheme";
public static final String KEY_DOWNLOAD_SAVE_AUTHORITY = "image_authority";
public static final String KEY_DOWNLOAD_SAVE_PATH = "image_path";
public static final String KEY_NOTIFICATION_REQUIRED = "notification_required";
public static final String KEY_DOWNLOAD_SAVE_QUERY = "image_query";
public static final String KEY_DOWNLOAD_SAVE_FRAGMENT = "image_fragment";
public static final String KEY_MEDIA_SCAN = "media_scan";
public static final String KEY_IMAGE_RESOLUTION = "image_size";
public static final String DEFAULT_IMAGE_RESOLUTION = EhConfig.IMAGE_SIZE_AUTO;
public static final int INVALID_DEFAULT_FAV_SLOT = -2;
/********************
****** Advanced
********************/
public static final String KEY_SAVE_PARSE_ERROR_BODY = "save_parse_error_body";
public static final String KEY_SECURITY = "require_unlock";
public static final String KEY_SECURITY_DELAY = "require_unlock_delay";
public static final String KEY_READ_CACHE_SIZE = "read_cache_size";
public static final int DEFAULT_READ_CACHE_SIZE = 320;
public static final String KEY_BUILT_IN_HOSTS = "built_in_hosts_2";
public static final String KEY_DOMAIN_FRONTING = "domain_fronting";
public static final String KEY_BYPASS_VPN = "bypass_vpn";
public static final String KEY_LIST_THUMB_SIZE = "list_tile_size";
private static final boolean DEFAULT_HIDE_HV_EVENTS = false;
private static final String KEY_SHOW_COMMENTS = "show_gallery_comments";
private static final boolean DEFAULT_SHOW_COMMENTS = true;
private static final String TAG = Settings.class.getSimpleName();
private static final String KEY_DISPLAY_NAME = "display_name";
private static final String DEFAULT_DISPLAY_NAME = null;
private static final int DEFAULT_LIST_THUMB_SIZE = 40;
private static final String KEY_AVATAR = "avatar";
private static final String KEY_REMOVE_IMAGE_FILES = "include_pic";
private static final boolean DEFAULT_REMOVE_IMAGE_FILES = true;
private static final String KEY_NEED_SIGN_IN = "need_sign_in";
private static final boolean DEFAULT_NEED_SIGN_IN = true;
private static final String KEY_SELECT_SITE = "select_site";
private static final boolean DEFAULT_SELECT_SITE = true;
private static final int DEFAULT_THEME = THEME_SYSTEM;
private static final int DEFAULT_GALLERY_SITE = 1;
private static final String KEY_LAUNCH_PAGE = "launch_page";
private static final int DEFAULT_LAUNCH_PAGE = 0;
private static final int DEFAULT_LIST_MODE = 0;
private static final int DEFAULT_DETAIL_SIZE = 0;
private static final int DEFAULT_THUMB_SIZE = 120;
private static final int DEFAULT_THUMB_RESOLUTION = 0;
private static final boolean DEFAULT_SHOW_JPN_TITLE = false;
private static final String KEY_SHOW_GALLERY_PAGES = "show_gallery_pages";
private static final boolean DEFAULT_SHOW_GALLERY_PAGES = false;
private static final boolean DEFAULT_SHOW_TAG_TRANSLATIONS = false;
private static final int DEFAULT_EXCLUDED_TAG_NAMESPACES = 0;
private static final String DEFAULT_EXCLUDED_LANGUAGES = null;
private static final String KEY_METERED_NETWORK_WARNING = "cellular_network_warning";
private static final boolean DEFAULT_METERED_NETWORK_WARNING = false;
private static final String KEY_APP_LINK_VERIFY_TIP = "app_link_verify_tip";
private static final boolean DEFAULT_APP_LINK_VERIFY_TIP = false;
private static final boolean DEFAULT_MEDIA_SCAN = false;
private static final String KEY_RECENT_DOWNLOAD_LABEL = "recent_download_label";
private static final String DEFAULT_RECENT_DOWNLOAD_LABEL = null;
private static final String KEY_HAS_DEFAULT_DOWNLOAD_LABEL = "has_default_download_label";
private static final boolean DEFAULT_HAS_DOWNLOAD_LABEL = false;
private static final String KEY_DEFAULT_DOWNLOAD_LABEL = "default_download_label";
private static final String DEFAULT_DOWNLOAD_LABEL = null;
private static final String KEY_MULTI_THREAD_DOWNLOAD = "download_thread";
private static final int DEFAULT_MULTI_THREAD_DOWNLOAD = 3;
private static final String KEY_PRELOAD_IMAGE = "preload_image";
private static final int DEFAULT_PRELOAD_IMAGE = 5;
private static final String KEY_DOWNLOAD_ORIGIN_IMAGE = "download_origin_image";
private static final boolean DEFAULT_DOWNLOAD_ORIGIN_IMAGE = false;
/********************
****** Favorites
********************/
private static final String KEY_FAV_CAT_0 = "fav_cat_0";
private static final String KEY_FAV_CAT_1 = "fav_cat_1";
private static final String KEY_FAV_CAT_2 = "fav_cat_2";
private static final String KEY_FAV_CAT_3 = "fav_cat_3";
private static final String KEY_FAV_CAT_4 = "fav_cat_4";
private static final String KEY_FAV_CAT_5 = "fav_cat_5";
private static final String KEY_FAV_CAT_6 = "fav_cat_6";
private static final String KEY_FAV_CAT_7 = "fav_cat_7";
private static final String KEY_FAV_CAT_8 = "fav_cat_8";
private static final String KEY_FAV_CAT_9 = "fav_cat_9";
private static final String DEFAULT_FAV_CAT_0 = "Favorites 0";
private static final String DEFAULT_FAV_CAT_1 = "Favorites 1";
private static final String DEFAULT_FAV_CAT_2 = "Favorites 2";
private static final String DEFAULT_FAV_CAT_3 = "Favorites 3";
private static final String DEFAULT_FAV_CAT_4 = "Favorites 4";
private static final String DEFAULT_FAV_CAT_5 = "Favorites 5";
private static final String DEFAULT_FAV_CAT_6 = "Favorites 6";
private static final String DEFAULT_FAV_CAT_7 = "Favorites 7";
private static final String DEFAULT_FAV_CAT_8 = "Favorites 8";
private static final String DEFAULT_FAV_CAT_9 = "Favorites 9";
private static final String KEY_FAV_COUNT_0 = "fav_count_0";
private static final String KEY_FAV_COUNT_1 = "fav_count_1";
private static final String KEY_FAV_COUNT_2 = "fav_count_2";
private static final String KEY_FAV_COUNT_3 = "fav_count_3";
private static final String KEY_FAV_COUNT_4 = "fav_count_4";
private static final String KEY_FAV_COUNT_5 = "fav_count_5";
private static final String KEY_FAV_COUNT_6 = "fav_count_6";
private static final String KEY_FAV_COUNT_7 = "fav_count_7";
private static final String KEY_FAV_COUNT_8 = "fav_count_8";
private static final String KEY_FAV_COUNT_9 = "fav_count_9";
private static final String KEY_FAV_LOCAL = "fav_local";
private static final String KEY_FAV_CLOUD = "fav_cloud";
private static final int DEFAULT_FAV_COUNT = 0;
private static final String KEY_RECENT_FAV_CAT = "recent_fav_cat";
private static final int DEFAULT_RECENT_FAV_CAT = FavListUrlBuilder.FAV_CAT_ALL;
// -1 for local, 0 - 9 for cloud favorite, other for no default fav slot
private static final String KEY_DEFAULT_FAV_SLOT = "default_favorite_2";
private static final int DEFAULT_DEFAULT_FAV_SLOT = INVALID_DEFAULT_FAV_SLOT;
private static final boolean DEFAULT_SAVE_PARSE_ERROR_BODY = true;
private static final String KEY_SAVE_CRASH_LOG = "save_crash_log";
private static final boolean DEFAULT_SAVE_CRASH_LOG = true;
private static final boolean DEFAULT_BUILT_IN_HOSTS = false;
private static final boolean DEFAULT_FRONTING = false;
private static final boolean DEFAULT_BYPASS_VPN = true;
private static final String KEY_PROXY_TYPE = "proxy_type";
private static final int DEFAULT_PROXY_TYPE = EhProxySelector.TYPE_SYSTEM;
private static final String KEY_PROXY_IP = "proxy_ip";
private static final String DEFAULT_PROXY_IP = null;
private static final String KEY_PROXY_PORT = "proxy_port";
private static final int DEFAULT_PROXY_PORT = -1;
private static final String KEY_CLIPBOARD_TEXT_HASH_CODE = "clipboard_text_hash_code";
private static final int DEFAULT_CLIPBOARD_TEXT_HASH_CODE = 0;
private static final String KEY_DOWNLOAD_DELAY = "download_delay";
private static final int DEFAULT_DOWNLOAD_DELAY = 0;
private static final boolean DEFAULT_REQUEST_NEWS = false;
private static final String KEY_ARCHIVE_PASSWDS = "archive_passwds";
private static final String KEY_QS_SAVE_PROGRESS = "qs_save_progress";
private static final boolean DEFAULT_QS_SAVE_PROGRESS = true;
public static boolean LIST_THUMB_SIZE_INITED = false;
public static SharedPreferences sSettingsPre;
private static int LIST_THUMB_SIZE = 40;
private static EhConfig sEhConfig;
public static void initialize() {
sSettingsPre = PreferenceManager.getDefaultSharedPreferences(EhApplication.getApplication());
sEhConfig = loadEhConfig();
fixDefaultValue();
}
private static void fixDefaultValue() {
if ("CN".equals(Locale.getDefault().getCountry())) {
// Enable domain fronting if the country is CN
if (!sSettingsPre.contains(KEY_BUILT_IN_HOSTS)) {
putBuiltInHosts(true);
}
if (!sSettingsPre.contains(KEY_DOMAIN_FRONTING)) {
putDF(true);
}
// Enable show tag translations if the country is CN
if (!sSettingsPre.contains(KEY_SHOW_TAG_TRANSLATIONS)) {
putShowTagTranslations(true);
}
}
}
private static EhConfig loadEhConfig() {
EhConfig ehConfig = new EhConfig();
ehConfig.imageSize = getImageResolution();
ehConfig.excludedLanguages = getExcludedLanguages();
ehConfig.defaultCategories = getDefaultCategories();
ehConfig.excludedNamespaces = getExcludedTagNamespaces();
ehConfig.setDirty();
return ehConfig;
}
public static boolean getBoolean(String key, boolean defValue) {
try {
return sSettingsPre.getBoolean(key, defValue);
} catch (ClassCastException e) {
Log.d(TAG, "Get ClassCastException when get " + key + " value", e);
return defValue;
}
}
public static void putBoolean(String key, boolean value) {
sSettingsPre.edit().putBoolean(key, value).apply();
}
public static int getInt(String key, int defValue) {
try {
return sSettingsPre.getInt(key, defValue);
} catch (ClassCastException e) {
Log.d(TAG, "Get ClassCastException when get " + key + " value", e);
return defValue;
}
}
public static void putInt(String key, int value) {
sSettingsPre.edit().putInt(key, value).apply();
}
public static String getString(String key, String defValue) {
try {
return sSettingsPre.getString(key, defValue);
} catch (ClassCastException e) {
Log.d(TAG, "Get ClassCastException when get " + key + " value", e);
return defValue;
}
}
public static void putString(String key, String value) {
sSettingsPre.edit().putString(key, value).apply();
}
public static Set<String> getStringSet(String key) {
return sSettingsPre.getStringSet(key, null);
}
public static void putStringToStringSet(String key, String value) {
Set<String> set = getStringSet(key);
if (set == null)
set = Set.of(value);
else if (set.contains(value))
return;
else
set.add(value);
sSettingsPre.edit().putStringSet(key, set).apply();
}
public static int getIntFromStr(String key, int defValue) {
try {
return NumberUtils.parseIntSafely(sSettingsPre.getString(key, Integer.toString(defValue)), defValue);
} catch (ClassCastException e) {
Log.d(TAG, "Get ClassCastException when get " + key + " value", e);
return defValue;
}
}
public static void putIntToStr(String key, int value) {
sSettingsPre.edit().putString(key, Integer.toString(value)).apply();
}
@Nullable
public static String getDisplayName() {
return getString(KEY_DISPLAY_NAME, DEFAULT_DISPLAY_NAME);
}
public static void putDisplayName(String value) {
putString(KEY_DISPLAY_NAME, value);
}
public static void putAvatar(String value) {
putString(KEY_AVATAR, value);
}
public static boolean getRemoveImageFiles() {
return getBoolean(KEY_REMOVE_IMAGE_FILES, DEFAULT_REMOVE_IMAGE_FILES);
}
public static void putRemoveImageFiles(boolean value) {
putBoolean(KEY_REMOVE_IMAGE_FILES, value);
}
public static EhConfig getEhConfig() {
return sEhConfig;
}
public static boolean getNeedSignIn() {
return getBoolean(KEY_NEED_SIGN_IN, DEFAULT_NEED_SIGN_IN);
}
public static void putNeedSignIn(boolean value) {
putBoolean(KEY_NEED_SIGN_IN, value);
}
public static boolean getSelectSite() {
return getBoolean(KEY_SELECT_SITE, DEFAULT_SELECT_SITE);
}
public static void putSelectSite(boolean value) {
putBoolean(KEY_SELECT_SITE, value);
}
public static int getTheme() {
return getIntFromStr(KEY_THEME, DEFAULT_THEME);
}
public static int getGallerySite() {
return getIntFromStr(KEY_GALLERY_SITE, DEFAULT_GALLERY_SITE);
}
public static void putGallerySite(int value) {
putIntToStr(KEY_GALLERY_SITE, value);
}
public static String getLaunchPageGalleryListSceneAction() {
int value = getIntFromStr(KEY_LAUNCH_PAGE, DEFAULT_LAUNCH_PAGE);
return switch (value) {
case 0 -> GalleryListScene.ACTION_HOMEPAGE;
case 1 -> GalleryListScene.ACTION_SUBSCRIPTION;
case 2 -> GalleryListScene.ACTION_WHATS_HOT;
case 3 -> GalleryListScene.ACTION_TOP_LIST;
default -> throw new IllegalStateException("Unexpected value: " + value);
};
}
public static int getListMode() {
return getIntFromStr(KEY_LIST_MODE, DEFAULT_LIST_MODE);
}
public static int getDetailSize() {
return getIntFromStr(KEY_DETAIL_SIZE, DEFAULT_DETAIL_SIZE);
}
@DimenRes
public static int getDetailSizeResId() {
return switch (getDetailSize()) {
case 0 -> R.dimen.gallery_list_column_width_long;
case 1 -> R.dimen.gallery_list_column_width_short;
default -> throw new IllegalStateException("Unexpected value: " + getDetailSize());
};
}
public static int getThumbSize() {
return dip2px(getInt(KEY_THUMB_SIZE, DEFAULT_THUMB_SIZE));
}
public static int dip2px(int dpValue) {
final float scale = EhApplication.getApplication().getResources().getDisplayMetrics().density;
return (int) (dpValue * scale + 0.5f);
}
public static int getThumbResolution() {
return getIntFromStr(KEY_THUMB_RESOLUTION, DEFAULT_THUMB_RESOLUTION);
}
public static boolean getShowComments() {
return getBoolean(KEY_SHOW_COMMENTS, DEFAULT_SHOW_COMMENTS);
}
public static boolean getRequestNews() {
return getBoolean(KEY_REQUEST_NEWS, DEFAULT_REQUEST_NEWS);
}
public static boolean getHideHvEvents() {
return getBoolean(KEY_HIDE_HV_EVENTS, DEFAULT_HIDE_HV_EVENTS);
}
public static boolean getShowJpnTitle() {
return getBoolean(KEY_SHOW_JPN_TITLE, DEFAULT_SHOW_JPN_TITLE);
}
public static boolean getShowGalleryPages() {
return getBoolean(KEY_SHOW_GALLERY_PAGES, DEFAULT_SHOW_GALLERY_PAGES);
}
public static boolean getShowTagTranslations() {
return getBoolean(KEY_SHOW_TAG_TRANSLATIONS, DEFAULT_SHOW_TAG_TRANSLATIONS);
}
public static void putShowTagTranslations(boolean value) {
putBoolean(KEY_SHOW_TAG_TRANSLATIONS, value);
}
public static int getDefaultCategories() {
return getInt(KEY_DEFAULT_CATEGORIES, DEFAULT_DEFAULT_CATEGORIES);
}
public static int getExcludedTagNamespaces() {
return getInt(KEY_EXCLUDED_TAG_NAMESPACES, DEFAULT_EXCLUDED_TAG_NAMESPACES);
}
public static String getExcludedLanguages() {
return getString(KEY_EXCLUDED_LANGUAGES, DEFAULT_EXCLUDED_LANGUAGES);
}
public static boolean getMeteredNetworkWarning() {
return getBoolean(KEY_METERED_NETWORK_WARNING, DEFAULT_METERED_NETWORK_WARNING);
}
public static boolean getAppLinkVerifyTip() {
return getBoolean(KEY_APP_LINK_VERIFY_TIP, DEFAULT_APP_LINK_VERIFY_TIP);
}
public static void putAppLinkVerifyTip(boolean value) {
putBoolean(KEY_APP_LINK_VERIFY_TIP, value);
}
public static boolean getEnabledSecurity() {
return getBoolean(KEY_SEC_SECURITY, VALUE_SEC_SECURITY);
}
@Nullable
public static UniFile getDownloadLocation() {
UniFile dir;
Uri.Builder builder = new Uri.Builder();
builder.scheme(getString(KEY_DOWNLOAD_SAVE_SCHEME, null));
builder.encodedAuthority(getString(KEY_DOWNLOAD_SAVE_AUTHORITY, null));
builder.encodedPath(getString(KEY_DOWNLOAD_SAVE_PATH, null));
builder.encodedQuery(getString(KEY_DOWNLOAD_SAVE_QUERY, null));
builder.encodedFragment(getString(KEY_DOWNLOAD_SAVE_FRAGMENT, null));
dir = UniFile.fromUri(EhApplication.getApplication(), builder.build());
return dir != null ? dir : UniFile.fromFile(AppConfig.getDefaultDownloadDir());
}
public static void putDownloadLocation(@NonNull UniFile location) {
Uri uri = location.getUri();
putString(KEY_DOWNLOAD_SAVE_SCHEME, uri.getScheme());
putString(KEY_DOWNLOAD_SAVE_AUTHORITY, uri.getEncodedAuthority());
putString(KEY_DOWNLOAD_SAVE_PATH, uri.getEncodedPath());
putString(KEY_DOWNLOAD_SAVE_QUERY, uri.getEncodedQuery());
putString(KEY_DOWNLOAD_SAVE_FRAGMENT, uri.getEncodedFragment());
if (getMediaScan()) {
CommonOperations.removeNoMediaFile(location);
} else {
CommonOperations.ensureNoMediaFile(location);
}
}
public static boolean getMediaScan() {
return getBoolean(KEY_MEDIA_SCAN, DEFAULT_MEDIA_SCAN);
}
public static String getRecentDownloadLabel() {
return getString(KEY_RECENT_DOWNLOAD_LABEL, DEFAULT_RECENT_DOWNLOAD_LABEL);
}
public static void putRecentDownloadLabel(String value) {
putString(KEY_RECENT_DOWNLOAD_LABEL, value);
}
public static boolean getHasDefaultDownloadLabel() {
return getBoolean(KEY_HAS_DEFAULT_DOWNLOAD_LABEL, DEFAULT_HAS_DOWNLOAD_LABEL);
}
public static void putHasDefaultDownloadLabel(boolean hasDefaultDownloadLabel) {
putBoolean(KEY_HAS_DEFAULT_DOWNLOAD_LABEL, hasDefaultDownloadLabel);
}
public static String getDefaultDownloadLabel() {
return getString(KEY_DEFAULT_DOWNLOAD_LABEL, DEFAULT_DOWNLOAD_LABEL);
}
public static void putDefaultDownloadLabel(String value) {
putString(KEY_DEFAULT_DOWNLOAD_LABEL, value);
}
public static int getMultiThreadDownload() {
return getIntFromStr(KEY_MULTI_THREAD_DOWNLOAD, DEFAULT_MULTI_THREAD_DOWNLOAD);
}
public static int getDownloadDelay() {
return getIntFromStr(KEY_DOWNLOAD_DELAY, DEFAULT_DOWNLOAD_DELAY);
}
public static int getPreloadImage() {
return getIntFromStr(KEY_PRELOAD_IMAGE, DEFAULT_PRELOAD_IMAGE);
}
public static String getImageResolution() {
return getString(KEY_IMAGE_RESOLUTION, DEFAULT_IMAGE_RESOLUTION);
}
public static void putImageResolution(String value) {
sEhConfig.imageSize = value;
sEhConfig.setDirty();
putString(KEY_IMAGE_RESOLUTION, value);
}
public static boolean getDownloadOriginImage() {
return getBoolean(KEY_DOWNLOAD_ORIGIN_IMAGE, DEFAULT_DOWNLOAD_ORIGIN_IMAGE);
}
public static String[] getFavCat() {
String[] favCat = new String[10];
favCat[0] = sSettingsPre.getString(KEY_FAV_CAT_0, DEFAULT_FAV_CAT_0);
favCat[1] = sSettingsPre.getString(KEY_FAV_CAT_1, DEFAULT_FAV_CAT_1);
favCat[2] = sSettingsPre.getString(KEY_FAV_CAT_2, DEFAULT_FAV_CAT_2);
favCat[3] = sSettingsPre.getString(KEY_FAV_CAT_3, DEFAULT_FAV_CAT_3);
favCat[4] = sSettingsPre.getString(KEY_FAV_CAT_4, DEFAULT_FAV_CAT_4);
favCat[5] = sSettingsPre.getString(KEY_FAV_CAT_5, DEFAULT_FAV_CAT_5);
favCat[6] = sSettingsPre.getString(KEY_FAV_CAT_6, DEFAULT_FAV_CAT_6);
favCat[7] = sSettingsPre.getString(KEY_FAV_CAT_7, DEFAULT_FAV_CAT_7);
favCat[8] = sSettingsPre.getString(KEY_FAV_CAT_8, DEFAULT_FAV_CAT_8);
favCat[9] = sSettingsPre.getString(KEY_FAV_CAT_9, DEFAULT_FAV_CAT_9);
return favCat;
}
public static void putFavCat(String[] value) {
AssertUtilsKt.assertEquals(10, value.length);
sSettingsPre.edit()
.putString(KEY_FAV_CAT_0, value[0])
.putString(KEY_FAV_CAT_1, value[1])
.putString(KEY_FAV_CAT_2, value[2])
.putString(KEY_FAV_CAT_3, value[3])
.putString(KEY_FAV_CAT_4, value[4])
.putString(KEY_FAV_CAT_5, value[5])
.putString(KEY_FAV_CAT_6, value[6])
.putString(KEY_FAV_CAT_7, value[7])
.putString(KEY_FAV_CAT_8, value[8])
.putString(KEY_FAV_CAT_9, value[9])
.apply();
}
public static int[] getFavCount() {
int[] favCount = new int[10];
favCount[0] = sSettingsPre.getInt(KEY_FAV_COUNT_0, DEFAULT_FAV_COUNT);
favCount[1] = sSettingsPre.getInt(KEY_FAV_COUNT_1, DEFAULT_FAV_COUNT);
favCount[2] = sSettingsPre.getInt(KEY_FAV_COUNT_2, DEFAULT_FAV_COUNT);
favCount[3] = sSettingsPre.getInt(KEY_FAV_COUNT_3, DEFAULT_FAV_COUNT);
favCount[4] = sSettingsPre.getInt(KEY_FAV_COUNT_4, DEFAULT_FAV_COUNT);
favCount[5] = sSettingsPre.getInt(KEY_FAV_COUNT_5, DEFAULT_FAV_COUNT);
favCount[6] = sSettingsPre.getInt(KEY_FAV_COUNT_6, DEFAULT_FAV_COUNT);
favCount[7] = sSettingsPre.getInt(KEY_FAV_COUNT_7, DEFAULT_FAV_COUNT);
favCount[8] = sSettingsPre.getInt(KEY_FAV_COUNT_8, DEFAULT_FAV_COUNT);
favCount[9] = sSettingsPre.getInt(KEY_FAV_COUNT_9, DEFAULT_FAV_COUNT);
return favCount;
}
public static void putFavCount(int[] count) {
AssertUtilsKt.assertEquals(10, count.length);
sSettingsPre.edit()
.putInt(KEY_FAV_COUNT_0, count[0])
.putInt(KEY_FAV_COUNT_1, count[1])
.putInt(KEY_FAV_COUNT_2, count[2])
.putInt(KEY_FAV_COUNT_3, count[3])
.putInt(KEY_FAV_COUNT_4, count[4])
.putInt(KEY_FAV_COUNT_5, count[5])
.putInt(KEY_FAV_COUNT_6, count[6])
.putInt(KEY_FAV_COUNT_7, count[7])
.putInt(KEY_FAV_COUNT_8, count[8])
.putInt(KEY_FAV_COUNT_9, count[9])
.apply();
}
public static int getFavLocalCount() {
return sSettingsPre.getInt(KEY_FAV_LOCAL, DEFAULT_FAV_COUNT);
}
public static void putFavLocalCount(int count) {
sSettingsPre.edit().putInt(KEY_FAV_LOCAL, count).apply();
}
public static int getFavCloudCount() {
return sSettingsPre.getInt(KEY_FAV_CLOUD, DEFAULT_FAV_COUNT);
}
public static void putFavCloudCount(int count) {
sSettingsPre.edit().putInt(KEY_FAV_CLOUD, count).apply();
}
public static int getRecentFavCat() {
return getInt(KEY_RECENT_FAV_CAT, DEFAULT_RECENT_FAV_CAT);
}
public static void putRecentFavCat(int value) {
putInt(KEY_RECENT_FAV_CAT, value);
}
public static int getDefaultFavSlot() {
return getInt(KEY_DEFAULT_FAV_SLOT, DEFAULT_DEFAULT_FAV_SLOT);
}
public static void putDefaultFavSlot(int value) {
putInt(KEY_DEFAULT_FAV_SLOT, value);
}
public static boolean getQSSaveProgress() {
return getBoolean(KEY_QS_SAVE_PROGRESS, DEFAULT_QS_SAVE_PROGRESS);
}
public static void putQSSaveProgress(boolean value) {
putBoolean(KEY_QS_SAVE_PROGRESS, value);
}
public static boolean getSaveParseErrorBody() {
return getBoolean(KEY_SAVE_PARSE_ERROR_BODY, DEFAULT_SAVE_PARSE_ERROR_BODY);
}
public static boolean getSaveCrashLog() {
return getBoolean(KEY_SAVE_CRASH_LOG, DEFAULT_SAVE_CRASH_LOG);
}
public static boolean getSecurity() {
return getBoolean(KEY_SECURITY, false);
}
public static void putSecurity(boolean value) {
putBoolean(KEY_SECURITY, value);
}
public static int getSecurityDelay() {
return getInt(KEY_SECURITY_DELAY, 0);
}
public static int getReadCacheSize() {
return getIntFromStr(KEY_READ_CACHE_SIZE, DEFAULT_READ_CACHE_SIZE);
}
public static boolean getBuiltInHosts() {
return getBoolean(KEY_BUILT_IN_HOSTS, DEFAULT_BUILT_IN_HOSTS);
}
public static void putBuiltInHosts(boolean value) {
putBoolean(KEY_BUILT_IN_HOSTS, value);
}
public static boolean getDF() {
return getBoolean(KEY_DOMAIN_FRONTING, DEFAULT_FRONTING);
}
public static void putDF(boolean value) {
putBoolean(KEY_DOMAIN_FRONTING, value);
}
public static boolean getBypassVpn() {
return getBoolean(KEY_BYPASS_VPN, DEFAULT_BYPASS_VPN);
}
public static int getProxyType() {
return getInt(KEY_PROXY_TYPE, DEFAULT_PROXY_TYPE);
}
public static void putProxyType(int value) {
putInt(KEY_PROXY_TYPE, value);
}
public static String getProxyIp() {
return getString(KEY_PROXY_IP, DEFAULT_PROXY_IP);
}
public static void putProxyIp(String value) {
putString(KEY_PROXY_IP, value);
}
public static int getProxyPort() {
return getInt(KEY_PROXY_PORT, DEFAULT_PROXY_PORT);
}
public static void putProxyPort(int value) {
putInt(KEY_PROXY_PORT, value);
}
public static int getClipboardTextHashCode() {
return getInt(KEY_CLIPBOARD_TEXT_HASH_CODE, DEFAULT_CLIPBOARD_TEXT_HASH_CODE);
}
public static void putClipboardTextHashCode(int value) {
putInt(KEY_CLIPBOARD_TEXT_HASH_CODE, value);
}
public static Set<String> getArchivePasswds() {
return getStringSet(KEY_ARCHIVE_PASSWDS);
}
public static void putPasswdToArchivePasswds(String value) {
putStringToStringSet(KEY_ARCHIVE_PASSWDS, value);
}
public static int getListThumbSize() {
if (LIST_THUMB_SIZE_INITED) {
return LIST_THUMB_SIZE;
}
int size = 3 * getInt(KEY_LIST_THUMB_SIZE, DEFAULT_LIST_THUMB_SIZE);
LIST_THUMB_SIZE = size;
LIST_THUMB_SIZE_INITED = true;
return size;
}
public static boolean getNotificationRequired() {
return getBoolean(KEY_NOTIFICATION_REQUIRED, false);
}
public static void putNotificationRequired() {
putBoolean(KEY_NOTIFICATION_REQUIRED, true);
}
}
@@ -1,86 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.text.TextUtils;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.browser.customtabs.CustomTabsIntent;
import com.hippo.ehviewer.client.data.GalleryDetail;
import com.hippo.ehviewer.client.parser.GalleryPageUrlParser;
import eu.kanade.tachiyomi.ui.reader.ReaderActivity;
public final class UrlOpener {
private UrlOpener() {
}
public static void openUrl(@NonNull Context context, String url, boolean ehUrl) {
openUrl(context, url, ehUrl, null);
}
public static void openUrl(@NonNull Context context, String url, boolean ehUrl, GalleryDetail galleryDetail) {
if (TextUtils.isEmpty(url)) {
return;
}
Intent intent;
Uri uri = Uri.parse(url);
if (ehUrl) {
if (galleryDetail != null) {
GalleryPageUrlParser.Result result = GalleryPageUrlParser.parse(url);
if (result != null) {
if (result.gid == galleryDetail.getGid()) {
intent = new Intent(context, ReaderActivity.class);
intent.setAction(ReaderActivity.ACTION_EH);
intent.putExtra(ReaderActivity.KEY_GALLERY_INFO, galleryDetail);
intent.putExtra(ReaderActivity.KEY_PAGE, result.page);
context.startActivity(intent);
return;
}
} else if (url.startsWith("#c")) {
try {
intent = new Intent(context, ReaderActivity.class);
intent.setAction(ReaderActivity.ACTION_EH);
intent.putExtra(ReaderActivity.KEY_GALLERY_INFO, galleryDetail);
intent.putExtra(ReaderActivity.KEY_PAGE, Integer.parseInt(url.replace("#c", "")) - 1);
context.startActivity(intent);
return;
} catch (NumberFormatException e) {
//
}
}
}
}
CustomTabsIntent.Builder customTabsIntent = new CustomTabsIntent.Builder();
customTabsIntent.setShowTitle(true);
try {
customTabsIntent.build().launchUrl(context, uri);
} catch (ActivityNotFoundException e) {
Toast.makeText(context, R.string.no_browser_installed, Toast.LENGTH_LONG).show();
}
}
}
@@ -1,109 +0,0 @@
/*
* Copyright 2022 Tarsin Norbin
*
* This file is part of EhViewer
*
* EhViewer is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* EhViewer is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with EhViewer.
* If not, see <https://www.gnu.org/licenses/>.
*/
package com.hippo.ehviewer;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.core.view.WindowInsetsAnimationCompat;
import androidx.core.view.WindowInsetsCompat;
import com.hippo.yorozuya.MathUtils;
import java.util.HashMap;
import java.util.List;
public class WindowInsetsAnimationHelper extends WindowInsetsAnimationCompat.Callback {
private final View[] views;
private final HashMap<View, Integer> startPaddings = new HashMap<>();
private final HashMap<View, Integer> endPaddings = new HashMap<>();
WindowInsetsAnimationCompat animation;
public WindowInsetsAnimationHelper(int dispatchMode, View... views) {
super(dispatchMode);
this.views = views;
}
@Override
public void onPrepare(@NonNull WindowInsetsAnimationCompat animation) {
super.onPrepare(animation);
this.animation = animation;
for (View view : views) {
if (view == null) {
continue;
}
startPaddings.put(view, view.getPaddingBottom());
}
}
@NonNull
@Override
public WindowInsetsAnimationCompat.BoundsCompat onStart(@NonNull WindowInsetsAnimationCompat animation, @NonNull WindowInsetsAnimationCompat.BoundsCompat bounds) {
this.animation = animation;
for (View view : views) {
if (view == null) {
continue;
}
endPaddings.put(view, view.getPaddingBottom());
int startPadding = startPaddings.containsKey(view) ? startPaddings.get(view) : 0;
view.setTranslationY(-(startPadding - view.getPaddingBottom()));
}
return bounds;
}
@NonNull
@Override
public WindowInsetsCompat onProgress(@NonNull WindowInsetsCompat insets, @NonNull List<WindowInsetsAnimationCompat> runningAnimations) {
if (animation == null) {
return insets;
}
WindowInsetsAnimationCompat imeAnimation = null;
for (WindowInsetsAnimationCompat animation : runningAnimations) {
if ((animation.getTypeMask() & WindowInsetsCompat.Type.ime()) != 0) {
imeAnimation = animation;
break;
}
}
if (imeAnimation != null) {
for (View view : views) {
if (view == null) {
continue;
}
int startPadding = startPaddings.containsKey(view) ? startPaddings.get(view) : 0;
int endPadding = endPaddings.containsKey(view) ? endPaddings.get(view) : 0;
view.setTranslationY(MathUtils.lerp(endPadding - startPadding, 0, animation.getInterpolatedFraction()));
}
}
return insets;
}
@Override
public void onEnd(@NonNull WindowInsetsAnimationCompat animation) {
super.onEnd(animation);
startPaddings.clear();
endPaddings.clear();
this.animation = null;
for (View view : views) {
if (view == null) {
continue;
}
view.setTranslationY(0);
}
}
}
@@ -1,184 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client
import eu.kanade.tachiyomi.util.lang.launchIO
import eu.kanade.tachiyomi.util.lang.withUIContext
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.CoroutineScope
import java.io.File
object EhClient {
internal fun enqueue(request: EhRequest, scope: CoroutineScope) {
check(!request.isActive) // Abort if attempt to execute an active request
request.job = scope.launchIO {
val callback: Callback<Any?>? = request.callback
try {
val result: Any? = request.run {
if (args == null)
execute(method)
else
execute(method, *args!!)
}
withUIContext { callback?.onSuccess(result) }
} catch (e: Exception) {
if (e is CancellationException)
throw e // Don't catch coroutine CancellationException
e.printStackTrace()
withUIContext { callback?.onFailure(e) }
}
}
}
suspend fun execute(method: Int, vararg params: Any?): Any? {
return when (method) {
METHOD_SIGN_IN -> EhEngine.signIn(
params[0] as String,
params[1] as String
)
METHOD_GET_GALLERY_LIST -> EhEngine.getGalleryList(
params[0] as String
)
METHOD_GET_GALLERY_DETAIL -> EhEngine.getGalleryDetail(
params[0] as String?
)
METHOD_GET_PREVIEW_SET -> EhEngine.getPreviewSet(
params[0] as String?
)
METHOD_GET_RATE_GALLERY -> EhEngine.rateGallery(
params[0] as Long,
params[1] as String?,
params[2] as Long,
params[3] as String?,
params[4] as Float
)
METHOD_GET_COMMENT_GALLERY -> EhEngine.commentGallery(
params[0] as String?,
params[1] as String,
params[2] as String?
)
METHOD_GET_GALLERY_TOKEN -> EhEngine.getGalleryToken(
params[0] as Long,
params[1] as String?,
params[2] as Int
)
METHOD_GET_FAVORITES -> EhEngine.getFavorites(
params[0] as String
)
METHOD_ADD_FAVORITES -> EhEngine.addFavorites(
params[0] as Long,
params[1] as String?,
params[2] as Int,
params[3] as String?
)
METHOD_ADD_FAVORITES_RANGE -> @Suppress("UNCHECKED_CAST") EhEngine.addFavoritesRange(
params[0] as LongArray,
params[1] as Array<String?>,
params[2] as Int
)
METHOD_MODIFY_FAVORITES -> EhEngine.modifyFavorites(
params[0] as String,
params[1] as LongArray,
params[2] as Int
)
METHOD_GET_TORRENT_LIST -> EhEngine.getTorrentList(
params[0] as String?,
params[1] as Long,
params[2] as String?
)
METHOD_GET_PROFILE -> EhEngine.getProfile()
METHOD_VOTE_COMMENT -> EhEngine.voteComment(
params[0] as Long,
params[1] as String?,
params[2] as Long,
params[3] as String?,
params[4] as Long,
params[5] as Int
)
METHOD_IMAGE_SEARCH -> EhEngine.imageSearch(
params[0] as File,
params[1] as Boolean,
params[2] as Boolean,
params[3] as Boolean
)
METHOD_ARCHIVE_LIST -> EhEngine.getArchiveList(
params[0] as String?,
params[1] as Long,
params[2] as String?
)
METHOD_DOWNLOAD_ARCHIVE -> EhEngine.downloadArchive(
params[0] as Long,
params[1] as String?,
params[2] as String?,
params[3] as String?,
params[4] as Boolean
)
METHOD_VOTE_TAG -> EhEngine.voteTag(
params[0] as Long,
params[1] as String?,
params[2] as Long,
params[3] as String?,
params[4] as String?,
params[5] as Int
)
METHOD_GET_UCONFIG -> EhEngine.getUConfig()
else -> throw IllegalStateException("Can't detect method $method")
}
}
interface Callback<E> {
fun onSuccess(result: E)
fun onFailure(e: Exception)
fun onCancel()
}
const val METHOD_SIGN_IN = 0
const val METHOD_GET_GALLERY_LIST = 1
const val METHOD_GET_GALLERY_DETAIL = 3
const val METHOD_GET_PREVIEW_SET = 4
const val METHOD_GET_RATE_GALLERY = 5
const val METHOD_GET_COMMENT_GALLERY = 6
const val METHOD_GET_GALLERY_TOKEN = 7
const val METHOD_GET_FAVORITES = 8
const val METHOD_ADD_FAVORITES = 9
const val METHOD_ADD_FAVORITES_RANGE = 10
const val METHOD_MODIFY_FAVORITES = 11
const val METHOD_GET_TORRENT_LIST = 12
const val METHOD_GET_PROFILE = 14
const val METHOD_VOTE_COMMENT = 15
const val METHOD_IMAGE_SEARCH = 16
const val METHOD_ARCHIVE_LIST = 17
const val METHOD_DOWNLOAD_ARCHIVE = 18
const val METHOD_VOTE_TAG = 19
const val METHOD_GET_UCONFIG = 20
}
@@ -1,806 +0,0 @@
/*
* Copyright 2015 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client;
import com.hippo.network.InetValidator;
/**
* Some configurable stuff about EH. It ends up cookie.
*/
public class EhConfig implements Cloneable {
/**
* The Cookie key of uconfig
*/
public static final String KEY_UCONFIG = "uconfig";
/**
* The Cookie key of lofi resolution
*/
public static final String KEY_LOFI_RESOLUTION = "xres";
/**
* The Cookie key of show warning
*/
public static final String KEY_CONTENT_WARNING = "nw";
/**
* load images through the Hentai@Home Network
*/
public static final String LOAD_FROM_HAH_YES = "y";
/**
* do not load images through the Hentai@Home Network
*/
public static final String LOAD_FROM_HAH_NO = "n";
/**
* Image Size Auto
*/
public static final String IMAGE_SIZE_AUTO = "a";
/**
* Image Size 780x
*/
public static final String IMAGE_SIZE_780X = "780";
/**
* Image Size 980x
*/
public static final String IMAGE_SIZE_980X = "980";
/**
* Image Size 1280x
*/
public static final String IMAGE_SIZE_1280X = "1280";
/**
* Image Size 1600x
*/
public static final String IMAGE_SIZE_1600X = "1600";
/**
* Image Size 2400x
*/
public static final String IMAGE_SIZE_2400X = "2400";
/**
* Manual Accept, Manual Start
*/
public static final String ARCHIVER_DOWNLOAD_MAMS = "0";
/**
* >Manual Accept, Auto Start
*/
public static final String ARCHIVER_DOWNLOAD_AAMS = "1";
/**
* Auto Accept, Manual Start
*/
public static final String ARCHIVER_DOWNLOAD_MAAS = "2";
/**
* Auto Accept, Auto Start
*/
public static final String ARCHIVER_DOWNLOAD_AAAS = "3";
/**
* List View on the front and search pages
*/
public static final String LAYOUT_MODE_LIST = "l";
/**
* Thumbnail View on the front and search pages
*/
public static final String LAYOUT_MODE_THUMB = "t";
public static final int MISC = 0x1;
public static final int DOUJINSHI = 0x2;
public static final int MANGA = 0x4;
public static final int ARTIST_CG = 0x8;
public static final int GAME_CG = 0x10;
public static final int IMAGE_SET = 0x20;
public static final int COSPLAY = 0x40;
public static final int ASIAN_PORN = 0x80;
public static final int NON_H = 0x100;
public static final int WESTERN = 0x200;
public static final int ALL_CATEGORY = 0x3ff;
public static final int NAMESPACES_RECLASS = 0x1;
public static final int NAMESPACES_LANGUAGE = 0x2;
public static final int NAMESPACES_PARODY = 0x4;
public static final int NAMESPACES_CHARACTER = 0x8;
public static final int NAMESPACES_GROUP = 0x10;
public static final int NAMESPACES_ARTIST = 0x20;
public static final int NAMESPACES_MALE = 0x40;
public static final int NAMESPACES_FEMALE = 0x80;
public static final String JAPANESE_ORIGINAL = "0";
public static final String JAPANESE_TRANSLATED = "1024";
public static final String JAPANESE_REWRITE = "2048";
public static final String ENGLISH_ORIGINAL = "1";
public static final String ENGLISH_TRANSLATED = "1025";
public static final String ENGLISH_REWRITE = "2049";
public static final String CHINESE_ORIGINAL = "10";
public static final String CHINESE_TRANSLATED = "1034";
public static final String CHINESE_REWRITE = "2058";
public static final String DUTCH_ORIGINAL = "20";
public static final String DUTCH_TRANSLATED = "1044";
public static final String DUTCH_REWRITE = "2068";
public static final String FRENCH_ORIGINAL = "30";
public static final String FRENCH_TRANSLATED = "1054";
public static final String FRENCH_REWRITE = "2078";
public static final String GERMAN_ORIGINAL = "40";
public static final String GERMAN_TRANSLATED = "1064";
public static final String GERMAN_REWRITE = "2088";
public static final String HUNGARIAN_ORIGINAL = "50";
public static final String HUNGARIAN_TRANSLATED = "1074";
public static final String HUNGARIAN_REWRITE = "2098";
public static final String ITALIAN_ORIGINAL = "60";
public static final String ITALIAN_TRANSLATED = "1084";
public static final String ITALIAN_REWRITE = "2108";
public static final String KOREAN_ORIGINAL = "70";
public static final String KOREAN_TRANSLATED = "1094";
public static final String KOREAN_REWRITE = "2118";
public static final String POLISH_ORIGINAL = "80";
public static final String POLISH_TRANSLATED = "1104";
public static final String POLISH_REWRITE = "2128";
public static final String PORTUGUESE_ORIGINAL = "90";
public static final String PORTUGUESE_TRANSLATED = "1114";
public static final String PORTUGUESE_REWRITE = "2138";
public static final String RUSSIAN_ORIGINAL = "100";
public static final String RUSSIAN_TRANSLATED = "1124";
public static final String RUSSIAN_REWRITE = "2148";
public static final String SPANISH_ORIGINAL = "110";
public static final String SPANISH_TRANSLATED = "1134";
public static final String SPANISH_REWRITE = "2158";
public static final String THAI_ORIGINAL = "120";
public static final String THAI_TRANSLATED = "1144";
public static final String THAI_REWRITE = "2168";
public static final String VIETNAMESE_ORIGINAL = "130";
public static final String VIETNAMESE_TRANSLATED = "1154";
public static final String VIETNAMESE_REWRITE = "2178";
public static final String NA_ORIGINAL = "254";
public static final String NA_TRANSLATED = "1278";
public static final String NA_REWRITE = "2302";
public static final String OTHER_ORIGINAL = "255";
public static final String OTHER_TRANSLATED = "1279";
public static final String OTHER_REWRITE = "2303";
/**
* 25 results per page for the index/search page and torrent search pages
*/
public static final String RESULT_COUNT_25 = "0";
/**
* 50 results per page for the index/search page and torrent search pages
*/
public static final String RESULT_COUNT_50 = "1";
/**
* 100 results per page for the index/search page and torrent search pages
*/
public static final String RESULT_COUNT_100 = "2";
/**
* 200 results per page for the index/search page and torrent search pages
*/
public static final String RESULT_COUNT_200 = "3";
/**
* On mouse-over
*/
public static final String MOUSE_OVER_YES = "m";
/**
* On page load
*/
public static final String MOUSE_OVER_NO = "p";
/**
* Preview normal size
*/
public static final String PREVIEW_SIZE_NORMAL = "m";
/**
* Preview large size
*/
public static final String PREVIEW_SIZE_LARGE = "l";
/**
* 4 row preview per page
*/
public static final String PREVIEW_ROW_4 = "2";
/**
* 10 row preview per page
*/
public static final String PREVIEW_ROW_10 = "5";
/**
* 20 row preview per page
*/
public static final String PREVIEW_ROW_20 = "10";
/**
* 40 row preview per page
*/
public static final String PREVIEW_ROW_40 = "20";
/**
* Oldest comments first
*/
public static final String COMMENTS_SORT_OLDEST_FIRST = "a";
/**
* Recent comments first
*/
public static final String COMMENTS_SORT_RECENT_FIRST = "d";
/**
* By highest score
*/
public static final String COMMENTS_SORT_HIGHEST_SCORE_FIRST = "s";
/**
* Show gallery comment votes On score hover or click
*/
public static final String COMMENTS_VOTES_POP = "0";
/**
* Always show gallery comment votes
*/
public static final String COMMENTS_VOTES_ALWAYS = "1";
/**
* Sort order for gallery tags alphabetically
*/
public static final String TAGS_SORT_ALPHABETICAL = "a";
/**
* Sort order for gallery tags by tag power
*/
public static final String TAGS_SORT_POWER = "p";
/**
* Show gallery page numbers
*/
public static final String SHOW_GALLERY_INDEX_YES = "1";
/**
* Do not show gallery page numbers
*/
public static final String SHOW_GALLERY_INDEX_NO = "0";
/**
* Enable Tag Flagging
*/
public static final String ENABLE_TAG_FLAGGING_YES = "y";
/**
* Do not enable Tag Flagging
*/
public static final String ENABLE_TAG_FLAGGING_NO = "n";
/**
* Always display the original images
*/
public static final String ALWAYS_ORIGINAL_YES = "y";
/**
* Do not Always display the original images
*/
public static final String ALWAYS_ORIGINAL_NO = "n";
/**
* Enable the Multi-Page Viewe
*/
public static final String MULTI_PAGE_YES = "y";
/**
* Do not enable the Multi-Page Viewe
*/
public static final String MULTI_PAGE_NO = "n";
/**
* Align left, only scale if image is larger than browser width
*/
public static final String MULTI_PAGE_STYLE_N = "n";
/**
* Align center, only scale if image is larger than browser width
*/
public static final String MULTI_PAGE_STYLE_C = "c";
/**
* Align center, Always scale images to fit browser width
*/
public static final String MULTI_PAGE_STYLE_Y = "y";
/**
* Show Multi-Page Viewer Thumbnail Pane
*/
public static final String MULTI_PAGE_THUMB_SHOW = "n";
/**
* Hide Multi-Page Viewer Thumbnail Pane
*/
public static final String MULTI_PAGE_THUMB_HIDE = "y";
/**
* 460x for lofi resolution
*/
public static final String LOFI_RESOLUTION_460X = "1";
/**
* 780X for lofi resolution
*/
public static final String LOFI_RESOLUTION_780X = "2";
/**
* 980X for lofi resolution
*/
public static final String LOFI_RESOLUTION_980X = "3";
/**
* show warning
*/
public static final String CONTENT_WARNING_SHOW = "0";
/**
* not show warning
*/
public static final String CONTENT_WARNING_NOT_SHOW = "1";
/**
* The key of load images through the Hentai@Home Network
*
* @see #LOAD_FROM_HAH_YES
* @see #LOAD_FROM_HAH_NO
*/
private static final String KEY_LOAD_FROM_HAH = "uh";
/**
* The key of Image Size Settings
*
* @see #IMAGE_SIZE_AUTO
* @see #IMAGE_SIZE_780X
* @see #IMAGE_SIZE_980X
* @see #IMAGE_SIZE_1280X
* @see #IMAGE_SIZE_1600X
* @see #IMAGE_SIZE_2400X
*/
private static final String KEY_IMAGE_SIZE = "xr";
/**
* The key of scale images width
*/
private static final String KEY_SCALE_WIDTH = "rx";
/**
* The key of scale images height
*/
private static final String KEY_SCALE_HEIGHT = "ry";
/**
* The key of Gallery Name Display
*
* @see #GALLERY_TITLE_DEFAULT
* @see #GALLERY_TITLE_JAPANESE
*/
private static final String KEY_GALLERY_TITLE = "tl";
/**
* The key of the behavior for downloading archiver
*
* @see #ARCHIVER_DOWNLOAD_MAMS
* @see #ARCHIVER_DOWNLOAD_MAAS
* @see #ARCHIVER_DOWNLOAD_AAMS
* @see #ARCHIVER_DOWNLOAD_AAAS
*/
private static final String KEY_ARCHIVER_DOWNLOAD = "ar";
/**
* The key of display mode would you like to use on the front and search pages
*
* @see #LAYOUT_MODE_LIST
* @see #LAYOUT_MODE_THUMB
*/
private static final String KEY_LAYOUT_MODE = "dm";
/**
* The key for show popular
*
* @see #POPULAR_YES
* @see #POPULAR_NO
*/
private static final String KEY_POPULAR = "prn";
/**
* The key of categories would you like to view as default on the front page
*/
private static final String KEY_DEFAULT_CATEGORIES = "cats";
/**
* The key for favorites sort
*
* @see #FAVORITES_SORT_GALLERY_UPDATE_TIME
* @see #FAVORITES_SORT_FAVORITED_TIME
*/
private static final String KEY_FAVORITES_SORT = "fs";
/**
* The key of exclude certain namespaces from a default tag search
*/
private static final String KEY_EXCLUDED_NAMESPACES = "xns";
/**
* The key of hide galleries in certain languages from the gallery list and searches
*/
private static final String KEY_EXCLUDED_LANGUAGES = "xl";
/**
* The key of how many results would you like per page for the index/search page and torrent search pages
*
* @see #RESULT_COUNT_25
* @see #RESULT_COUNT_50
* @see #RESULT_COUNT_100
* @see #RESULT_COUNT_200
*/
private static final String KEY_RESULT_COUNT = "rc";
/**
* The key of mouse-over thumb
*
* @see #MOUSE_OVER_YES
* @see #MOUSE_OVER_NO
*/
private static final String KEY_MOUSE_OVER = "lt";
/**
* The key of preview size
*
* @see #PREVIEW_SIZE_NORMAL
* @see #PREVIEW_SIZE_LARGE
*/
private static final String KEY_PREVIEW_SIZE = "ts";
/**
* The key of preview row per page
*
* @see #PREVIEW_ROW_4
* @see #PREVIEW_ROW_10
* @see #PREVIEW_ROW_20
* @see #PREVIEW_ROW_40
*/
private static final String KEY_PREVIEW_ROW = "tr";
/**
* The key of sort order for gallery comments
*
* @see #COMMENTS_SORT_OLDEST_FIRST
* @see #COMMENTS_SORT_RECENT_FIRST
* @see #COMMENTS_SORT_HIGHEST_SCORE_FIRST
*/
private static final String KEY_COMMENTS_SORT = "cs";
/**
* The key of show gallery comment votes
*
* @see #COMMENTS_VOTES_POP
* @see #COMMENTS_VOTES_ALWAYS
*/
private static final String KEY_COMMENTS_VOTES = "sc";
/**
* The key of sort order for gallery tags
*
* @see #TAGS_SORT_ALPHABETICAL
* @see #TAGS_SORT_POWER
*/
private static final String KEY_TAGS_SORT = "to";
/**
* The key of show gallery page numbers
*
* @see #SHOW_GALLERY_INDEX_NO
* @see #SHOW_GALLERY_INDEX_YES
*/
private static final String KEY_SHOW_GALLERY_INDEX = "pn";
/**
* The key of the IP:Port of a proxy-enabled Hentai@Home Client
* to load all images
*/
private static final String KEY_HAH_CLIENT_IP_PORT = "hp";
/**
* The key of the passkey of a proxy-enabled Hentai@Home Client
* to load all images
*/
private static final String KEY_HAH_CLIENT_PASSKEY = "hk";
/**
* The key of enable Tag Flagging
*
* @see #ENABLE_TAG_FLAGGING_NO
* @see #ENABLE_TAG_FLAGGING_YES
*/
private static final String KEY_ENABLE_TAG_FLAGGING = "tf";
/**
* The key of always display the original images instead of the resampled versions
*
* @see #ALWAYS_ORIGINAL_NO
* @see #ALWAYS_ORIGINAL_YES
*/
private static final String KEY_ALWAYS_ORIGINAL = "oi";
/**
* The key of enable the multi-Page Viewer
*
* @see #MULTI_PAGE_NO
* @see #MULTI_PAGE_YES
*/
private static final String KEY_MULTI_PAGE = "qb";
/**
* The key of multi-Page Viewer Display Style
*
* @see #MULTI_PAGE_STYLE_C
* @see #MULTI_PAGE_STYLE_N
* @see #MULTI_PAGE_STYLE_Y
*/
private static final String KEY_MULTI_PAGE_STYLE = "ms";
/**
* The key of multi-Page Viewer Thumbnail Pane
*
* @see #MULTI_PAGE_THUMB_HIDE
* @see #MULTI_PAGE_THUMB_SHOW
*/
private static final String KEY_MULTI_PAGE_THUMB = "mt";
/**
* Default gallery title
*/
private static final String GALLERY_TITLE_DEFAULT = "r";
/**
* Japanese gallery title
*/
private static final String GALLERY_TITLE_JAPANESE = "j";
/**
* Show popular
*/
private static final String POPULAR_YES = "y";
/**
* Don't show popular
*/
private static final String POPULAR_NO = "n";
/**
* Sort favorites by last gallery update time
*/
private static final String FAVORITES_SORT_GALLERY_UPDATE_TIME = "p";
/**
* Sort favorites by favorited time
*/
private static final String FAVORITES_SORT_FAVORITED_TIME = "f";
/**
* Load images through the Hentai@Home Network<br/>
* key: {@link #KEY_LOAD_FROM_HAH}<br/>
* value: {@link #LOAD_FROM_HAH_YES}, {@link #LOAD_FROM_HAH_NO}
*/
public String loadFromHAH = LOAD_FROM_HAH_YES;
/**
* Image Size<br/>
* key: {@link #KEY_IMAGE_SIZE}<br/>
* value: {@link #IMAGE_SIZE_AUTO}, {@link #IMAGE_SIZE_780X}, {@link #IMAGE_SIZE_980X},
* {@link #IMAGE_SIZE_1280X}, {@link #IMAGE_SIZE_1600X}, {@link #IMAGE_SIZE_2400X}
*/
public String imageSize = IMAGE_SIZE_AUTO;
/**
* Scale width<br/>
* key: {@link #KEY_SCALE_WIDTH}<br/>
* value: 0 for no limit
*/
public int scaleWidth = 0;
/**
* Scale height<br/>
* key: {@link #KEY_SCALE_HEIGHT}<br/>
* value: 0 for no limit
*/
public int scaleHeight = 0;
/**
* Gallery title<br/>
* key: {@link #KEY_GALLERY_TITLE}<br/>
* value: {@link #GALLERY_TITLE_DEFAULT}, {@link #GALLERY_TITLE_JAPANESE}
*/
public String galleryTitle = GALLERY_TITLE_DEFAULT;
/**
* The default behavior for downloading an archiver<br/>
* key: {@link #KEY_ARCHIVER_DOWNLOAD}<br/>
* value: {@link #ARCHIVER_DOWNLOAD_MAMS}, {@link #ARCHIVER_DOWNLOAD_AAMS},
* {@link #ARCHIVER_DOWNLOAD_MAAS}, {@link #ARCHIVER_DOWNLOAD_AAAS}
*/
public String archiverDownload = ARCHIVER_DOWNLOAD_MAMS;
/**
* Display mode used on the front and search pages<br/>
* false for list, true for thumb<br/>
* key: {@link #KEY_LAYOUT_MODE}<br/>
* value: {@link #LAYOUT_MODE_LIST}, {@link #LAYOUT_MODE_THUMB}
*/
public String layoutMode = LAYOUT_MODE_LIST;
/**
* Show popular or not<br/>
* key: {@link #KEY_POPULAR}<br/>
* value: {@link #POPULAR_YES}, {@link #POPULAR_NO}
*/
public String popular = POPULAR_YES;
/**
* Default categories on the front page<br/>
* key: {@link #KEY_DEFAULT_CATEGORIES}<br/>
* value: the value of categories, for multiple use & operation,
* 0 for none
*/
public int defaultCategories = 0;
/**
* <br/>
* key: {@link #KEY_FAVORITES_SORT}<br/>
* value: {@link #FAVORITES_SORT_GALLERY_UPDATE_TIME}, {@link #FAVORITES_SORT_FAVORITED_TIME}
*/
public String favoritesSort = FAVORITES_SORT_FAVORITED_TIME;
/**
* Certain namespaces excluded from a default tag search<br/>
* key: {@link #KEY_EXCLUDED_NAMESPACES}<br/>
* value: the value of namespaces, for multiple use & operation,
* 0 for none
*/
public int excludedNamespaces = 0;
/**
* Certain languages excluded from list and searches<br/>
* key: {@link #KEY_EXCLUDED_LANGUAGES}<br/>
* value: {@link #JAPANESE_TRANSLATED}, {@link #JAPANESE_REWRITE} ...
* For multiple languages, use <code>x<code/> to combine them, like 1x1024x2048
*/
public String excludedLanguages = "";
/**
* How many results would you like per page for the index/search page
* and torrent search pages<br/>
* key: {@link #KEY_RESULT_COUNT}<br/>
* value: {@link #RESULT_COUNT_25}, {@link #RESULT_COUNT_50},
* {@link #RESULT_COUNT_100}, {@link #RESULT_COUNT_200}<br/>
* Require <code>Hath Perk:Paging Enlargement</code>
*/
public String resultCount = RESULT_COUNT_25;
/**
* mouse-over thumb<br/>
* key: {@link #KEY_MOUSE_OVER}<br/>
* value: {@link #MOUSE_OVER_YES}, {@link #MOUSE_OVER_NO}
*/
public String mouseOver = MOUSE_OVER_YES;
/**
* Default preview mode<br/>
* key: {@link #KEY_PREVIEW_SIZE}<br/>
* value: {@link #PREVIEW_SIZE_NORMAL}, {@link #PREVIEW_SIZE_LARGE}
*/
public String previewSize = PREVIEW_SIZE_LARGE;
/**
* Preview row<br/>
* key: {@link #KEY_PREVIEW_ROW}<br/>
* value: {@link #PREVIEW_ROW_4}, {@link #PREVIEW_ROW_10},
* {@link #PREVIEW_ROW_20}, {@link #PREVIEW_ROW_40}
*/
public String previewRow = PREVIEW_ROW_4;
/**
* Sort order for gallery comments<br/>
* key: {@link #KEY_COMMENTS_SORT}<br/>
* value: {@link #COMMENTS_SORT_OLDEST_FIRST}, {@link #COMMENTS_SORT_RECENT_FIRST},
* {@link #COMMENTS_SORT_HIGHEST_SCORE_FIRST}
*/
public String commentSort = COMMENTS_SORT_OLDEST_FIRST;
/**
* Show gallery comment votes mode<br/>
* key: {@link #KEY_COMMENTS_VOTES}<br/>
* value: {@link #COMMENTS_VOTES_POP}, {@link #COMMENTS_VOTES_ALWAYS}
*/
public String commentVotes = COMMENTS_VOTES_POP;
/**
* Sort order for gallery tags<br/>
* key: {@link #KEY_TAGS_SORT}<br/>
* value: {@link #TAGS_SORT_ALPHABETICAL}, {@link #TAGS_SORT_POWER}
*/
public String tagSort = TAGS_SORT_ALPHABETICAL;
/**
* Show gallery page numbers<br/>
* key: {@link #KEY_SHOW_GALLERY_INDEX}<br/>
* value: {@link #SHOW_GALLERY_INDEX_YES}, {@link #SHOW_GALLERY_INDEX_NO}
*/
public String showGalleryIndex = SHOW_GALLERY_INDEX_YES;
/**
* The IP of a proxy-enabled Hentai@Home Client
* to load all images<br/>
* key: {@link #KEY_HAH_CLIENT_IP_PORT}<br/>
*/
public String hahClientIp = "";
/**
* The PORT of a proxy-enabled Hentai@Home Client
* to load all images<br/>
* key: {@link #KEY_HAH_CLIENT_IP_PORT}<br/>
*/
public int hahClientPort = -1;
/**
* The passkey of a proxy-enabled Hentai@Home Client
* to load all images<br/>
* key: {@link #KEY_HAH_CLIENT_PASSKEY}<br/>
*/
public String hahClientPasskey = "";
/**
* Enable tag flagging
* key: {@link #KEY_ENABLE_TAG_FLAGGING}<br/>
* value: {@link #ENABLE_TAG_FLAGGING_YES}, {@link #ENABLE_TAG_FLAGGING_NO}<br/>
* <code>Bronze Star</code> or <code>Hath Perk: Tag Flagging</code> Required
*/
public String enableTagFlagging = ENABLE_TAG_FLAGGING_NO;
/**
* Always display the original images instead of the resampled versions<br/>
* key: {@link #KEY_ALWAYS_ORIGINAL}<br/>
* value: {@link #ALWAYS_ORIGINAL_YES}, {@link #ALWAYS_ORIGINAL_NO}<br/>
* <code>Silver Star</code> or <code>Hath Perk: Source Nexus</code> Required
*/
public String alwaysOriginal = ALWAYS_ORIGINAL_NO;
/**
* Enable the multi-Page Viewer<br/>
* key: {@link #KEY_MULTI_PAGE}<br/>
* value: {@link #MULTI_PAGE_YES}, {@link #MULTI_PAGE_NO}<br/>
* <code>Gold Star</code> or <code>Hath Perk: Multi-Page Viewer</code> Required
*/
public String multiPage = MULTI_PAGE_NO;
/**
* Multi-Page Viewer Display Style<br/>
* key: {@link #KEY_MULTI_PAGE_STYLE}<br/>
* value: {@link #MULTI_PAGE_STYLE_N}, {@link #MULTI_PAGE_STYLE_C},
* {@link #MULTI_PAGE_STYLE_Y}<br/>
* <code>Gold Star</code> or <code>Hath Perk: Multi-Page Viewer</code> Required
*/
public String multiPageStyle = MULTI_PAGE_STYLE_N;
/**
* Multi-Page Viewer Thumbnail Pane<br/>
* key: {@link #KEY_MULTI_PAGE_THUMB}<br/>
* value: {@link #MULTI_PAGE_THUMB_SHOW}, {@link #MULTI_PAGE_THUMB_HIDE}<br/>
* <code>Gold Star</code> or <code>Hath Perk: Multi-Page Viewer</code> Required
*/
public String multiPageThumb = MULTI_PAGE_THUMB_SHOW;
/**
* Lofi resolution
* key: {@link #KEY_LOFI_RESOLUTION}<br/>
* value: {@link #LOFI_RESOLUTION_460X}, {@link #LOFI_RESOLUTION_780X},
* {@link #LOFI_RESOLUTION_980X}
*/
public String lofiResolution = LOFI_RESOLUTION_980X;
/**
* Show content warning
* key: {@link #KEY_CONTENT_WARNING}<br/>
* value: {@link #CONTENT_WARNING_SHOW}, {@link #CONTENT_WARNING_NOT_SHOW}
*/
public String contentWarning = CONTENT_WARNING_NOT_SHOW;
private String mUconfig;
private boolean mDirty = true;
@Override
public EhConfig clone() {
try {
return (EhConfig) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException(e);
}
}
public synchronized void setDirty() {
mDirty = true;
}
private void updateUconfig() {
String hahClientIpPort = (InetValidator.isValidInet4Address(hahClientIp) &&
InetValidator.isValidInetPort(hahClientPort)) ?
hahClientIp + "%3A" + hahClientPort : "";
String hahClientPasskey = null == this.hahClientPasskey ? "" : this.hahClientPasskey;
mUconfig = KEY_LOAD_FROM_HAH + "_" + loadFromHAH + "-" +
KEY_IMAGE_SIZE + "_" + imageSize + "-" +
KEY_SCALE_WIDTH + "_" + scaleWidth + "-" +
KEY_SCALE_HEIGHT + "_" + scaleHeight + "-" +
KEY_GALLERY_TITLE + "_" + galleryTitle + "-" +
KEY_ARCHIVER_DOWNLOAD + "_" + archiverDownload + "-" +
KEY_LAYOUT_MODE + "_" + layoutMode + "-" +
KEY_POPULAR + "_" + popular + "-" +
KEY_DEFAULT_CATEGORIES + "_" + defaultCategories + "-" +
KEY_FAVORITES_SORT + "_" + favoritesSort + "-" +
KEY_EXCLUDED_NAMESPACES + "_" + excludedNamespaces + "-" +
KEY_EXCLUDED_LANGUAGES + "_" + excludedLanguages + "-" +
KEY_RESULT_COUNT + "_" + resultCount + "-" +
KEY_MOUSE_OVER + "_" + mouseOver + "-" +
KEY_PREVIEW_SIZE + "_" + previewSize + "-" +
KEY_PREVIEW_ROW + "_" + previewRow + "-" +
KEY_COMMENTS_SORT + "_" + commentSort + "-" +
KEY_COMMENTS_VOTES + "_" + commentVotes + "-" +
KEY_TAGS_SORT + "_" + tagSort + "-" +
KEY_SHOW_GALLERY_INDEX + "_" + showGalleryIndex + "-" +
KEY_HAH_CLIENT_IP_PORT + "_" + hahClientIpPort + "-" +
KEY_HAH_CLIENT_PASSKEY + "_" + hahClientPasskey + "-" +
KEY_ENABLE_TAG_FLAGGING + "_" + enableTagFlagging + "-" +
KEY_ALWAYS_ORIGINAL + "_" + alwaysOriginal + "-" +
KEY_MULTI_PAGE + "_" + multiPage + "-" +
KEY_MULTI_PAGE_STYLE + "_" + multiPageStyle + "-" +
KEY_MULTI_PAGE_THUMB + "_" + multiPageThumb;
}
public synchronized String uconfig() {
if (mDirty) {
mDirty = false;
updateUconfig();
}
return mUconfig;
}
}
@@ -1,250 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client
import com.hippo.ehviewer.EhApplication
import com.hippo.network.CookieDatabase
import com.hippo.network.CookieSet
import okhttp3.Cookie
import okhttp3.CookieJar
import okhttp3.HttpUrl
import okhttp3.HttpUrl.Companion.toHttpUrl
import java.util.Collections
import java.util.regex.Pattern
object EhCookieStore : CookieJar {
private val db: CookieDatabase = CookieDatabase(EhApplication.application, "okhttp3-cookie.db")
private val map: MutableMap<String, CookieSet> = db.allCookies
fun signOut() {
clear()
}
fun hasSignedIn(): Boolean {
val url = EhUrl.HOST_E.toHttpUrl()
return contains(url, KEY_IPB_MEMBER_ID) &&
contains(url, KEY_IPB_PASS_HASH)
}
const val KEY_IPB_MEMBER_ID = "ipb_member_id"
const val KEY_IPB_PASS_HASH = "ipb_pass_hash"
const val KEY_IGNEOUS = "igneous"
private val sTipsCookie: Cookie = Cookie.Builder()
.name(EhConfig.KEY_CONTENT_WARNING)
.value(EhConfig.CONTENT_WARNING_NOT_SHOW)
.domain(EhUrl.DOMAIN_E)
.path("/")
.expiresAt(Long.MAX_VALUE)
.build()
fun newCookie(
cookie: Cookie, newDomain: String, forcePersistent: Boolean,
forceLongLive: Boolean, forceNotHostOnly: Boolean
): Cookie {
val builder = Cookie.Builder()
builder.name(cookie.name)
builder.value(cookie.value)
if (forceLongLive) {
builder.expiresAt(Long.MAX_VALUE)
} else if (cookie.persistent) {
builder.expiresAt(cookie.expiresAt)
} else if (forcePersistent) {
builder.expiresAt(Long.MAX_VALUE)
}
if (cookie.hostOnly && !forceNotHostOnly) {
builder.hostOnlyDomain(newDomain)
} else {
builder.domain(newDomain)
}
builder.path(cookie.path)
if (cookie.secure) {
builder.secure()
}
if (cookie.httpOnly) {
builder.httpOnly()
}
return builder.build()
}
@Synchronized
fun addCookie(cookie: Cookie) {
// For cookie database
var toAdd: Cookie? = null
var toUpdate: Cookie? = null
var toRemove: Cookie? = null
var set = map[cookie.domain]
if (set == null) {
set = CookieSet()
map[cookie.domain] = set
}
if (cookie.expiresAt <= System.currentTimeMillis()) {
toRemove = set.remove(cookie)
// If the cookie is not persistent, it's not in database
if (toRemove != null && !toRemove.persistent) {
toRemove = null
}
} else {
toAdd = cookie
toUpdate = set.add(cookie)
// If the cookie is not persistent, it's not in database
if (!toAdd.persistent) toAdd = null
if (toUpdate != null && !toUpdate.persistent) toUpdate = null
// Remove the cookie if it updates to null
if (toAdd == null && toUpdate != null) {
toRemove = toUpdate
toUpdate = null
}
}
if (toRemove != null) {
db.remove(toRemove)
}
if (toAdd != null) {
if (toUpdate != null) {
db.update(toUpdate, toAdd)
} else {
db.add(toAdd)
}
}
}
fun getCookieHeader(url: HttpUrl): String {
val cookies = getCookies(url)
val cookieHeader = StringBuilder()
var i = 0
val size = cookies.size
while (i < size) {
if (i > 0) {
cookieHeader.append("; ")
}
val cookie = cookies[i]
cookieHeader.append(cookie.name).append('=').append(cookie.value)
i++
}
return cookieHeader.toString()
}
@Synchronized
fun getCookies(url: HttpUrl): List<Cookie> {
val accepted: MutableList<Cookie> = ArrayList()
val expired: MutableList<Cookie> = ArrayList()
for ((domain, cookieSet) in map) {
if (domainMatch(url, domain)) {
cookieSet[url, accepted, expired]
}
}
for (cookie in expired) {
if (cookie.persistent) {
db.remove(cookie)
}
}
// RFC 6265 Section-5.4 step 2, sort the cookie-list
// Cookies with longer paths are listed before cookies with shorter paths.
// Ignore creation-time, we don't store them.
accepted.sortWith { o1: Cookie, o2: Cookie -> o2.path.length - o1.path.length }
return accepted
}
fun contains(url: HttpUrl, name: String?): Boolean {
for (cookie in getCookies(url)) {
if (cookie.name == name) {
return true
}
}
return false
}
/**
* Remove all cookies in this `CookieRepository`.
*/
@Synchronized
fun clear() {
map.clear()
db.clear()
}
@Synchronized
fun close() {
db.close()
}
override fun saveFromResponse(url: HttpUrl, cookies: List<Cookie>) {
for (cookie in cookies) {
// See https://github.com/Ehviewer-Overhauled/Ehviewer/issues/873
if (cookie.name != "__utmp") {
addCookie(cookie)
}
}
}
/**
* Quick and dirty pattern to differentiate IP addresses from hostnames. This is an approximation
* of Android's private InetAddress#isNumeric API.
*
*
* This matches IPv6 addresses as a hex string containing at least one colon, and possibly
* including dots after the first colon. It matches IPv4 addresses as strings containing only
* decimal digits and dots. This pattern matches strings like "a:.23" and "54" that are neither IP
* addresses nor hostnames; they will be verified as IP addresses (which is a more strict
* verification).
*/
private val VERIFY_AS_IP_ADDRESS =
Pattern.compile("([0-9a-fA-F]*:[0-9a-fA-F:.]*)|([\\d.]+)")
/**
* Returns true if `host` is not a host name and might be an IP address.
*/
private fun verifyAsIpAddress(host: String): Boolean {
return VERIFY_AS_IP_ADDRESS.matcher(host).matches()
}
// okhttp3.Cookie.domainMatch(HttpUrl, String)
@JvmStatic
fun domainMatch(url: HttpUrl, domain: String?): Boolean {
val urlHost = url.host
return if (urlHost == domain) {
true // As in 'example.com' matching 'example.com'.
} else urlHost.endsWith(domain!!)
&& urlHost[urlHost.length - domain.length - 1] == '.' && !verifyAsIpAddress(
urlHost
)
// As in 'example.com' matching 'www.example.com'.
}
override fun loadForRequest(url: HttpUrl): List<Cookie> {
val cookies = getCookies(url)
val checkTips = domainMatch(url, EhUrl.DOMAIN_E)
return if (checkTips) {
val result: MutableList<Cookie> = ArrayList(cookies.size + 1)
// Add all but skip some
for (cookie in cookies) {
val name = cookie.name
if (EhConfig.KEY_CONTENT_WARNING == name) {
continue
}
if (EhConfig.KEY_UCONFIG == name) {
continue
}
result.add(cookie)
}
// Add some
result.add(sTipsCookie)
Collections.unmodifiableList(result)
} else {
cookies
}
}
}
@@ -1,130 +0,0 @@
/*
* Copyright 2018 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client
import com.hippo.ehviewer.EhApplication
import com.hippo.ehviewer.Hosts
import com.hippo.ehviewer.Settings
import okhttp3.Dns
import java.net.InetAddress
import java.net.UnknownHostException
object EhDns : Dns {
private val hosts = EhApplication.hosts
private val builtInHosts: MutableMap<String, List<InetAddress>> = mutableMapOf()
init {
/* Pair(ip: String!, blockedByCCP: Boolean!) */
val ehgtHosts = arrayOf(
Pair("37.48.89.44", false),
Pair("81.171.10.48", false),
Pair("178.162.139.24", false),
Pair("178.162.140.212", false),
Pair("2001:1af8:4700:a062:8::47de", false),
Pair("2001:1af8:4700:a062:9::47de", true),
Pair("2001:1af8:4700:a0c9:4::47de", false),
Pair("2001:1af8:4700:a0c9:3::47de", true),
)
put(
builtInHosts,
"e-hentai.org",
Pair("104.20.134.21", false),
Pair("104.20.135.21", false),
Pair("172.67.0.127", false),
)
put(
builtInHosts,
"exhentai.org",
Pair("178.175.128.252", false),
Pair("178.175.129.252", false),
Pair("178.175.129.254", false),
Pair("178.175.128.254", false),
Pair("178.175.132.20", false),
Pair("178.175.132.22", false),
)
put(
builtInHosts,
"repo.e-hentai.org",
Pair("94.100.28.57", true),
Pair("94.100.29.73", true),
)
put(
builtInHosts,
"forums.e-hentai.org",
Pair("94.100.18.243", false),
)
put(
builtInHosts,
"ehgt.org",
*ehgtHosts
)
put(
builtInHosts,
"gt0.ehgt.org",
*ehgtHosts
)
put(
builtInHosts,
"gt1.ehgt.org",
*ehgtHosts
)
put(
builtInHosts,
"gt2.ehgt.org",
*ehgtHosts
)
put(
builtInHosts,
"gt3.ehgt.org",
*ehgtHosts
)
put(
builtInHosts,
"ul.ehgt.org",
Pair("94.100.24.82", true),
Pair("94.100.24.72", true),
)
put(
builtInHosts,
"raw.githubusercontent.com",
Pair("151.101.0.133", false),
Pair("151.101.64.133", false),
Pair("151.101.128.133", false),
Pair("151.101.192.133", false),
)
}
private fun put(
map: MutableMap<String, List<InetAddress>>,
host: String,
vararg ips: Pair<String, Boolean>
) {
map[host] = ips.mapNotNull { pair ->
Hosts.toInetAddress(host, pair.first).takeUnless { Settings.getDF() && pair.second }
}
}
@Throws(UnknownHostException::class)
override fun lookup(hostname: String): List<InetAddress> {
return hosts[hostname] ?: builtInHosts[hostname].takeIf { Settings.getBuiltInHosts() }
?: Dns.SYSTEM.lookup(hostname)
}
fun isInHosts(hostname: String): Boolean {
return hosts.contains(hostname) || (builtInHosts.contains(hostname) && Settings.getBuiltInHosts())
}
}
File diff suppressed because it is too large. Load diff
@@ -1,315 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client
import android.util.Log
import com.hippo.ehviewer.EhDB
import com.hippo.ehviewer.client.data.GalleryInfo
import com.hippo.ehviewer.dao.Filter
import java.util.Locale
import java.util.regex.Pattern
object EhFilter {
private val mTitleFilterList: MutableList<Filter> = ArrayList()
private val mUploaderFilterList: MutableList<Filter> = ArrayList()
private val mTagFilterList: MutableList<Filter> = ArrayList()
private val mTagNamespaceFilterList: MutableList<Filter> = ArrayList()
private val mCommenterFilterList: MutableList<Filter> = ArrayList()
private val mCommentFilterList: MutableList<Filter> = ArrayList()
const val MODE_TITLE = 0
const val MODE_UPLOADER = 1
const val MODE_TAG = 2
const val MODE_TAG_NAMESPACE = 3
const val MODE_COMMENTER = 4
const val MODE_COMMENT = 5
private val TAG = EhFilter::class.java.simpleName
init {
val list = EhDB.allFilter
var i = 0
val n = list.size
while (i < n) {
val filter = list[i]
when (filter.mode) {
MODE_TITLE -> {
filter.text = filter.text!!.lowercase(Locale.getDefault())
mTitleFilterList.add(filter)
}
MODE_TAG -> {
filter.text = filter.text!!.lowercase(Locale.getDefault())
mTagFilterList.add(filter)
}
MODE_TAG_NAMESPACE -> {
filter.text = filter.text!!.lowercase(Locale.getDefault())
mTagNamespaceFilterList.add(filter)
}
MODE_UPLOADER -> mUploaderFilterList.add(filter)
MODE_COMMENTER -> mCommenterFilterList.add(filter)
MODE_COMMENT -> mCommentFilterList.add(filter)
else -> Log.d(TAG, "Unknown mode: " + filter.mode)
}
i++
}
}
val titleFilterList: List<Filter>
get() = mTitleFilterList
val uploaderFilterList: List<Filter>
get() = mUploaderFilterList
val tagFilterList: List<Filter>
get() = mTagFilterList
val tagNamespaceFilterList: List<Filter>
get() = mTagNamespaceFilterList
val commenterFilterList: List<Filter>
get() = mCommenterFilterList
val commentFilterList: List<Filter>
get() = mCommentFilterList
@Synchronized
fun addFilter(filter: Filter): Boolean {
// enable filter by default before it is added to database
filter.enable = true
if (!EhDB.addFilter(filter)) return false
when (filter.mode) {
MODE_TITLE -> {
filter.text = filter.text!!.lowercase(Locale.getDefault())
mTitleFilterList.add(filter)
}
MODE_TAG -> {
filter.text = filter.text!!.lowercase(Locale.getDefault())
mTagFilterList.add(filter)
}
MODE_TAG_NAMESPACE -> {
filter.text = filter.text!!.lowercase(Locale.getDefault())
mTagNamespaceFilterList.add(filter)
}
MODE_UPLOADER -> mUploaderFilterList.add(filter)
MODE_COMMENTER -> mCommenterFilterList.add(filter)
MODE_COMMENT -> mCommentFilterList.add(filter)
else -> Log.d(TAG, "Unknown mode: " + filter.mode)
}
return true
}
@Synchronized
fun triggerFilter(filter: Filter) {
EhDB.triggerFilter(filter)
}
@Synchronized
fun deleteFilter(filter: Filter) {
EhDB.deleteFilter(filter)
when (filter.mode) {
MODE_TITLE -> mTitleFilterList.remove(filter)
MODE_TAG -> mTagFilterList.remove(filter)
MODE_TAG_NAMESPACE -> mTagNamespaceFilterList.remove(filter)
MODE_UPLOADER -> mUploaderFilterList.remove(filter)
MODE_COMMENTER -> mCommenterFilterList.remove(filter)
MODE_COMMENT -> mCommentFilterList.remove(filter)
else -> Log.d(TAG, "Unknown mode: " + filter.mode)
}
}
@Synchronized
fun needTags(): Boolean {
return 0 != mTagFilterList.size || 0 != mTagNamespaceFilterList.size
}
@Synchronized
fun filterTitle(info: GalleryInfo?): Boolean {
if (null == info) {
return false
}
// Title
val title = info.title
val filters: List<Filter> = mTitleFilterList
if (null != title && filters.isNotEmpty()) {
var i = 0
val n = filters.size
while (i < n) {
if (filters[i].enable!! && title.lowercase(Locale.getDefault()).contains(
filters[i].text!!
)
) {
return false
}
i++
}
}
return true
}
@Synchronized
fun filterUploader(info: GalleryInfo?): Boolean {
if (null == info) {
return false
}
// Uploader
val uploader = info.uploader
val filters: List<Filter> = mUploaderFilterList
if (null != uploader && filters.isNotEmpty()) {
var i = 0
val n = filters.size
while (i < n) {
if (filters[i].enable!! && uploader == filters[i].text) {
return false
}
i++
}
}
return true
}
private fun matchTag(tag: String?, filter: String?): Boolean {
if (null == tag || null == filter) {
return false
}
val tagNamespace: String?
val tagName: String
val filterNamespace: String?
val filterName: String
var index = tag.indexOf(':')
if (index < 0) {
tagNamespace = null
tagName = tag
} else {
tagNamespace = tag.substring(0, index)
tagName = tag.substring(index + 1)
}
index = filter.indexOf(':')
if (index < 0) {
filterNamespace = null
filterName = filter
} else {
filterNamespace = filter.substring(0, index)
filterName = filter.substring(index + 1)
}
return if (null != tagNamespace && null != filterNamespace &&
tagNamespace != filterNamespace
) {
false
} else tagName == filterName
}
@Synchronized
fun filterTag(info: GalleryInfo?): Boolean {
if (null == info) {
return false
}
// Tag
val tags = info.simpleTags
val filters: List<Filter> = mTagFilterList
if (null != tags && filters.isNotEmpty()) {
for (tag in tags) {
var i = 0
val n = filters.size
while (i < n) {
if (filters[i].enable!! && matchTag(tag, filters[i].text)) {
return false
}
i++
}
}
}
return true
}
private fun matchTagNamespace(tag: String?, filter: String?): Boolean {
if (null == tag || null == filter) {
return false
}
val tagNamespace: String
val index = tag.indexOf(':')
return if (index >= 0) {
tagNamespace = tag.substring(0, index)
tagNamespace == filter
} else {
false
}
}
@Synchronized
fun filterTagNamespace(info: GalleryInfo?): Boolean {
if (null == info) {
return false
}
val tags = info.simpleTags
val filters: List<Filter> = mTagNamespaceFilterList
if (null != tags && filters.isNotEmpty()) {
for (tag in tags) {
var i = 0
val n = filters.size
while (i < n) {
if (filters[i].enable!! && matchTagNamespace(tag, filters[i].text)) {
return false
}
i++
}
}
}
return true
}
@Synchronized
fun filterCommenter(commenter: String?): Boolean {
if (null == commenter) {
return false
}
val filters: List<Filter> = mCommenterFilterList
if (filters.isNotEmpty()) {
var i = 0
val n = filters.size
while (i < n) {
if (filters[i].enable!! && commenter == filters[i].text) {
return false
}
i++
}
}
return true
}
@Synchronized
fun filterComment(comment: String?): Boolean {
if (null == comment) {
return false
}
val filters: List<Filter> = mCommentFilterList
if (filters.isNotEmpty()) {
var i = 0
val n = filters.size
while (i < n) {
if (filters[i].enable!!) {
val p = Pattern.compile(filters[i].text!!)
val m = p.matcher(comment)
if (m.find()) return false
}
i++
}
}
return true
}
}
@@ -1,80 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client
import android.app.Activity
import androidx.annotation.MainThread
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.lifecycle.lifecycleScope
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.Job
class EhRequest {
internal var job: Job? = null
val isActive
get() = job?.isActive ?: false
var method = 0
private set
var args: Array<out Any?>? = null
private set
var callback: EhClient.Callback<Any?>? = null
private set
fun setMethod(method: Int): EhRequest {
this.method = method
return this
}
fun setArgs(vararg args: Any?): EhRequest {
this.args = args
return this
}
@Suppress("UNCHECKED_CAST")
fun setCallback(callback: EhClient.Callback<*>?): EhRequest {
this.callback = callback as EhClient.Callback<Any?>?
return this
}
fun enqueue(scope: CoroutineScope) {
EhClient.enqueue(this, scope)
}
@DelicateCoroutinesApi
fun enqueue() {
EhClient.enqueue(this, GlobalScope)
}
fun enqueue(fragment: Fragment) {
enqueue(fragment.viewLifecycleOwner.lifecycleScope)
}
fun enqueue(activity: Activity) {
check(activity is FragmentActivity)
enqueue(activity.lifecycleScope)
}
@MainThread
fun cancel() {
if (isActive) {
job?.cancel()
callback?.onCancel()
}
}
}
@@ -1,29 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client
import com.hippo.okhttp.ChromeRequestBuilder
class EhRequestBuilder @JvmOverloads constructor(
url: String,
referer: String?,
origin: String? = null
) : ChromeRequestBuilder(url) {
init {
referer?.let { addHeader("Referer", it) }
origin?.let { addHeader("Origin", it) }
}
}
@@ -1,72 +0,0 @@
/*
* Copyright 2022 Tarsin Norbin
*
* This file is part of EhViewer
*
* EhViewer is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* EhViewer is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with EhViewer.
* If not, see <https://www.gnu.org/licenses/>.
*/
package com.hippo.ehviewer.client
import android.util.Log
import java.net.InetAddress
import java.net.Socket
import javax.net.ssl.SSLSocket
import javax.net.ssl.SSLSocketFactory
object EhSSLSocketFactory : SSLSocketFactory() {
private val sslSocketFactory = getDefault() as SSLSocketFactory
override fun getDefaultCipherSuites(): Array<String> {
return sslSocketFactory.defaultCipherSuites
}
override fun getSupportedCipherSuites(): Array<String> {
return sslSocketFactory.supportedCipherSuites
}
override fun createSocket(s: Socket, host: String, port: Int, autoClose: Boolean): Socket {
val address = s.inetAddress.hostAddress.takeIf { EhDns.isInHosts(host) }
val socket = sslSocketFactory.createSocket(s, address ?: host, port, autoClose) as SSLSocket
val sslSession = socket.session
Log.d(
"EhSSLSocketFactory",
"Host: " + host + " Address: " + address + " Protocol:" + sslSession.protocol + " CipherSuite:" + sslSession.cipherSuite
)
return socket
}
override fun createSocket(host: String, port: Int): Socket {
return sslSocketFactory.createSocket(host, port)
}
override fun createSocket(
host: String,
port: Int,
localHost: InetAddress,
localPort: Int
): Socket {
return sslSocketFactory.createSocket(host, port, localHost, localPort)
}
override fun createSocket(host: InetAddress, port: Int): Socket {
return sslSocketFactory.createSocket(host, port)
}
override fun createSocket(
address: InetAddress,
port: Int,
localAddress: InetAddress,
localPort: Int
): Socket {
return sslSocketFactory.createSocket(address, port, localAddress, localPort)
}
}
@@ -1,293 +0,0 @@
/*
* Copyright 2019 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client
import android.content.Context
import com.hippo.ehviewer.AppConfig
import com.hippo.ehviewer.EhApplication
import com.hippo.ehviewer.EhApplication.Companion.okHttpClient
import com.hippo.ehviewer.R
import com.hippo.util.HashCodeUtils
import com.hippo.yorozuya.FileUtils
import com.hippo.yorozuya.copyToFile
import eu.kanade.tachiyomi.util.lang.launchIO
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
import okhttp3.OkHttpClient
import okhttp3.Request
import okio.BufferedSource
import okio.buffer
import okio.source
import org.json.JSONException
import org.json.JSONObject
import java.io.File
import java.io.FileInputStream
import java.io.IOException
import java.nio.charset.StandardCharsets
import java.security.MessageDigest
import java.security.NoSuchAlgorithmException
private typealias TagGroup = Map<String, String>
private typealias TagGroups = Map<String, TagGroup>
object EhTagDatabase {
private const val NAMESPACE_PREFIX = "n"
private lateinit var tagGroups: TagGroups
fun isInitialized(): Boolean {
return this::tagGroups.isInitialized
}
private fun JSONObject.toTagGroups(): TagGroups =
keys().asSequence().associateWith { getJSONObject(it).toTagGroup() }
private fun JSONObject.toTagGroup(): TagGroup =
keys().asSequence().associateWith { getString(it) }
private fun updateData(source: BufferedSource) {
try {
tagGroups = JSONObject(source.readString(StandardCharsets.UTF_8)).toTagGroups()
} catch (e: JSONException) {
e.printStackTrace()
}
}
fun getTranslation(prefix: String? = NAMESPACE_PREFIX, tag: String?): String? {
return tagGroups[prefix]?.get(tag)?.trim()?.takeIf { it.isNotEmpty() }
}
private fun internalSuggestFlow(
tags: Map<String, String>,
keyword: String,
translate: Boolean,
exactly: Boolean
): Flow<Pair<String?, String>> = flow {
if (exactly) {
tags[keyword]?.let {
emit(Pair(it.takeIf { translate }, keyword))
}
} else {
if (translate) {
tags.forEach { (tag, hint) ->
if (tag != keyword &&
(tag.containsIgnoreSpace(keyword) || hint.containsIgnoreSpace(keyword))
) {
emit(Pair(hint, tag))
}
}
} else {
tags.keys.forEach { tag ->
if (tag != keyword && tag.containsIgnoreSpace(keyword)) {
emit(Pair(null, tag))
}
}
}
}
}
/* Construct a cold flow for tag database suggestions */
fun suggestFlow(
keyword: String,
translate: Boolean,
exactly: Boolean = false
): Flow<Pair<String?, String>> = flow {
val keywordPrefix = keyword.substringBefore(':')
val keywordTag = keyword.drop(keywordPrefix.length + 1)
val prefix = namespaceToPrefix(keywordPrefix) ?: keywordPrefix
val tags = tagGroups[prefix.takeIf { keywordTag.isNotEmpty() && it != NAMESPACE_PREFIX }]
tags?.let {
internalSuggestFlow(it, keywordTag, translate, exactly).collect { (hint, tag) ->
emit(Pair(hint, "$prefix:$tag"))
}
} ?: tagGroups.forEach { (prefix, tags) ->
if (prefix != NAMESPACE_PREFIX) {
internalSuggestFlow(tags, keyword, translate, exactly).collect { (hint, tag) ->
emit(Pair(hint, "$prefix:$tag"))
}
} else {
internalSuggestFlow(tags, keyword, translate, exactly).collect { (hint, tag) ->
emit(Pair(hint, "$tag:"))
}
}
}
}
private fun String.removeSpace(): String = replace(" ", "")
private fun String.containsIgnoreSpace(other: String, ignoreCase: Boolean = true): Boolean =
removeSpace().contains(other.removeSpace(), ignoreCase)
private val NAMESPACE_TO_PREFIX = HashMap<String, String>().also {
it["artist"] = "a"
it["cosplayer"] = "cos"
it["character"] = "c"
it["female"] = "f"
it["group"] = "g"
it["language"] = "l"
it["male"] = "m"
it["mixed"] = "x"
it["other"] = "o"
it["parody"] = "p"
it["reclass"] = "r"
}
@JvmStatic
fun namespaceToPrefix(namespace: String): String? {
return NAMESPACE_TO_PREFIX[namespace]
}
private fun getMetadata(context: Context): Array<String>? {
return context.resources.getStringArray(R.array.tag_translation_metadata)
.takeIf { it.size == 4 }
}
fun isTranslatable(context: Context): Boolean {
return context.resources.getBoolean(R.bool.tag_translatable)
}
private fun getFileContent(file: File): String? {
try {
file.source().buffer().use { return it.readString(StandardCharsets.UTF_8) }
} catch (e: IOException) {
return null
}
}
private fun getFileSha1(file: File): String? {
try {
FileInputStream(file).use { stream ->
val digest = MessageDigest.getInstance("SHA-1")
var n: Int
val buffer = ByteArray(4 * 1024)
while (stream.read(buffer).also { n = it } != -1) {
digest.update(buffer, 0, n)
}
return HashCodeUtils.bytesToHexString(digest.digest())
}
} catch (e: IOException) {
return null
} catch (e: NoSuchAlgorithmException) {
return null
}
}
private fun checkData(sha1File: File, dataFile: File): Boolean {
val s1 = getFileContent(sha1File) ?: return false
val s2 = getFileSha1(dataFile) ?: return false
return s1 == s2
}
private fun save(client: OkHttpClient, url: String, file: File): Boolean {
val request: Request = Request.Builder().url(url).build()
val call = client.newCall(request)
runCatching {
call.execute().use { response ->
if (!response.isSuccessful) {
return false
}
response.body.use {
it.copyToFile(file)
}
return true
}
}.onFailure {
file.delete()
it.printStackTrace()
}
return false
}
@OptIn(DelicateCoroutinesApi::class)
@JvmStatic
fun update() {
launchIO {
updateInternal()
}
}
@Synchronized
private fun updateInternal() {
val urls = getMetadata(EhApplication.application)
urls?.let {
val sha1Name = urls[0]
val sha1Url = urls[1]
val dataName = urls[2]
val dataUrl = urls[3]
try {
val dir = AppConfig.getFilesDir("tag-translations")
checkNotNull(dir)
// Check current sha1 and current data
val sha1File = File(dir, sha1Name)
val dataFile = File(dir, dataName)
if (!checkData(sha1File, dataFile)) {
FileUtils.delete(sha1File)
FileUtils.delete(dataFile)
}
// Read current EhTagDatabase
if (!isInitialized() && dataFile.exists()) {
try {
dataFile.source().buffer().use { updateData(it) }
} catch (e: IOException) {
FileUtils.delete(sha1File)
FileUtils.delete(dataFile)
}
}
val client = okHttpClient
// Save new sha1
val tempSha1File = File(dir, "$sha1Name.tmp")
check(save(client, sha1Url, tempSha1File))
// Check new sha1 and current data
if (checkData(tempSha1File, dataFile)) {
// The data is the same
FileUtils.delete(tempSha1File)
return
}
// Save new data
val tempDataFile = File(dir, "$dataName.tmp")
check(save(client, dataUrl, tempDataFile))
// Check new sha1 and new data
if (!checkData(tempSha1File, tempDataFile)) {
FileUtils.delete(tempSha1File)
FileUtils.delete(tempDataFile)
return
}
// Replace current sha1 and current data with new sha1 and new data
FileUtils.delete(sha1File)
FileUtils.delete(dataFile)
tempSha1File.renameTo(sha1File)
tempDataFile.renameTo(dataFile)
// Read new EhTagDatabase
try {
dataFile.source().buffer().use { updateData(it) }
} catch (_: IOException) {
}
} catch (e: Throwable) {
e.printStackTrace()
}
}
}
}
@@ -1,176 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client
import com.hippo.ehviewer.Settings
import com.hippo.network.UrlBuilder
object EhUrl {
const val SITE_E = 0
const val SITE_EX = 1
const val DOMAIN_EX = "exhentai.org"
const val DOMAIN_E = "e-hentai.org"
const val DOMAIN_LOFI = "lofi.e-hentai.org"
const val HOST_EX = "https://$DOMAIN_EX/"
const val API_EX = HOST_EX + "api.php"
const val URL_FAVORITES_EX = HOST_EX + "favorites.php"
const val URL_UCONFIG_EX = HOST_EX + "uconfig.php"
const val URL_MY_TAGS_EX = HOST_EX + "mytags"
const val URL_WATCHED_EX = HOST_EX + "watched"
const val HOST_E = "https://$DOMAIN_E/"
const val API_E = HOST_E + "api.php"
const val URL_FAVORITES_E = HOST_E + "favorites.php"
const val URL_UCONFIG_E = HOST_E + "uconfig.php"
const val URL_MY_TAGS_E = HOST_E + "mytags"
const val URL_WATCHED_E = HOST_E + "watched"
const val API_SIGN_IN = "https://forums.e-hentai.org/index.php?act=Login&CODE=01"
const val URL_POPULAR_E = "https://e-hentai.org/popular"
const val URL_POPULAR_EX = "https://exhentai.org/popular"
const val URL_IMAGE_SEARCH_E = "https://upload.e-hentai.org/image_lookup.php"
const val URL_IMAGE_SEARCH_EX = "https://exhentai.org/upload/image_lookup.php"
const val URL_SIGN_IN = "https://forums.e-hentai.org/index.php?act=Login"
const val URL_REGISTER = "https://forums.e-hentai.org/index.php?act=Reg&CODE=00"
const val URL_FORUMS = "https://forums.e-hentai.org/"
const val URL_FUNDS = HOST_E + "exchange.php?t=gp"
const val URL_HOME = HOST_E + "home.php"
const val URL_NEWS = HOST_E + "news.php"
const val REFERER_EX = "https://$DOMAIN_EX"
const val ORIGIN_EX = REFERER_EX
const val REFERER_E = "https://$DOMAIN_E"
const val ORIGIN_E = REFERER_E
const val URL_PREFIX_THUMB_E = "https://ehgt.org/"
const val URL_PREFIX_THUMB_EX = "https://exhentai.org/t/"
val host: String
get() = when (Settings.getGallerySite()) {
SITE_E -> HOST_E
SITE_EX -> HOST_EX
else -> HOST_E
}
val favoritesUrl: String
get() = when (Settings.getGallerySite()) {
SITE_E -> URL_FAVORITES_E
SITE_EX -> URL_FAVORITES_EX
else -> URL_FAVORITES_E
}
val apiUrl: String
get() = when (Settings.getGallerySite()) {
SITE_E -> API_E
SITE_EX -> API_EX
else -> API_E
}
@JvmStatic
val referer: String
get() = when (Settings.getGallerySite()) {
SITE_E -> REFERER_E
SITE_EX -> REFERER_EX
else -> REFERER_E
}
val origin: String
get() = when (Settings.getGallerySite()) {
SITE_E -> ORIGIN_E
SITE_EX -> ORIGIN_EX
else -> ORIGIN_E
}
@JvmStatic
val uConfigUrl: String
get() = when (Settings.getGallerySite()) {
SITE_E -> URL_UCONFIG_E
SITE_EX -> URL_UCONFIG_EX
else -> URL_UCONFIG_E
}
@JvmStatic
val myTagsUrl: String
get() = when (Settings.getGallerySite()) {
SITE_E -> URL_MY_TAGS_E
SITE_EX -> URL_MY_TAGS_EX
else -> URL_MY_TAGS_E
}
val popularUrl: String
get() = when (Settings.getGallerySite()) {
SITE_E -> URL_POPULAR_E
SITE_EX -> URL_POPULAR_EX
else -> URL_POPULAR_E
}
val imageSearchUrl: String
get() = when (Settings.getGallerySite()) {
SITE_E -> URL_IMAGE_SEARCH_E
SITE_EX -> URL_IMAGE_SEARCH_EX
else -> URL_IMAGE_SEARCH_E
}
val watchedUrl: String
get() = when (Settings.getGallerySite()) {
SITE_E -> URL_WATCHED_E
SITE_EX -> URL_WATCHED_EX
else -> URL_WATCHED_E
}
fun getGalleryDetailUrl(gid: Long, token: String?): String {
return getGalleryDetailUrl(gid, token, 0, false)
}
@JvmStatic
fun getGalleryDetailUrl(gid: Long, token: String?, index: Int, allComment: Boolean): String {
val builder = UrlBuilder(host + "g/" + gid + '/' + token + '/')
if (index != 0) {
builder.addQuery("p", index)
}
if (allComment) {
builder.addQuery("hc", 1)
}
return builder.build()
}
@JvmStatic
fun getGalleryMultiPageViewerUrl(gid: Long, token: String): String {
val builder = UrlBuilder(host + "mpv/" + gid + '/' + token + '/')
return builder.build()
}
@JvmStatic
fun getPageUrl(gid: Long, index: Int, pToken: String): String {
return host + "s/" + pToken + '/' + gid + '-' + (index + 1)
}
fun getAddFavorites(gid: Long, token: String?): String {
return host + "gallerypopups.php?gid=" + gid + "&t=" + token + "&act=addfav"
}
fun getDownloadArchive(gid: Long, token: String?, or: String): String {
return host + "archiver.php?gid=" + gid + "&token=" + token + "&or=" + or
}
fun getTagDefinitionUrl(tag: String): String {
return "https://ehwiki.org/wiki/" + tag.replace(' ', '_')
}
fun getThumbUrlPrefix(): String {
return when (Settings.getGallerySite()) {
SITE_E -> URL_PREFIX_THUMB_E
SITE_EX -> URL_PREFIX_THUMB_EX
else -> URL_PREFIX_THUMB_E
}
}
}
@@ -1,162 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client
import android.text.TextUtils
import com.hippo.ehviewer.EhApplication.Companion.ehCookieStore
import com.hippo.ehviewer.Settings
import com.hippo.ehviewer.client.data.GalleryInfo
import java.util.regex.Pattern
object EhUtils {
const val NONE = -1 // Use it for homepage
const val PRIVATE = 0x400
const val UNKNOWN = 0x800
// https://youtrack.jetbrains.com/issue/KT-4749
private const val BG_COLOR_DOUJINSHI = 0xfff44336u
private const val BG_COLOR_MANGA = 0xffff9800u
private const val BG_COLOR_ARTIST_CG = 0xfffbc02du
private const val BG_COLOR_GAME_CG = 0xff4caf50u
private const val BG_COLOR_WESTERN = 0xff8bc34au
private const val BG_COLOR_NON_H = 0xff2196f3u
private const val BG_COLOR_IMAGE_SET = 0xff3f51b5u
private const val BG_COLOR_COSPLAY = 0xff9c27b0u
private const val BG_COLOR_ASIAN_PORN = 0xff9575cdu
private const val BG_COLOR_MISC = 0xfff06292u
private const val BG_COLOR_UNKNOWN = 0xff000000u
// Remove [XXX], (XXX), {XXX}, ~XXX~ stuff
private val PATTERN_TITLE_PREFIX = Pattern.compile(
"^(?:\\([^)]*\\)|\\[[^]]*]|\\{[^}]*\\}|~[^~]*~|\\s+)*"
)
// Remove [XXX], (XXX), {XXX}, ~XXX~ stuff and something like ch. 1-23
private val PATTERN_TITLE_SUFFIX = Pattern.compile(
"(?:\\s+ch.[\\s\\d-]+)?(?:\\([^)]*\\)|\\[[^]]*]|\\{[^}]*\\}|~[^~]*~|\\s+)*$",
Pattern.CASE_INSENSITIVE
)
private val CATEGORY_VALUES = hashMapOf(
EhConfig.MISC to arrayOf("misc"),
EhConfig.DOUJINSHI to arrayOf("doujinshi"),
EhConfig.MANGA to arrayOf("manga"),
EhConfig.ARTIST_CG to arrayOf("artistcg", "Artist CG Sets", "Artist CG"),
EhConfig.GAME_CG to arrayOf("gamecg", "Game CG Sets", "Game CG"),
EhConfig.IMAGE_SET to arrayOf("imageset", "Image Sets", "Image Set"),
EhConfig.COSPLAY to arrayOf("cosplay"),
EhConfig.ASIAN_PORN to arrayOf("asianporn", "Asian Porn"),
EhConfig.NON_H to arrayOf("non-h"),
EhConfig.WESTERN to arrayOf("western"),
PRIVATE to arrayOf("private"),
UNKNOWN to arrayOf("unknown")
)
private val CATEGORY_STRINGS = CATEGORY_VALUES.entries.map { (k, v) -> v to k }
val isExHentai: Boolean
get() = Settings.getGallerySite() == EhUrl.SITE_EX
@JvmStatic
fun getCategory(type: String?): Int {
for (entry in CATEGORY_STRINGS) {
for (str in entry.first)
if (str.equals(type, ignoreCase = true))
return entry.second
}
return UNKNOWN
}
fun getCategory(type: Int): String {
return CATEGORY_VALUES.getOrDefault(type, CATEGORY_VALUES[UNKNOWN])!![0]
}
fun getCategoryColor(category: Int): Int {
return when (category) {
EhConfig.DOUJINSHI -> BG_COLOR_DOUJINSHI
EhConfig.MANGA -> BG_COLOR_MANGA
EhConfig.ARTIST_CG -> BG_COLOR_ARTIST_CG
EhConfig.GAME_CG -> BG_COLOR_GAME_CG
EhConfig.WESTERN -> BG_COLOR_WESTERN
EhConfig.NON_H -> BG_COLOR_NON_H
EhConfig.IMAGE_SET -> BG_COLOR_IMAGE_SET
EhConfig.COSPLAY -> BG_COLOR_COSPLAY
EhConfig.ASIAN_PORN -> BG_COLOR_ASIAN_PORN
EhConfig.MISC -> BG_COLOR_MISC
else -> BG_COLOR_UNKNOWN
}.toInt()
}
fun signOut() {
ehCookieStore.signOut()
Settings.putAvatar(null)
Settings.putDisplayName(null)
Settings.putGallerySite(EhUrl.SITE_E)
Settings.putNeedSignIn(true)
Settings.putSelectSite(true)
}
fun needSignedIn(): Boolean {
return Settings.getNeedSignIn() && !ehCookieStore.hasSignedIn()
}
@JvmStatic
fun getSuitableTitle(gi: GalleryInfo): String {
return if (Settings.getShowJpnTitle()) {
if (TextUtils.isEmpty(gi.titleJpn)) gi.title else gi.titleJpn
} else {
if (TextUtils.isEmpty(gi.title)) gi.titleJpn else gi.title
}.orEmpty()
}
fun extractTitle(fullTitle: String?): String? {
var title: String = fullTitle ?: return null
title = PATTERN_TITLE_PREFIX.matcher(title).replaceFirst("")
title = PATTERN_TITLE_SUFFIX.matcher(title).replaceFirst("")
// Sometimes title is combined by romaji and english translation.
// Only need romaji.
// TODO But not sure every '|' means that
val index = title.indexOf('|')
if (index >= 0) {
title = title.substring(0, index)
}
return title.ifEmpty { null }
}
fun fixThumbUrl(url: String): String {
return EhUrl.getThumbUrlPrefix() +
url.removePrefix(EhUrl.URL_PREFIX_THUMB_E).removePrefix(EhUrl.URL_PREFIX_THUMB_EX)
}
@JvmStatic
fun handleThumbUrlResolution(url: String?): String? {
if (null == url) {
return null
}
val resolution = when (Settings.getThumbResolution()) {
0 -> return url
1 -> "250"
2 -> "300"
else -> return url
}
val index1 = url.lastIndexOf('_')
val index2 = url.lastIndexOf('.')
return if (index1 >= 0 && index2 >= 0 && index1 < index2) {
url.substring(0, index1 + 1) + resolution + url.substring(index2)
} else {
url
}
}
}
@@ -1,25 +0,0 @@
package com.hippo.ehviewer.client.data
interface AbstractGalleryInfo {
var gid: Long
var token: String?
var title: String?
var titleJpn: String?
var thumb: String?
var category: Int
var posted: String?
var uploader: String?
var disowned: Boolean
var rating: Float
var rated: Boolean
var simpleTags: Array<String>?
var pages: Int
var thumbWidth: Int
var thumbHeight: Int
var spanSize: Int
var spanIndex: Int
var spanGroupIndex: Int
var simpleLanguage: String?
var favoriteSlot: Int
var favoriteName: String?
}
@@ -1,89 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client.data
import androidx.room.ColumnInfo
import androidx.room.Ignore
import androidx.room.PrimaryKey
import kotlinx.parcelize.Parcelize
@Parcelize
open class BaseGalleryInfo(
@PrimaryKey
@ColumnInfo(name = "GID")
override var gid: Long = 0,
@ColumnInfo(name = "TOKEN")
override var token: String? = null,
@ColumnInfo(name = "TITLE")
override var title: String? = null,
@ColumnInfo(name = "TITLE_JPN")
override var titleJpn: String? = null,
@ColumnInfo(name = "THUMB")
override var thumb: String? = null,
@ColumnInfo(name = "CATEGORY")
override var category: Int = 0,
@ColumnInfo(name = "POSTED")
override var posted: String? = null,
@ColumnInfo(name = "UPLOADER")
override var uploader: String? = null,
@Ignore
override var disowned: Boolean = false,
@ColumnInfo(name = "RATING")
override var rating: Float = 0f,
@Ignore
override var rated: Boolean = false,
@Ignore
override var simpleTags: Array<String>? = null,
@Ignore
override var pages: Int = 0,
@Ignore
override var thumbWidth: Int = 0,
@Ignore
override var thumbHeight: Int = 0,
@Ignore
override var spanSize: Int = 0,
@Ignore
override var spanIndex: Int = 0,
@Ignore
override var spanGroupIndex: Int = 0,
@ColumnInfo(name = "SIMPLE_LANGUAGE")
override var simpleLanguage: String? = null,
@Ignore
override var favoriteSlot: Int = -2,
@Ignore
override var favoriteName: String? = null
) : GalleryInfo
@@ -1,58 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client.data
import android.os.Parcelable
import com.hippo.ehviewer.client.EhUrl
import com.hippo.network.UrlBuilder
import com.hippo.util.encodeUTF8
import kotlinx.parcelize.Parcelize
@Parcelize
class FavListUrlBuilder(
private var mPrev: String? = null,
private var mNext: String? = null,
var jumpTo: String? = null,
var keyword: String? = null,
var favCat: Int = FAV_CAT_ALL,
) : Parcelable {
fun setIndex(index: String?, isNext: Boolean) {
mNext = index.takeIf { isNext }
mPrev = index.takeUnless { isNext }
}
fun build(): String {
val ub = UrlBuilder(EhUrl.favoritesUrl)
if (isValidFavCat(favCat)) {
ub.addQuery("favcat", favCat.toString())
} else if (favCat == FAV_CAT_ALL) {
ub.addQuery("favcat", "all")
}
keyword?.takeIf { it.isNotBlank() }?.let { ub.addQuery("f_search", encodeUTF8(it)) }
mPrev?.takeIf { it.isNotEmpty() }?.let { ub.addQuery("prev", it) }
mNext?.takeIf { it.isNotEmpty() }?.let { ub.addQuery("next", it) }
jumpTo?.takeIf { it.isNotEmpty() }?.let { ub.addQuery("seek", it) }
return ub.build()
}
companion object {
const val FAV_CAT_ALL = -1
const val FAV_CAT_LOCAL = -2
fun isValidFavCat(favCat: Int): Boolean {
return favCat in 0..9
}
}
}
@@ -1,38 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client.data
import android.os.Parcelable
import kotlinx.parcelize.Parcelize
@Parcelize
class GalleryApiInfo(
var gid: Long = 0,
var token: String? = null,
var archiverKey: String? = null,
var title: String? = null,
var titleJpn: String? = null,
var category: Int = 0,
var thumb: String? = null,
var uploader: String? = null,
var posted: Long = 0,
var filecount: Int = 0,
var filesize: Long = 0,
var expunged: Boolean = false,
var rating: Float = 0f,
var torrentcount: Int = 0,
var tags: Array<String>?
) : Parcelable
@@ -1,50 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client.data
import android.os.Parcelable
import kotlinx.parcelize.Parcelize
@Parcelize
class GalleryComment(
// 0 for uploader comment. can't vote
@JvmField
var id: Long = 0,
@JvmField
var score: Int = 0,
@JvmField
var editable: Boolean = false,
@JvmField
var voteUpAble: Boolean = false,
@JvmField
var voteUpEd: Boolean = false,
@JvmField
var voteDownAble: Boolean = false,
@JvmField
var voteDownEd: Boolean = false,
@JvmField
var uploader: Boolean = false,
@JvmField
var voteState: String? = null,
@JvmField
var time: Long = 0,
@JvmField
var user: String? = null,
@JvmField
var comment: String? = null,
@JvmField
var lastEdited: Long = 0
) : Parcelable
@@ -1,104 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client.data
import com.hippo.ehviewer.client.data.GalleryInfo.Companion.S_LANGS
import kotlinx.parcelize.IgnoredOnParcel
import kotlinx.parcelize.Parcelize
@Parcelize
class GalleryDetail(
@JvmField
val galleryInfo: GalleryInfo = BaseGalleryInfo(),
@JvmField
var apiUid: Long = -1L,
@JvmField
var apiKey: String? = null,
@JvmField
var torrentCount: Int = 0,
@JvmField
var torrentUrl: String? = null,
@JvmField
var archiveUrl: String? = null,
@JvmField
var parent: String? = null,
@JvmField
var newerVersions: ArrayList<GalleryInfo> = ArrayList(),
@JvmField
var visible: String? = null,
@JvmField
var language: String? = null,
@JvmField
var size: String? = null,
@JvmField
var favoriteCount: Int = 0,
@JvmField
var isFavorited: Boolean = false,
@JvmField
var ratingCount: Int = 0,
@JvmField
var tags: Array<GalleryTagGroup>? = null,
@JvmField
var comments: GalleryCommentList? = null,
@JvmField
var previewPages: Int = 0,
@IgnoredOnParcel
@JvmField
var previewSet: PreviewSet? = null,
) : AbstractGalleryInfo by galleryInfo, GalleryInfo {
override fun generateSLang() {
val index = LANGUAGES.indexOf(language)
if (index != -1) {
simpleLanguage = S_LANGS[index]
}
}
companion object {
private val LANGUAGES = arrayOf(
"English",
"Chinese",
"Spanish",
"Korean",
"Russian",
"French",
"Portuguese",
"Thai",
"German",
"Italian",
"Vietnamese",
"Polish",
"Hungarian",
"Dutch"
)
}
}
@@ -1,131 +0,0 @@
/*
* Copyright 2016 Hippo Seven
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hippo.ehviewer.client.data
import android.os.Parcelable
import java.util.regex.Pattern
interface GalleryInfo : AbstractGalleryInfo, Parcelable {
fun generateSLang() {
simpleLanguage = simpleTags?.let { generateSLangFromTags(it) }
?: title?.let { generateSLangFromTitle(it) }
}
private fun generateSLangFromTags(simpleTags: Array<String>): String? {
for (tag in simpleTags) {
for (i in S_LANGS.indices) {
if (S_LANG_TAGS[i] == tag) {
return S_LANGS[i]
}
}
}
return null
}
private fun generateSLangFromTitle(title: String): String? {
for (i in S_LANGS.indices) {
if (S_LANG_PATTERNS[i].matcher(title).find()) {
return S_LANGS[i]
}
}
return null
}
companion object {
/**
* ISO 639-1
*/
const val S_LANG_JA = "JA"
const val S_LANG_EN = "EN"
const val S_LANG_ZH = "ZH"
const val S_LANG_NL = "NL"
const val S_LANG_FR = "FR"
const val S_LANG_DE = "DE"
const val S_LANG_HU = "HU"
const val S_LANG_IT = "IT"
const val S_LANG_KO = "KO"
const val S_LANG_PL = "PL"
const val S_LANG_PT = "PT"
const val S_LANG_RU = "RU"
const val S_LANG_ES = "ES"
const val S_LANG_TH = "TH"
const val S_LANG_VI = "VI"
val S_LANGS = arrayOf(
S_LANG_EN,
S_LANG_ZH,
S_LANG_ES,
S_LANG_KO,
S_LANG_RU,
S_LANG_FR,
S_LANG_PT,
S_LANG_TH,
S_LANG_DE,
S_LANG_IT,
S_LANG_VI,
S_LANG_PL,
S_LANG_HU,
S_LANG_NL
)
val S_LANG_PATTERNS = arrayOf(
Pattern.compile(
"[(\\[]eng(?:lish)?[)\\]]|英訳",
Pattern.CASE_INSENSITIVE
), // [((\[]ch(?:inese)?[))\]]|[汉漢]化|中[国國][语語]|中文|中国翻訳
Pattern.compile(
"[(\uFF08\\[]ch(?:inese)?[)\uFF09\\]]|[汉漢]化|中[国國][语語]|中文|中国翻訳",
Pattern.CASE_INSENSITIVE
),
Pattern.compile(
"[(\\[]spanish[)\\]]|[(\\[]Español[)\\]]|スペイン翻訳",
Pattern.CASE_INSENSITIVE
),
Pattern.compile("[(\\[]korean?[)\\]]|韓国翻訳", Pattern.CASE_INSENSITIVE),
Pattern.compile("[(\\[]rus(?:sian)?[)\\]]|ロシア翻訳", Pattern.CASE_INSENSITIVE),
Pattern.compile("[(\\[]fr(?:ench)?[)\\]]|フランス翻訳", Pattern.CASE_INSENSITIVE),
Pattern.compile("[(\\[]portuguese|ポルトガル翻訳", Pattern.CASE_INSENSITIVE),
Pattern.compile(
"[(\\[]thai(?: ภาษาไทย)?[)\\]]|แปลไทย|タイ翻訳",
Pattern.CASE_INSENSITIVE
),
Pattern.compile("[(\\[]german[)\\]]|ドイツ翻訳", Pattern.CASE_INSENSITIVE),
Pattern.compile("[(\\[]italiano?[)\\]]|イタリア翻訳", Pattern.CASE_INSENSITIVE),
Pattern.compile(
"[(\\[]vietnamese(?: Tiếng Việt)?[)\\]]|ベトナム翻訳",
Pattern.CASE_INSENSITIVE
),
Pattern.compile("[(\\[]polish[)\\]]|ポーランド翻訳", Pattern.CASE_INSENSITIVE),
Pattern.compile("[(\\[]hun(?:garian)?[)\\]]|ハンガリー翻訳", Pattern.CASE_INSENSITIVE),
Pattern.compile("[(\\[]dutch[)\\]]|オランダ翻訳", Pattern.CASE_INSENSITIVE)
)
val S_LANG_TAGS = arrayOf(
"language:english",
"language:chinese",
"language:spanish",
"language:korean",
"language:russian",
"language:french",
"language:portuguese",
"language:thai",
"language:german",
"language:italian",
"language:vietnamese",
"language:polish",
"language:hungarian",
"language:dutch"
)
}
}
Loaded 100 of 1030 files, more files were not shown because too many files have changed in this diff. Show more