Commit graph

200 commits

Author SHA1 Message Date
MajorTanya
34102027d1 Clean up some build warnings (mihonapp/mihon#2929)
* Replace deprecated rememberPlainTooltipPositionProvider

* Remove superfluous when branch

This when is marked as exhaustive.

* Replace deprecated LibrariesContainer call

AboutLibraries now wants us to produce the libraries ourselves.

* Replace deprecated ClipboardManager with Clipboard

Clipboard uses suspend functions, hence the coroutine scope addition.

* Use multi-dollar strs to simplify GraphQL queries

These have been available since Kotlin 2.1.

* Remove various redundant casts & conversions

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

* Replace deprecated MenuAnchorType

Literally just a typealias for ExposedDropdownMenuAnchorType anyway.

* OptimizeNonSkippingGroups is enabled by default

* Suppress shadowing warning

This is explicitly intentional according to the KDocs.

* Migrate Context Receivers to Context Parameters

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

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

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

* Fix expression bodies with explicit return

Naming conflict resolved by aliasing.

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

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

* Suppress deprecation of non-AutoMirrored icons

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

* Explicitly opt-in to new annotation default rules

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

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

Warning message was the following:

    This annotation is currently applied to the value parameter only, but in the future it will also be applied to field.
    - To opt in to applying to both value parameter and field, add '-Xannotation-default-target=param-property' to your compiler arguments.
    - To keep applying to the value parameter only, use the '@param:' annotation target.

(cherry picked from commit b543bc089a442c5e93b0fb6c83bc4037740b1eb5)
2026-02-05 22:56:31 +07:00
AntsyLich
5ab24620ec Cleanup migrate manga dialog and related code (mihonapp/mihon#2156)
(cherry picked from commit 2b126f1ff56b63e470b48a04149e28c609f01148)

Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
2026-01-21 10:46:16 +07:00
AntsyLich
c328b37675 Add migration config screen to select and prioritize target sources (mihonapp/mihon#2144)
(cherry picked from commit 2e180005a01f633ad7fafc5cfb3079f0bc858448)

Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
2026-01-20 13:36:59 +07:00
Radon Rosborough
f12e997fb8 Improve handling of downloads for chapters with same metadata and optionally for OSes that don't support Unicode in filename (mihonapp/mihon#2305)
Co-authored-by: jkim <jhskim@hotmail.com>
Co-authored-by: fatotak <111342761+fatotak@users.noreply.github.com>
Co-authored-by: MajorTanya <39014446+MajorTanya@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit 58b25d697f7987e9888344e815d5646ec010a663)
2026-01-14 12:56:19 +07:00
Cuong-Tran
8eaa177ad5
Update dependency com.pinterest.ktlint:ktlint-cli to v1.8.0 (#1369)
* Update dependency com.pinterest.ktlint:ktlint-cli to v1.8.0 (mihonapp/mihon#2708)

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit 13552c5ffa796aa9bf5db5e12c758a4b3763bf2b)

* chore: disable ktlint consecutive comments and single line block comment rules

* spacing-between-declarations-with-comments & mix condition

* Remove unused rule

* More blank lines

---------

Co-authored-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2026-01-08 10:19:37 +07:00
Trevor Paley
b6bda7fea2
Added proper multi window support in WebView instead of treating everything as a redirect (mihonapp/mihon#2584)
(cherry picked from commit 6ab87c793122165f98c36b4b7d9158069ea40f5a)
2025-12-31 13:54:37 +07:00
AntsyLich
ab2410522f
Bump app version code and default user agent
(cherry picked from commit f9793d33233ceb7729fa9cfe5ae55b45a372c54c)
2025-12-29 16:52:40 +07:00
Cuong-Tran
6b15d76be6
chore: Replace deprecated usages with Locale, LocalResources, Bitmap and toColorInt (#1316)
* Replace deprecated usages with Locale, LocalResources, Bitmap and toColorInt; remove FlagKit class

* remember(resources)
2025-12-09 14:55:49 +07:00
Cuong-Tran
98e4c24939
feat(discord-UI): Re-UI logout button and improve thumbnail URL handling (#1253)
* feat(discord): re-UI the logout button

* fix(discord): Add URL utility functions and improve thumbnail URL handling

* refactor

* Update core/common/src/main/kotlin/tachiyomi/core/common/util/system/UrlUtils.kt

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* fix(UrlUtils): Correct comments for URL scheme checks in utility functions

* removing redundant checks

* Remove redundant comment about URL scheme validation

---------

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-10-27 15:26:17 +07:00
AntsyLich
1fd86ca74f Optimize and cleanup library code (mihonapp/mihon#2329)
Co-authored-by: Cuong-Tran <cuongtran.tm@gmail.com>
(cherry picked from commit e62cd0e816402303fdf12513816894624f77e208)
2025-08-27 14:29:01 +07:00
AntsyLich
78a62b257b Fix local source EPUB files not loading (mihonapp/mihon#2369)
(cherry picked from commit 9bf3f15fff96b48e6847034c9fcd07f14675130b)
2025-08-12 23:03:22 +07:00
AwkwardPeak7
a7b307b732 Ensure app waits for Cloudflare challenge to complete before continuing (mihonapp/mihon#2200)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit 2df3382148c76d287943fc36e2f55bc16df1cd83)
2025-06-16 00:38:37 +07:00
Mend Renovate
ab44f49fff Update dependency org.junit.jupiter:junit-jupiter to v5.13.1 (mihonapp/mihon#1754)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit 591e9c13560f28d71598eb32648387d099ebc881)
2025-06-16 00:38:37 +07:00
Cuong-Tran
4b4e4c6204
chore(sponsor): change to GitHub Sponsor (#981)
* chore(sponsor): change to GitHub Sponsor

* Fix button style

* Font style

* Small fix

* spotless
2025-06-04 16:15:31 +07:00
Cuong-Tran
757a86852c
Buy Me a Coffee (#953)
* Update expired Discord link

* Buy me a coffee

* Refactor

* move it down
2025-05-28 18:30:47 +07:00
Cuong-Tran
aaa1d855ff
feat(sanitizer): Sanitize manga titles for special characters before searching (#956) 2025-05-28 17:37:13 +07:00
Cuong-Tran
7dd57c54bc
chore(storage): check valid data folder location & handle permission for device without FilePicker (#906)
* fix(storage): setting app's data folder on Android TV

Also check if set location is actually accessible then update UI compose accordingly (for all devices) in some cases (e.g. location set but actual folder was deleted or permission revoked)

(cherry picked from commit ef56b7f11ef0d243ef14816e85afa360f1137fe8)

* chore(storage): improve permission handling for older Android version & Fire TV

(cherry picked from commit 5ee009a6db73d33687e55ee8f4ad6412a9e320d4)
2025-05-11 23:24:16 +07:00
AntsyLich
0f365336e2
Switch default user agent to Android Chrome (mihonapp/mihon#2048)
(cherry picked from commit 8b7f35598833917c89f8ae53cca10578fd880d67)
2025-04-28 03:06:25 +07:00
AwkwardPeak7
3e7e6c4dd1
Remove Okhttp networking from WebView Screen (mihonapp/mihon#2020)
(cherry picked from commit df2b4c754bab9dd96fe2199b9f6df62d87b7175e)
2025-04-20 01:38:45 +07:00
AwkwardPeak7
25f3229a98
Fix duplicate requests in WebView due to empty reasonPhrase (mihonapp/mihon#2003)
(cherry picked from commit 818e6931c6bc89e0bb111e77418542a88f8db37c)
2025-04-14 17:15:01 +07:00
Mend Renovate
dd9f9a3447
Update kotlin monorepo to v2.1.20 (mihonapp/mihon#1883)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit 556290f2d35f739bb4bddc012739acf10b92708d)
2025-04-01 23:49:20 +07:00
Cuong-Tran
d8832a7e32
Bump default user agent 2025-03-08 01:26:15 +07:00
AwkwardPeak7
6bfb80fe37
Spoof or remove X-Requested-With header from webview (mihonapp/mihon#1812)
(cherry picked from commit 793d7fbe40c87ed233da8cc99d544d01024ed4f5)
2025-03-03 10:48:11 +07:00
Cuong-Tran
0a6caab64b
Add Xiaomi system app to list of invalid browsers (mihonapp/mihon#1776) 2025-02-26 23:38:53 +07:00
Cuong-Tran
707d9854ec
Change backup proto & improve code of backup/restore category related preferences (mihonapp/mihon#1726)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit e1724d1aa0e3340e1404cfd80bd264831d86a879)
2025-02-26 10:29:59 +07:00
Cuong-Tran
4c08f61f68
Fix: ktlint config for SY code (#712)
* Add more editor configs and move ktlint config to it (mihonapp/mihon#1731)

(cherry picked from commit 34d1e6fa278846dd8eb6ea82c936818d4610d3c2)

* more ktlint config

* fix compile

* restore comment-wrapping

* restore all of them

* disable in gradle.kts

* cleanup

* remove filenamktlint_standard_filename

* fix filename

* remove unused EhAssets

* ktlint_standard_multiline-expression-wrapping

* property-naming & function-naming

* ktlint_standard_argument-list-wrapping

* fix argument-list-wrapping

* Improve  in case source is null

related to commit 343cd372

* comment

* comment

* comment

* comment

* comment

* comment

* comment

* comment

* Revert "Improve  in case source is null"

This reverts commit 08e317bb075b4b634f0c6f19f11eb78b99406e59.

* Revert "remove unused EhAssets"

This reverts commit e2cfc3e0c2b8d5b8bac41f2dfc4d9baef332f83e.

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-02-18 13:44:57 +07:00
MajorTanya
db3fa582ce
Add Infinix system app to list of invalid browsers (mihonapp/mihon#1684)
* Add Infinix system app to list of invalid browsers

`com.transsion.resolver` being picked by the system as a suitable
browser caused a Mihon user with an Infinix device to be unable to
open any links in browsers, including tracker login and opening a
WebView page in a real browser.

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>

* Add docstring to DeviceUtil.invalidDefaultBrowsers

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit bfc8320aa4720dc3b908aab1b8a1ffb99d43193b)
2025-02-04 19:30:44 +07:00
Cuong-Tran
747cd48abc
update website link (#655) 2025-01-26 02:04:20 +07:00
MajorTanya
42ac5e0e70
Always use software bitmap on certain devices (mihonapp/mihon#1543)
* Include Coil's broken hardware bitmap device list

Declares all listed devices as unable to use hardware bitmaps.

Might fix mihonapp/mihon#1541.

* Hide Hardware Bitmap Threshold setting if unusable

This hides the setting from the UI if the user's device in on Coil's
list of devices with problematic hardware bitmap implementations.

Also moved HARDWARE_BITMAP_UNSUPPORTED into the ImageUtil as a
property for more ergonomic access across the project.

* Add missing negation

* Update CHANGELOG.md

* Update CHANGELOG.md

* Needs to be and not or

Also fix typo in CHANGELOG.md

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
(cherry picked from commit 7f2cfb5eb224896d6d0ffa6960f0a98c7325e240)
2024-12-06 23:39:22 +07:00
MajorTanya
af34b13fe3
Add a Honor system app to list of invalid browsers (mihonapp/mihon#1520)
Closes mihonapp/mihon#1348.

Specifically adds com.hihonor.android.internal.app to the list of
invalid browsers. It's very similar to the existing entry for Huawei,
so it stands to reason it is the same/similar problem as with Huawei's
internal app.

(cherry picked from commit 3bd8d3ecb7023d1b01930ab0f91482c23e89c946)
2024-12-05 15:42:12 +07:00
Cuong-Tran
5a893927a3
App update retry/resume (#523)
* custom timeout for NetworkHelper.client

* support retry/resume downloading app update apk

* retain app update download progress over retries

* increase app update download timeout to 180 seconds / 3 minutes from previously 2 minutes
2024-11-28 22:06:48 +07:00
Cuong-Tran
7628e064e5
custom timeout for NetworkHelper.client (#524) 2024-11-28 22:06:13 +07:00
AntsyLich
e3d17184a6
Improve hardware bitmap threshold option
Also `spotlessApply`

(cherry picked from commit d6dfd24548eaa05a8c3e478068fe2e08f2ee4473)
2024-11-21 09:39:44 +07:00
AntsyLich
f6eaad8439
Add option to lower the threshold for hardware bitmaps
Closes #mihonapp/mihon1436
Closes #mihonapp/mihon1486

(cherry picked from commit dcddac5daaff3ec89c8507c35dc13d345ffdb6d7)
2024-11-21 02:06:18 +07:00
AntsyLich
9d3b99ec1a
Switch to hardware bitmap in reader only if device can handle it
Closes #mihonapp/mihon1460

(cherry picked from commit e6d96bd348ea5d18a005d6465222ad5f5123103e)
2024-11-21 02:06:18 +07:00
AntsyLich
3c0c45eb81
Address some build warnings and cleanup (mihonapp/mihon#1412)
(cherry picked from commit a1c60897916f418726107fec80ad79b2a4b8d500)
2024-11-01 10:37:52 +07:00
AntsyLich
3acfcbec21
Bump default user agent 2024-11-01 10:37:52 +07:00
AntsyLich
3a12f5e83e
Fix long strip images not loading in some old devices
Fixes mihonapp/mihon#1398

(cherry picked from commit 06efc3b25c5af51f42448af27a269ee459d9093d)
2024-11-01 10:37:52 +07:00
Cuong-Tran
6b6e6a7fba
fix dependencies 2024-10-28 23:12:15 +07:00
Cuong-Tran
451fe433cf
Error screen (#462)
- A dedicated screen in Settings for error list when updating library
- Allow to jump to Error screen if click on notification
- Allow to migrate error entry
- Create error on each entry updated instead of waiting for the whole updating list to finished
- Overwrite entry's error if new error happens after updating
- Clear entry's error if it successfully updated
- Clear un-relevant errors (entry which was removed from Library) on next update
- List of errors can jump to top/bottom or next/previous errors group
- Won't create error file anymore

* Added library update errors screen

(cherry picked from commit 7cf37d52f959ac65f53cf7657563fb4428bd9188)

* Open library update errors screen on clicking library update error notification

(cherry picked from commit d2d22f437a1d61b086f1e19dfbcd2c0a2bc125f4)

* LibraryUpdateErrorScreen's bottom UI with scroll to top/bottom buttons

(cherry picked from commit 859ce54474d456232510e21f4f6795af65489be2)

* migrate to AppBar

* sticky header

* scroll to next/previous group of errors

* insert error entry one by one

* delete error from DB when successfully updated

* clean un-relevant errors from DB on every updates

* fix errors & clean up

* catch exception & fix notification intent

---------

Co-authored-by: ImaginaryDesignation <108343184+ImaginaryDesignation@users.noreply.github.com>
2024-10-28 23:12:14 +07:00
AntsyLich
4ba654c29a
Update dependency com.pinterest.ktlint:ktlint-cli to v1.4.0
Co-authored-by: Mend Renovate <bot@renovateapp.com>
(cherry picked from commit 140083ee39df7d458e5ff9abc6d0ee9831d99387)
2024-10-28 22:11:48 +07:00
Roshan Varughese
8eb2582a88
Add option to opt out of Analytics and Crashlytics (mihonapp/mihon#1237)
(cherry picked from commit 7c7af72f8cb12decc06b76c36852dcc54696236d)
2024-10-23 14:19:45 +07:00
AntsyLich
7d8f96d856
Cleanup .gitignore files
(cherry picked from commit afa50029882655af8d5eea40aed7644fce4564d8)
2024-10-23 14:19:38 +07:00
AntsyLich
80063ffba4
Bump compile sdk to 35
Co-authored-by: p
(cherry picked from commit 37419cdc26c2b5c4f8583fc2ba439b08fab42856)
2024-10-23 13:08:41 +07:00
AntsyLich
81d70c5ce3
Use new library for injekt with inorichi patch
(cherry picked from commit 83fd4746eda1b99f35292b0c2211e606a421b3eb)
2024-09-08 23:04:57 +07:00
AntsyLich
a1e0a1cd4b
Move archive related code to :core:archive
(cherry picked from commit bd7b35419861df6d426d6ec0a188391910d0f615)
2024-09-05 22:00:46 +07:00
Cuong-Tran
48d874342e
Address more spotless lint errors from KMK & SY 2024-08-26 00:08:37 +07:00
AntsyLich
e7ca892f65
Address spotless lint errors (mihonapp/mihon#1138)
* Add spotless (with ktlint)

* Run spotlessApply

* screaming case screaming case screaming case

* Update PagerViewerAdapter.kt

* Update ReaderTransitionView.kt

(cherry picked from commit d6252ab7703d52ecf9f43de3ee36fd63e665a31f)
2024-08-26 00:08:37 +07:00
AntsyLich
335f0956b4
Remove detekt (mihonapp/mihon#1130)
Annoying. More annoying in this project.

(cherry picked from commit 777ae2461e1eb277a3aa0c998ff69e4f100387a1)
2024-08-26 00:08:37 +07:00
Shamicen
e6d2b1b930
Libarchive refactor (jobobby04/TachiyomiSY#1249)
* Refactor archive support with libarchive

* Refactor archive support with libarchive

* Revert string resource changs

* Only mark archive formats as supported

Comic book archives should not be compressed.

* Fixup

* Remove epub from archive format list

* Move to mihon package

* Format

* Cleanup

Co-authored-by: Shamicen <84282253+Shamicen@users.noreply.github.com>
(cherry picked from commit 239c38982c4fd55d4d86b37fd9c3c51c3b47d098)

* handle incorrect passwords

* lint

* fixed broken encryption detection + small tweaks

* Add safeguard to prevent ArchiveInputStream from being closed twice (#967)

* fix: Add safeguard to prevent ArchiveInputStream from being closed twice

* detekt

* lint: Make detekt happy

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>

(cherry picked from commit e620665dda9eb5cc39f09e6087ea4f60a3cbe150)

* fixed ArchiveReaderMode CACHE_TO_DISK

* Added some missing SY --> comments

---------

Co-authored-by: FooIbar <118464521+fooibar@users.noreply.github.com>
Co-authored-by: Ahmad Ansori Palembani <46041660+null2264@users.noreply.github.com>
(cherry picked from commit 95c834581b106f73a28ade78b7aa4a6769633507)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ArchivePageLoader.kt
#	core/common/src/main/kotlin/eu/kanade/tachiyomi/util/storage/EpubFile.kt
#	gradle/libs.versions.toml
#	source-local/src/androidMain/kotlin/tachiyomi/source/local/LocalSource.kt
2024-08-26 00:08:37 +07:00