Compare commits

...

632 Commits

Author SHA1 Message Date
42eaaa497f Release v0.13.4 2022-04-22 17:29:18 -04:00
96c894ce5b Revert history Compose/SQLDelight changes 2022-04-22 17:27:58 -04:00
c0214103a9 Temporarily remove chapter name cleaning
To be added back in a more consistent manner later around the app. Probably when more things are Compose-y with less repetition.
2022-04-22 14:03:43 -04:00
2b76a97989 Add advanced setting to clear WebView data 2022-04-22 14:00:42 -04:00
9d77052d9c Enable verbose logging in dev flavor by default (#6979) 2022-04-22 12:34:53 -04:00
b4981058a2 Add indexes to creational tables (#6974) 2022-04-22 08:03:07 -04:00
032aa64195 Lift Compose theme to abstract controller 2022-04-21 22:58:28 -04:00
7c8e8317a8 Simplify history item description building 2022-04-21 22:47:51 -04:00
eb1cfc4cd4 Add abstract ComposeController 2022-04-21 22:42:37 -04:00
f1e5cccee7 Add placeholder color for Compose manga covers 2022-04-21 19:02:54 -04:00
bc2ed763bd Default auto backups to 2 2022-04-21 17:13:33 -04:00
a35995b898 Fix crash on History tab when there is no next chapter (#6970) 2022-04-21 16:48:45 -04:00
b1f46ed830 Migrate History screen database calls to SQLDelight (#6933)
* Migrate History screen database call to SQLDelight

- Move all migrations to SQLDelight
- Move all tables to SQLDelight

Co-authored-by: inorichi <3521738+inorichi@users.noreply.github.com>

* Changes from review comments

* Add adapters to database

* Remove logging of database version in App

* Change query name for paging source queries

* Update migrations

* Make SQLite Callback handle migration

- To ensure it updates the database

* Use SQLDelight Schema version for Callback database version

Co-authored-by: inorichi <3521738+inorichi@users.noreply.github.com>
2022-04-21 15:45:56 -04:00
6c1565a7d4 Make links in new update dialog clickable
Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
2022-04-19 22:39:33 -04:00
2ca6b655ad Replace ignore button in new update dialog with link to GitHub page
Not enough room for 3 buttons. Users can still tap outside or back out of the dialog if they want to ignore it.
2022-04-18 22:45:58 -04:00
a83a481ac8 Update junrar 2022-04-18 17:14:47 -04:00
65a8b63b3b Move chapter name cleaning logic to holder (fixes #6955) 2022-04-18 09:26:43 -04:00
b20ca36db9 Fix AppBar not unlifting when scrolling using ComposeView (#6952) 2022-04-17 14:33:35 -04:00
189f92d7e8 Show better error message when empty backup creation is attempted (closes #6941) 2022-04-17 11:51:24 -04:00
cdd4ec6233 Increase default OkHttp call timeout to 2 minutes
Which is still stupidly high, but maybe it'll be lenient enough for certain people.
2022-04-17 11:32:47 -04:00
ef1bb4e800 Show parsed Markdown for new version info (closes #6940) 2022-04-17 11:30:05 -04:00
c475acd1ea Migrate History screen to Compose (#6922)
* Migrate History screen to Compose

- Migrate screen
- Strip logic from presenter into use cases and repository
- Setup for other screen being able to migrate to Compose with Theme

* Changes from review comments
2022-04-17 10:36:22 -04:00
7d50d7ff52 Add elevation to navigation rails (#6947)
Co-authored-by: CrepeTF <trungnguyen02@outlookcom>
2022-04-17 10:29:09 -04:00
28522f4f90 Release v0.13.3 2022-04-15 16:37:25 -04:00
ec3a227a02 Weblate translations (#6890)
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: GTX155 <kirchoabv@mail.bg>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Jozef Hollý <j2.00ghz@gmail.com>
Co-authored-by: Lauri <lauri.kangasaho@hotmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nicol Bolas <creepyweirdo1031@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pierre Kim <admin@manateeshome.com>
Co-authored-by: Pilfer <pescao@gmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rikishaaa <jebote90@gmail.com>
Co-authored-by: Santiago José Gutiérrez Llanod <gutierrezapata17@gmail.com>
Co-authored-by: Sebastian Mihai Crap <sebastiancrap@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Subham Jena <subhamjena8465@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: Zero O <godarms2010@live.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: אילון קטן <eilonkatan@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/bg/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ca/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/el/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es_419/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/he/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ko/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/or/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ro/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ru/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sc/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/th/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/vi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: GTX155 <kirchoabv@mail.bg>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Lauri <lauri.kangasaho@hotmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nicol Bolas <creepyweirdo1031@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pierre Kim <admin@manateeshome.com>
Co-authored-by: Pilfer <pescao@gmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rikishaaa <jebote90@gmail.com>
Co-authored-by: Santiago José Gutiérrez Llanod <gutierrezapata17@gmail.com>
Co-authored-by: Sebastian Mihai Crap <sebastiancrap@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Subham Jena <subhamjena8465@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: Zero O <godarms2010@live.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: אילון קטן <eilonkatan@gmail.com>
2022-04-15 16:35:30 -04:00
89decf3474 Always remove manga title from if it prefixes chapter names (related to #6913) 2022-04-15 15:52:48 -04:00
0b2794e843 Limit package name overriding to Android 8+ (related to #6846) 2022-04-15 13:43:54 -04:00
554dfb5874 Bump Material Components 2022-04-15 13:36:24 -04:00
9c30fa1da3 Update F-Droid migration guide link 2022-04-15 12:11:01 -04:00
e81bd61e24 Adjust update/download warnings
This is a partial revert/evolution of 538dd60580

- Back to notifications, because Android 12+ may cut off toasts
- Notifications now automatically dismiss after 30s on Android 8+ (taken from J2K)
- Also warn if more than 30 chapters are queued for download
2022-04-15 10:24:54 -04:00
7a0b54bb38 Set network call timeout to 90 seconds (instead of infinite) 2022-04-15 09:56:35 -04:00
f060daf8c4 Rollback to stable OkHttp
There's some weird crashes related to it. Happy Eyeballs will return once we upgrade again.
2022-04-14 22:37:51 -04:00
c1976ef599 Avoid some crashes 2022-04-14 18:28:16 -04:00
f16fb4e1e4 Minor cleanup 2022-04-14 18:15:47 -04:00
5da2c82f47 Avoid crashing if picture can't be saved (related to #6905) 2022-04-13 18:45:49 -04:00
d443245d66 Update Skip Updating preference strings. (#6900)
* Update Skip Updating preference strings.

* Complete -> Completed

* hasn't -> haven't

* Apply suggestions from code review

Co-authored-by: arkon <arkon@users.noreply.github.com>

Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-04-13 18:35:58 -04:00
9be3eea5fd Remove dependency review step from push workflow 2022-04-13 18:35:46 -04:00
07a9fd061d Add dependency review step to workflows 2022-04-13 18:34:33 -04:00
2a070c0b1e Add clear cookies option to WebView menu 2022-04-13 17:48:05 -04:00
7b5106d206 Update ACRA 2022-04-13 17:44:49 -04:00
821d9cdb02 Show different update notification for F-Droid installations 2022-04-13 17:44:43 -04:00
28575936d3 Move learn more text in skipped entries notification to main content
Because people apparently don't realize they can tap actions
2022-04-12 23:08:00 -04:00
83a04da4a0 Stop allowing keeping app data on uninstall
Seems to be more trouble than it's worth since it makes the app uninstallable without manually deleting app data. Users have to go out of their way to save data into the app data folder now anyway.
2022-04-12 17:27:09 -04:00
0894b1394f Fix cover sharing error string (#6911) 2022-04-12 09:10:32 -04:00
eb33d3c991 Remove build flavor checks for update warnings
"stable" was invalid anyway, it should've been "release"
2022-04-11 23:05:00 -04:00
d7f01abf3a Update Coil 2022-04-11 23:04:19 -04:00
80635343ae Update ACRA 2022-04-11 23:04:07 -04:00
2b38b4e022 Release v0.13.2 2022-04-10 12:17:45 -04:00
4ecde9fc39 Gate update/download warnings to non-stable flavors 2022-04-10 12:17:45 -04:00
445ee274c5 Update to AGP 7.1.3 2022-04-10 12:17:45 -04:00
f2bdc514e8 Weblate translations (#6829)
Co-authored-by: Ahmad Azwar Annas <ahmadazw2@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: C201 <derasetad@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: FateXBlood <zecrofelix@gmail.com>
Co-authored-by: Garutmaan Garuda <garutmaangaruda@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hitalo | イタチ <Hitalomarquete331@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Jozef Hollý <j2.00ghz@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nicol Bolas <creepyweirdo1031@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pierre Kim <admin@manateeshome.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Respek <pedjal3345@gmail.com>
Co-authored-by: Rick <rickeits153@gmail.com>
Co-authored-by: Rostyslav <info@ubilling.net.ua>
Co-authored-by: Samuel Leonardo <lafruta94@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: THElegend5 <jindalpratik98@gmail.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: אילון קטן <eilonkatan@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ca/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/el/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es_419/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/he/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/id/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ko/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ne/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ru/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sa/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sc/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/th/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/uk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/vi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ahmad Azwar Annas <ahmadazw2@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: C201 <derasetad@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: FateXBlood <zecrofelix@gmail.com>
Co-authored-by: Garutmaan Garuda <garutmaangaruda@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hitalo | イタチ <Hitalomarquete331@gmail.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nicol Bolas <creepyweirdo1031@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pierre Kim <admin@manateeshome.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Respek <pedjal3345@gmail.com>
Co-authored-by: Rick <rickeits153@gmail.com>
Co-authored-by: Rostyslav <info@ubilling.net.ua>
Co-authored-by: Samuel Leonardo <lafruta94@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: THElegend5 <jindalpratik98@gmail.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: אילון קטן <eilonkatan@gmail.com>
2022-04-09 09:42:33 -04:00
5afff31f72 Formatting 2022-04-08 16:44:23 -04:00
2dfafa387b Remove reader tapping option in favor of disabled nav layouts 2022-04-08 16:44:13 -04:00
7318f4f5dd Remove some dead code 2022-04-08 16:32:34 -04:00
175b77fe6f Add option to disable navigation layout (#6876) 2022-04-08 16:32:25 -04:00
346652e508 Ensure media store scan is triggered after saving an image (fixes #6808) 2022-04-08 15:55:12 -04:00
f0eb42e72d Update linter 2022-04-08 15:30:39 -04:00
37100f0937 Move delete action to match placement in library_selection.xml (#6869)
Move delete icon to far right in chapter_selection.xml and updates_chapter_selection.xml, for consistency with library_selection.xml
2022-04-08 12:10:59 -04:00
ac980a4dbf MangaCoverFetcher: Handle moving cover cache after adding to library (#6885)
Move cover cache to separate cache dir after the parent manga is added to library
2022-04-08 12:10:06 -04:00
a8b53499af Remove kotlin.compiler.execution.strategy config 2022-04-07 22:34:25 -04:00
a8aeae329e Bump to Gradle 7.4.2 2022-04-07 22:31:20 -04:00
52911539b8 Bump dependencies 2022-04-07 22:19:31 -04:00
3026ff241b Write library cover to library cover cache (#6883) 2022-04-07 22:00:17 -04:00
2466a079d5 MangaCoverFetcher: Don't close network response (#6882) 2022-04-07 13:34:31 -04:00
ed9fdf49e2 Add missing percent placeholder in some singular strings. (#6855) 2022-04-02 19:47:47 -04:00
668d962233 Update WebView requester package name
https://github.com/tachiyomiorg/tachiyomi/issues/6781#issuecomment-1086665483
2022-04-02 12:04:20 -04:00
996f770935 Override X-Requested-With header value in WebView requests (closes #6781) 2022-04-02 10:49:42 -04:00
041a6dd919 Update Coil 2022-04-02 09:55:25 -04:00
dbad60d03b Base activities cleanup (#6848)
* secure delegate

* theming delegate
2022-04-02 09:54:21 -04:00
27a60423dc Remove source filter sheet solid background (#6850)
Co-authored-by: CrepeTF <trungnguyen02@outlookcom>
2022-04-02 09:50:26 -04:00
5a37d38a84 Stop global search items from clipping (#6851)
Co-authored-by: CrepeTF <trungnguyen02@outlookcom>
2022-04-02 09:50:07 -04:00
6f566e67d5 Removed scrollbar on long theme item titles (#6852)
Co-authored-by: CrepeTF <trungnguyen02@outlookcom>
2022-04-02 09:49:50 -04:00
dd490f2ac9 Fix DST issue (#6831) 2022-04-02 08:52:53 -04:00
5409af0a6c MangaCoverFetcher: Use source's header for network request (#6847) 2022-04-02 08:44:01 -04:00
0ed0d903cc Force default browser for tracker logins
To avoid potentially opening up third party apps, which aren't useful for handling OAuth login flows.
2022-03-26 16:35:14 -04:00
85be4c492d Fix clear database selection toggling (fixes #6807) 2022-03-26 16:12:15 -04:00
c06ad8b87e Stop using custom tabs (closes #6821) 2022-03-26 15:45:58 -04:00
b89acb5853 Stop removing local manga's title from chapter names (closes #6578)
Users should better curate their chapter folder/file names if need be. There's legit reasons for a chapter to start with or contain the same word(s) that the manga title consists of.
2022-03-26 15:34:53 -04:00
7890511a53 Update dependencies 2022-03-26 15:23:31 -04:00
3aa4e6eb93 Add "Move all chapters from series to top" option to download context menu (#6794)
* Added basic move to top series feature

* Remove intermediate List

* Change text string

* Remove spanish manual translation

* Changed algorithm to use "partition"
2022-03-26 14:49:37 -04:00
f8eb9f94f4 Fix filename not having chapter title and page when sharing (#6827) 2022-03-26 12:40:29 -04:00
c581b9eeb9 Weblate translations (#6770)
Co-authored-by: Ahmad Azwar Annas <ahmadazw2@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Amir <amir.batyrggaliev@gmail.com>
Co-authored-by: Andi Firanda <jargonnation@gmail.com>
Co-authored-by: Anupam Malhotra <anpm.malhotra@gmail.com>
Co-authored-by: Artur Iwański <iartur221@gmail.com>
Co-authored-by: Aurimas Jurevičius <aurimasjurevic@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Davit Gogritchiani <davitgogritchiani@outlook.com>
Co-authored-by: Drown by wind <ziemelis.martynas01@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Eugene <e.shlyapkin99@gmail.com>
Co-authored-by: FateXBlood <zecrofelix@gmail.com>
Co-authored-by: Garutmaan Garuda <garutmaangaruda@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: HouseDrVenus <aurimasjurevic@gmail.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jaime Martín <jaimemr06@gmail.com>
Co-authored-by: Jendrej <ejjendrej@gmail.com>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Justina P <justuke08@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Madddog1997 <madddog1997@gmail.com>
Co-authored-by: Manoj Phuyal <manoj.phuye23@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Muhammad Diponegoro <dipoengoro@outlook.com>
Co-authored-by: Nikita Epifanov <nikgreens@protonmail.com>
Co-authored-by: Noemkinator <noemka1234@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Samuel Leonardo <lafruta94@gmail.com>
Co-authored-by: Sayykii <martin40lmg@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Unai <uesandi@gmail.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: Veysel <jdksoalalskd71@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: gimme some socks <bobteen1@gmail.com>
Co-authored-by: mahdi eslam panah <mahdii3375@gmail.com>
Co-authored-by: mateus zampol <mateuszampol2009@hotmail.it>
Co-authored-by: saturn <swagburritovg@gmail.com>
Co-authored-by: typek52 <typek52@gmail.com>
Co-authored-by: xmdb <klchiu721@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ar/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/bg/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ca/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/el/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es_419/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/eu/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fa/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/id/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ka/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/kk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/km/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/lt/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ne/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ru/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sa/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sc/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/th/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/vi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ahmad Azwar Annas <ahmadazw2@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Amir <amir.batyrggaliev@gmail.com>
Co-authored-by: Andi Firanda <jargonnation@gmail.com>
Co-authored-by: Anupam Malhotra <anpm.malhotra@gmail.com>
Co-authored-by: Artur Iwański <iartur221@gmail.com>
Co-authored-by: Aurimas Jurevičius <aurimasjurevic@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Davit Gogritchiani <davitgogritchiani@outlook.com>
Co-authored-by: Drown by wind <ziemelis.martynas01@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Eugene <e.shlyapkin99@gmail.com>
Co-authored-by: FateXBlood <zecrofelix@gmail.com>
Co-authored-by: Garutmaan Garuda <garutmaangaruda@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jaime Martín <jaimemr06@gmail.com>
Co-authored-by: Jendrej <ejjendrej@gmail.com>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Justina P <justuke08@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Madddog1997 <madddog1997@gmail.com>
Co-authored-by: Manoj Phuyal <manoj.phuye23@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Muhammad Diponegoro <dipoengoro@outlook.com>
Co-authored-by: Nikita Epifanov <nikgreens@protonmail.com>
Co-authored-by: Noemkinator <noemka1234@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Samuel Leonardo <lafruta94@gmail.com>
Co-authored-by: Sayykii <martin40lmg@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Unai <uesandi@gmail.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: Veysel <jdksoalalskd71@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: gimme some socks <bobteen1@gmail.com>
Co-authored-by: mahdi eslam panah <mahdii3375@gmail.com>
Co-authored-by: mateus zampol <mateuszampol2009@hotmail.it>
Co-authored-by: saturn <swagburritovg@gmail.com>
Co-authored-by: typek52 <typek52@gmail.com>
Co-authored-by: xmdb <klchiu721@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-03-26 12:38:56 -04:00
ffd9c6995a UpdatesController: Don't init adapter until chapter data is ready (#6824)
Considering there's no pagination for this list, the data loading can take some
time. So this will show the existing refresh indicator instead of empty view
while the list is loading.
2022-03-25 22:20:47 -04:00
ef600c0956 Fix extension update badge reset when app resumed (#6822) 2022-03-25 11:11:16 -04:00
5c0a43e8d6 Fix off by 1 dates (fixes #6791) 2022-03-24 18:49:08 -04:00
8e332dba30 Update Material Components 2022-03-24 18:44:48 -04:00
cd07027192 Use the file extension from the ImageType enum (#6800)
* Use the file extension from the ImageType enum

* Use the mime type from the ImageType enum

- On Android 29+
2022-03-21 13:13:39 -04:00
da2b30268a Add support for Happy Eyeballs 2022-03-19 16:48:33 -04:00
1163aa4e4e Share logic for saving page/cover (#6787)
* Use MediaStore on newer Android Q or newer

* Use flow instead of Observable

* Review comment fixes

* Use suspended function instead of flow
2022-03-19 16:46:23 -04:00
ddb856edc7 Add cover error drawable (#6782) 2022-03-15 22:21:30 -04:00
9c426bc216 Avoid crashing when global search encounters a NoClassDefFoundError 2022-03-15 22:20:41 -04:00
382852d0bd Require WebView v95+ 2022-03-15 22:12:41 -04:00
87ae86e1be Added reverse portrait reader rotation 2022-03-12 16:50:48 -05:00
9547311d7d Avoid throw as it is slow expensive operations 2022-03-12 16:47:31 -05:00
1613d561c1 Revert "Add shortcut to change app language in Android 13"
This reverts commit 538478cac8.
2022-03-12 16:45:36 -05:00
538478cac8 Add shortcut to change app language in Android 13 2022-03-11 22:26:03 -05:00
267ecce958 Support Android 13 themed app icon 2022-03-11 07:57:57 -05:00
fae43fedfa ReaderActivity: Reduce anim duration when launched from resume FAB (#6762)
From enter 500ms exit 400ms
To both 350ms
2022-03-10 07:51:42 -05:00
c447022092 Disable app cache WebView (is a deprecated web API and is being removed in Android 13) 2022-03-09 18:04:52 -05:00
56042ad0b6 Split out global library update skipped entries into separate notification (closes #6722) 2022-03-09 18:04:52 -05:00
45da036789 Avoid potentially deleting the entire backups folder 2022-03-09 18:04:52 -05:00
b47b702a52 Copy raw description on long tap (fixes #6557) 2022-03-09 18:04:52 -05:00
869424cd16 Change cover placeholder (#6756) 2022-03-09 17:26:55 -05:00
b9fd01315b Minor cleanup 2022-03-06 09:37:39 -05:00
a72098b862 Add shortcut to edit categories screen from category setting dialog (closes #6280) 2022-03-06 09:37:39 -05:00
86016de6cb Recreate Backup worker with IS_AUTO_BACKUP_KEY flag (#6742)
* Recreate Backup worker with IS_AUTO_BACKUP_KEY flag

* Extra safety net to not delete backup folder
2022-03-06 08:36:47 -05:00
592b9fedb9 Fixed the wrong offset (#6704) 2022-03-05 10:08:32 -05:00
d06984e3a3 Use same name for manual backup job tag and work name 2022-03-05 09:49:21 -05:00
6b55ee250d Update AGP and Gradle 2022-03-04 16:10:47 -05:00
10eef282fa Coil 2.x upgrade (#6725)
* Migrate to Coil 2

* Adapt to use coil disk cache

* Update to alpha 7

* Update to alpha 8

* Update to rc01
2022-03-04 16:04:32 -05:00
f312936629 Use Version Catalog & clean up Gradle files (#6728) 2022-03-04 09:58:31 -05:00
d53bb4c337 Use existing worker for manual backup creation (#6718)
* Use existing worker for manual backup creation

This will show the "creating backup" notification when auto backup is
running. Complete or error notification will continue to be shown only on
manual job.

* Make sure disabling auto backup don't cancel running manual backup job
2022-03-03 22:15:49 -05:00
1a605e27bc Remove unused string (#6726)
* change wording if update restriction is off

from
  Only update: none
to
  Restrictions: none

* remove unused string
2022-03-03 22:13:44 -05:00
08ee858f64 Adjust mark as unread and mark previous as read action visibility (#6703) 2022-03-01 22:21:15 -05:00
af70fe3e7e [skip ci] Move auto-closer rules 2022-02-27 14:50:48 -05:00
29c5c0af50 Update Material Components 2022-02-25 18:08:42 -05:00
9420b750d2 Adjust badge font weights 2022-02-25 18:08:29 -05:00
6f5328f663 Fix corrupted backup file, fix #6424 (#6691)
Reappear stably on the api30 Android Studio Emulator,
first save a large backup file,
then save a small backup file, overwriting the previous larger backup file,
so you get a backup file with a larger size but only the first part is meaningful,
2022-02-23 09:12:24 -05:00
90214d02d7 Add Prerequisites and Getting help to Contributing.md (#6682) 2022-02-22 07:58:00 -05:00
2f07f226b8 Fix "Landscape zoom" and "Navigate to pan" for split images (#6647)
* fix: getPageHolder would always return the first split, as they share the same index

* split pages have the same number, we need an extra check to know whether we move forward or back
2022-02-17 22:09:03 -05:00
a8ad19a89d Restore bottom nav position earlier after being recreated (#6648) 2022-02-17 22:08:36 -05:00
57c07250fd Side padding: Added missing percentage (#6668) 2022-02-17 10:39:07 -05:00
4a3e4a7c5c Reword library update restrictions setting and surface skipped entries in error notification/log 2022-02-14 18:16:22 -05:00
c284a23afb Avoid some crashes if router backstack is empty for whatever reason 2022-02-13 11:10:22 -05:00
fad1449de3 Grid items optimizations (#6641)
Use ConstraintLayout for ez size ratio calculation and merge cover-only view
holder with compact's
2022-02-13 11:09:49 -05:00
f18d161eaf Add "Started" library filter and library update restriction (#6382)
* Add chapter read count to library manga

Co-Authored-By: Jays2Kings <jays@outlook.com>

* Add "Started" library filter and library update restriction

* Update Filter when its changed

* Add back accidentally removed stuff.

* Update..

* Change variable names

* Change Variable name where I missed

Co-authored-by: Jays2Kings <jays@outlook.com>
2022-02-13 10:42:28 -05:00
88054b453a No need for a new bit for DisplayModeSetting mask
(Thanks Syer)
2022-02-12 22:26:51 -05:00
c560373596 Fix overlap between DisplayModeSetting and SortModeSetting masks 2022-02-12 22:17:33 -05:00
d698d03521 Fix Quad9 DoH setting 2022-02-12 22:08:12 -05:00
d8c8d7c588 Add Quad9 DOH provider (#6638)
* add quad9 as new doh provider

* add ipv6 addresses to google doh

* revert changes to import
2022-02-12 17:15:53 -05:00
9120e82517 Consistent divider colour 2022-02-12 13:24:20 -05:00
e214746536 Update action_display_cover_only_grid string 2022-02-12 13:15:19 -05:00
142396400c Weblate translations (#6537)
Co-authored-by: A <ville.mourujarvi@hostedweblate.mail.kapsi.fi>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Colin Tirion <grotehoed@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Garutmaan Garuda <garutmaangaruda@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: KasukeLp <kasukelp23@yahoo.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Malek El Jubeily <malekjbeily@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matteo Gaeta <matteo.gaeta.1998@gmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Subha Das <subhadas68367@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Unai <uesandi@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ar/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/bn/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ca/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/el/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/eu/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ru/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sa/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sc/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/th/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: A <ville.mourujarvi@hostedweblate.mail.kapsi.fi>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Colin Tirion <grotehoed@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Garutmaan Garuda <garutmaangaruda@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: KasukeLp <kasukelp23@yahoo.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Malek El Jubeily <malekjbeily@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matteo Gaeta <matteo.gaeta.1998@gmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Subha Das <subhadas68367@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Unai <uesandi@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-02-12 13:14:23 -05:00
51d48bdde6 Update Theme Preview Items (#6628)
* Improved theme preview items

* Tweaked theme preference item border colours

* Polished theme items

* Update ThemesPreference.kt item layout width value

Co-authored-by: CrepeTF <trungnguyen02@outlookcom>
2022-02-12 13:14:04 -05:00
44b055c019 Cover only grid added to library (#6528)
* No title grid added to library and source

* Else added to display title in case image is null or empty

* No title grid renamed and now only available in library

* Spanish strings about cover only grid removed

Co-authored-by: micaelagimenez <micaela.gimenez@ext.prosegur.com>
2022-02-12 13:09:44 -05:00
790d7b9170 Rename extension function to avoid confusion with androidx function 2022-02-12 11:23:10 -05:00
d8719ceee9 Navigate to pan / landscape zoom (#6481)
* pan if the image is zoomed instead of navigating away
quickly display full landscape image before zooming to fit height in fit to screen

* add Tap to pan preference, defaults to true
add landscape zoom preference, defaults to false

* hide landscape image zoom option if scale is not fit screen

* fix landscape image zoom for first image and loading image

* properly reload pagerholders when landscape zoom option is changed

* enable landscape zoom by default
2022-02-12 11:21:54 -05:00
71ddb16574 Detect identical mangas when adding to library (#6579)
* added duplicate manga check

When adding a manga to your library, the app will go through each manga previously added and compare their names. If a match is detected, it will prompt the user and ask for confirmation. On this prompt there is also an option to view the other manga.

* added german translations for newly added strings

* Revert "added german translations for newly added strings"

This reverts commit 71ada620671651daeeb2546aecd02400a4bc86bc.

* changed `AlertDialog.Builder` to `MaterialAlertDialogBuilder`

* using SQL query instead of filtering entire library with Kotlin
2022-02-12 11:13:27 -05:00
2932ed670f MainActivity fixes (#6591)
* Reduce notifyDataSetChanged calls when category count is disabled

* Fix category tabs briefly showing when it's supposed to be disabled

Also fix tabs showing when activity recreated

* Lift appbar when tab is hidden

Check against tab visibility instead of viewpager

* Restore selected nav item after recreate

* Simplify SHORTCUT_MANGA intent handling

Don't need to change controller if the topmost controller is the target
2022-02-12 10:58:58 -05:00
ae2a6a3d4f Update dependencies 2022-02-12 10:11:03 -05:00
30061ada58 Update AGP for Android Studio Bumblebee | 2021.1.1 Patch 1 2022-02-12 10:09:30 -05:00
a131e28b60 [skip ci] docs: update app update checker link (#6619) 2022-02-10 08:51:08 -05:00
8c1662cfdb Disallow PackageInstaller extension installer option on MIUI 2022-02-05 23:02:13 -05:00
299e52e877 Allow disabling secure screen when incognito mode is on 2022-02-05 18:51:08 -05:00
95b253db09 Don't show error toasts in MangaController for HTTP 103 responses (closes #6562) 2022-02-05 18:26:50 -05:00
067cb2452e Add shortcut to backups guide 2022-02-05 17:44:54 -05:00
45e4092335 Increase minimum required disk space to download chapters to 200MB (closes #6576) 2022-02-05 17:35:54 -05:00
7659a997cf Update versions plugin 2022-02-05 17:27:36 -05:00
aa5e428222 Filter archive files as sequence 2022-02-05 17:27:28 -05:00
319e4360c8 Display correct string on FAB 2022-02-05 17:26:57 -05:00
f5c6e80dbb Add 5% webtoon reader side padding option (closes #6511) 2022-02-02 21:50:20 -05:00
7108993936 Unify reader error layout (#6512)
So nobody will think that the error layout is broken when they see different
layout.
2022-02-02 21:41:20 -05:00
b6553bdc34 ReaderActivity: Fix transition crash on Android 8 (#6542) 2022-02-02 21:40:48 -05:00
19fe689969 Revert "Temporarily revert some things for stable release"
This reverts commit b88f8ae9d2.
2022-02-01 12:32:27 -05:00
d6386cef41 Release v0.13.1 2022-02-01 12:32:21 -05:00
b88f8ae9d2 Temporarily revert some things for stable release 2022-02-01 12:31:47 -05:00
408c7b2ca6 Avoid unnecessary transition setup in reader if not transitioning 2022-02-01 10:31:44 -05:00
271253fd0b Fix app crashing when opening ReaderActivity with FAB (#6535) 2022-02-01 10:30:17 -05:00
5348154c42 TachiyomiAppBarLayout: Ignore inset visibility (#6533)
For resume button animation
2022-02-01 09:51:14 -05:00
e1b1f4f3fc Avoid trying to open links in invalid Huawei app 2022-02-01 09:48:37 -05:00
75a2110626 Update preference dependencies 2022-01-31 18:13:57 -05:00
9857d3d6ea Update issue templates 2022-01-31 16:10:41 -05:00
836a2649d3 Use default bottom nav height 2022-01-31 16:05:04 -05:00
59cba2533c Revert "Disable update/download warnings for stable release"
This reverts commit 3da8677e32.
2022-01-31 16:03:42 -05:00
a6ac2fbc9a Release v0.13.0 2022-01-31 15:32:08 -05:00
3da8677e32 Disable update/download warnings for stable release 2022-01-31 15:28:14 -05:00
4d0d7d5ad6 Weblate translations (#6494)
Co-authored-by: Ahmad Azwar Annas <ahmadazw2@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Allen Sam <allenaizen@pm.me>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Eugene <e.shlyapkin99@gmail.com>
Co-authored-by: FateXBlood <zecrofelix@gmail.com>
Co-authored-by: Garutmaan Garuda <garutmaangaruda@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jendrej <ejjendrej@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Paulo Pinho <kebrus@gmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: jdkdklsls dkdkdk <accshared420@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/el/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/id/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ml/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ne/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ru/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sa/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sc/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/te/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/th/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/vi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ahmad Azwar Annas <ahmadazw2@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Allen Sam <allenaizen@pm.me>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Eugene <e.shlyapkin99@gmail.com>
Co-authored-by: FateXBlood <zecrofelix@gmail.com>
Co-authored-by: Garutmaan Garuda <garutmaangaruda@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jendrej <ejjendrej@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Paulo Pinho <kebrus@gmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: jdkdklsls dkdkdk <accshared420@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-01-31 15:28:05 -05:00
8c4ece4b2d Fix selection state appearance in clear database list (fixes #6526) 2022-01-31 15:01:01 -05:00
bf3bb8a378 Remove more formatting span types in SearchView (maybe fixes #6495) 2022-01-30 10:51:49 -05:00
cf5e60f8eb MangaSummaryView: Fix incomplete description on tablet ui (#6518) 2022-01-30 10:47:53 -05:00
7de707c60a Avoid invalid unset default browser (fixes #6520) 2022-01-30 10:46:46 -05:00
5cd11ad8c3 Fix bottom nav showing on resume when action mode is active (#6514) 2022-01-29 13:55:33 -05:00
6bba52a2b6 Always try to use default browser when opening custom tabs on all Android versions 2022-01-29 10:12:46 -05:00
54b476df4e [skip ci] add note about issue taking in contribution guide 2022-01-28 10:20:51 -05:00
a68f123594 TachiyomiAppBarLayout: Use insetter to handle inset (#6506)
This requires adding the status bar foreground drawing logic since the parent
class wouldn't know the inset changes anymore.
2022-01-28 10:14:13 -05:00
08ad4f96b9 Tweaked Yin & Yang theme a little (#6507) 2022-01-27 08:24:32 -05:00
77a3acf5cc Fix search inputs accepting formatted text (#6501)
* Fix Global and extension search input accepts formatted text #6495

* Code change as requested because of performance issue

* code changes as requested

* minor code changes
2022-01-26 23:37:26 -05:00
dea585e69b add extra space before error in log description (#6505)
to make it easier to read if the log reader using word wrap
2022-01-26 23:29:38 -05:00
879dacfba6 Copy source ID to clipboard when long pressing source in migrate list (closes #6479) 2022-01-26 23:00:43 -05:00
b459234ddc Try to show more relevant exception messages when failing to restore a backup 2022-01-26 22:43:27 -05:00
76d2c676fd Discard backup file if it fails to be created properly (e.g. fails validation) 2022-01-26 22:32:06 -05:00
d5015d37e1 Show error toast if empty URI is passed when trying to create/restore a backup 2022-01-26 22:31:28 -05:00
1b71e4cee7 Write job failure exceptions to error log 2022-01-26 22:21:01 -05:00
18ef5c6ff9 Update to AGP 7.1.0 2022-01-25 22:49:50 -05:00
35e0561950 Replace custom download dialog buttons with MaterialButtons 2022-01-25 08:41:15 -05:00
adab8e3ed8 Allow choosing browser apps from WebView even when extension deep links are verified in Android 12+ 2022-01-24 09:26:08 -05:00
89dbb4d300 Avoid migration failing if previous source doesn't exist 2022-01-23 17:21:23 -05:00
e3f3686b8a Allow Samsung devices on Android 12+ to use dynamic theme
Since it seems to work fine, regardless of what the Material Components library seems to dictate.
2022-01-22 14:53:12 -05:00
9984e983b4 Fix tab underline in chapter settings sheet 2022-01-22 14:43:11 -05:00
4ebe67ef53 Spacing adjustments in reader settings sheet 2022-01-22 14:39:05 -05:00
1a11d4153e Fix solid background behind text selection UI in dialogs 2022-01-22 14:38:18 -05:00
cd7cf3583e fix: handle Komga tracks during manga migration (#6463)
* fix: handle Komga tracks during manga migration

closes #6354

* refactor: remove Komga direct reference
2022-01-22 14:25:05 -05:00
66a180bc36 Add ability to open FAQ and Guide, and Changelog in extension repository (#6469) 2022-01-22 14:17:43 -05:00
eb06667455 Weblate translations (#6429)
Co-authored-by: Ahmad Azwar Annas <ahmadazw2@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alifian Caesar <alifiancaesar@gmail.com>
Co-authored-by: Arun <arun007@pm.me>
Co-authored-by: AsyJAIZ <2007andrylavr@gmail.com>
Co-authored-by: Blue <bluestuffish@gmail.com>
Co-authored-by: Colin Tirion <grotehoed@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Eugene <e.shlyapkin99@gmail.com>
Co-authored-by: FateXBlood <zecrofelix@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: I. Musthafa <i.musthafa66@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jendrej <ejjendrej@gmail.com>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Johkum <jacobomur@gmail.com>
Co-authored-by: Jozef Hollý <j2.00ghz@gmail.com>
Co-authored-by: Luiz-bro <luiznneto1@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Manu <manularrosa96@mailbox.org>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nabin Dhakal <nabin6707@gmail.com>
Co-authored-by: Niko Strijbol <strijbol.niko@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav <info@ubilling.net.ua>
Co-authored-by: Sergio Gomez Damas <sergio.gomezdamas@gmail.com>
Co-authored-by: Soare Robert Daniel <soare.robert.daniel@protonmail.com>
Co-authored-by: StirCrazy <camigames252@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Unai <uesandi@gmail.com>
Co-authored-by: Yahya Kerba <yahyakerba97@gmail.com>
Co-authored-by: Zakhar Timoshenko <vp1984tanki@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: ssantos <ssantos@web.de>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ar/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ca/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/el/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es_419/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/eu/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/gl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/id/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ne/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ro/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ru/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sc/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/th/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/uk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/vi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ahmad Azwar Annas <ahmadazw2@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alifian Caesar <alifiancaesar@gmail.com>
Co-authored-by: Arun <arun007@pm.me>
Co-authored-by: AsyJAIZ <2007andrylavr@gmail.com>
Co-authored-by: Blue <bluestuffish@gmail.com>
Co-authored-by: Colin Tirion <grotehoed@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Eugene <e.shlyapkin99@gmail.com>
Co-authored-by: FateXBlood <zecrofelix@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: I. Musthafa <i.musthafa66@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jendrej <ejjendrej@gmail.com>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Johkum <jacobomur@gmail.com>
Co-authored-by: Luiz-bro <luiznneto1@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Manu <manularrosa96@mailbox.org>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nabin Dhakal <nabin6707@gmail.com>
Co-authored-by: Niko Strijbol <strijbol.niko@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav <info@ubilling.net.ua>
Co-authored-by: Sergio Gomez Damas <sergio.gomezdamas@gmail.com>
Co-authored-by: Soare Robert Daniel <soare.robert.daniel@protonmail.com>
Co-authored-by: StirCrazy <camigames252@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Unai <uesandi@gmail.com>
Co-authored-by: Yahya Kerba <yahyakerba97@gmail.com>
Co-authored-by: Zakhar Timoshenko <vp1984tanki@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: ssantos <ssantos@web.de>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-01-22 13:26:46 -05:00
0ff8966a27 Fix pages not being serializable for chapter cache (fixes #6483) 2022-01-20 17:48:25 -05:00
2cc6794db5 Revert "Update core-splashscreen (#6471)"
This reverts commit 46ec655db5.

This broke the background color in Android 12+.
2022-01-18 22:51:43 -05:00
0cb4094dd9 Update dependencies 2022-01-18 18:03:16 -05:00
edd213343b Remove some dead code 2022-01-18 17:54:17 -05:00
46ec655db5 Update core-splashscreen (#6471) 2022-01-18 17:51:14 -05:00
769efd9d06 HistoryController: Drop first search event (#6465)
Removes unnecessary data set changes when entering history screen
2022-01-14 22:25:05 -05:00
49cb3b6aa7 MangaInfo: Don't apply appbar padding on tablet ui (#6464) 2022-01-14 22:24:55 -05:00
8ad98b67d2 Change library list item title style (#6457) 2022-01-09 12:10:01 -05:00
8a8f1d3205 Update crop border shortcut state when reading mode or manga set (fixes #6441) 2022-01-09 10:53:06 -05:00
4a27f0546c Fix bottom nav being visible when resuming app (fixes #6012) 2022-01-09 10:26:51 -05:00
727a7e4b2d Change Toolbar to MaterialToolbar (#6456) 2022-01-09 09:55:16 -05:00
2b5e8241ab Fix more crashes 2022-01-08 16:23:55 -05:00
3dc4fd8dd1 Make tracker status wording/ordering more consistent 2022-01-08 15:49:39 -05:00
375a27a93d Add new manga statuses
To be exposed in extension-lib 1.3
2022-01-08 15:39:45 -05:00
544387d1a0 Avoid reader crash 2022-01-08 15:06:44 -05:00
cb8120d38f Update to Conductor 3.1.2 2022-01-08 15:01:42 -05:00
78a261f5d3 Reduce stutter when entering Browse screen (#6435)
* More coil

* ExtensionController: Drop first text change event

* Browse-Source: Remove unnecessary load

* ExtensionPresenter: Increase debounce timeout

To avoid heavy list reload during first enter animation
2022-01-08 12:55:22 -05:00
b8f7653fb2 Use material components on reader error views (#6447)
* Use material components on reader error views

* Adjust image loading behavior

Don't set automatic background color right away and keep show progress indicator
until the page image is fully loaded.
2022-01-08 12:53:20 -05:00
e0d2a01bc8 Add DoH abbreviation to preference title so it's searchable 2022-01-06 22:57:22 -05:00
560be9f553 Remove clutter in main (#6437) 2022-01-06 22:54:51 -05:00
47723042c5 Fallback to preference title if dialog title isn't set 2022-01-06 22:53:54 -05:00
d04d676d2f URL encode Kitsu search queries (fixes #5712) 2022-01-05 17:43:11 -05:00
3435636ca0 Replace use-experimental Kotlin compiler flags with opt-in 2022-01-05 17:43:11 -05:00
2e1572d7cc fix crash in ReaderActivity (#6439) 2022-01-04 21:29:14 -05:00
938339690e Custom Cloudflare failure exception to avoid user-facing "java.lang.Exception" text 2022-01-02 17:57:20 -05:00
dbb2c523c1 Avoid crashes in tracker interceptor errors 2022-01-02 17:56:49 -05:00
0b9d436753 Fix some crashes 2022-01-02 11:25:35 -05:00
2d03f3ce1e Add QuickJS dependency to eventually replace Duktape 2022-01-02 11:25:23 -05:00
c4a476d0d2 Handle renaming existing downloaded CBZ chapters on update 2022-01-01 15:22:03 -05:00
5122aed332 Weblate translations (#6352)
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alifian Caesar <alifiancaesar@gmail.com>
Co-authored-by: Andre Rahardjo <zertozzf@gmail.com>
Co-authored-by: Aviv Ben Ami <avivbenami@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Flamm <robindevaux25@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: HaruSasaki <aiqusubaru@gmail.com>
Co-authored-by: Hossain Rizbi <rsajib387@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: Italian Translator <nekoxtranslator@etlgr.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jagadeesh Vijay Varma <jagadeeshvarma.b@gmail.com>
Co-authored-by: Jan Obst <macek04@volny.cz>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Jozef Hollý <j2.00ghz@gmail.com>
Co-authored-by: KasukeLp <kasukelp23@yahoo.com>
Co-authored-by: Lyaiya <hipsnafoha@outlook.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Neterskian <neterskian@gmail.com>
Co-authored-by: Nikola Perović <nikolaperovicccc@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rikishaaa <jebote90@gmail.com>
Co-authored-by: Rostyslav <info@ubilling.net.ua>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Unai <uesandi@gmail.com>
Co-authored-by: Viktoria PETROVA <victoriaapetrova@gmail.com>
Co-authored-by: Zakhar Timoshenko <vp1984tanki@gmail.com>
Co-authored-by: Zero O <godarms2010@live.com>
Co-authored-by: f3rr31 <5920873@disroot.org>
Co-authored-by: stevenlele <stevenlele@126.com>
Co-authored-by: typek52 <typek52@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: Тимур <tucirs@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/bg/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/bn/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/el/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/eu/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/he/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hu/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/id/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ru/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sc/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/te/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/uk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/vi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alifian Caesar <alifiancaesar@gmail.com>
Co-authored-by: Andre Rahardjo <zertozzf@gmail.com>
Co-authored-by: Aviv Ben Ami <avivbenami@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Flamm <robindevaux25@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: HaruSasaki <aiqusubaru@gmail.com>
Co-authored-by: Hossain Rizbi <rsajib387@gmail.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: Italian Translator <nekoxtranslator@etlgr.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jagadeesh Vijay Varma <jagadeeshvarma.b@gmail.com>
Co-authored-by: Jan Obst <macek04@volny.cz>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: KasukeLp <kasukelp23@yahoo.com>
Co-authored-by: Lyaiya <hipsnafoha@outlook.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Neterskian <neterskian@gmail.com>
Co-authored-by: Nikola Perović <nikolaperovicccc@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rikishaaa <jebote90@gmail.com>
Co-authored-by: Rostyslav <info@ubilling.net.ua>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Unai <uesandi@gmail.com>
Co-authored-by: Viktoria PETROVA <victoriaapetrova@gmail.com>
Co-authored-by: Zakhar Timoshenko <vp1984tanki@gmail.com>
Co-authored-by: Zero O <godarms2010@live.com>
Co-authored-by: f3rr31 <5920873@disroot.org>
Co-authored-by: stevenlele <stevenlele@126.com>
Co-authored-by: typek52 <typek52@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: Тимур <tucirs@gmail.com>
2022-01-01 14:57:22 -05:00
5336c5b46e Add compress to CBZ on download (#6360) 2022-01-01 14:46:43 -05:00
22615f5981 Fixes descriptive notification message for errors (#6413)
* Fixes descriptive notification message for errors
Fixes #6401

* Fixes descriptive notification message for errors
Fixes #6401
2022-01-01 13:13:44 -05:00
bdf4b4b679 Add AppInfo functions to replace BuildConfig usages in extensions 2022-01-01 11:30:18 -05:00
548e300c4b Remove unused Nsfw annotation
Extensions now purely declare it through the Gradle config
2022-01-01 10:51:27 -05:00
8a5d8c96ef Remove explicit option to store downloads in app data folder
App data is typically deleted during app uninstallation, which some users are unaware of. The folder is also inaccessible externally by default in Android 11+, which is also annoying to users.
2022-01-01 10:44:27 -05:00
78c2631b6f Move preference extension functions to utils 2021-12-31 16:32:24 -05:00
7c246ffc71 Add link to troubleshooting guide in library update error log file 2021-12-31 15:16:44 -05:00
8bb85753cc Update versions and about libraries plugins 2021-12-31 14:40:12 -05:00
abfdde28ef Swallow observable errors instead of crashing 2021-12-31 13:21:32 -05:00
9801f1edfa Update analytics dependencies 2021-12-31 13:21:31 -05:00
fc3a200a63 Fix Crash while trying to search in Settings (#6397)
* Fix Crash while trying to search in Settings

* Use already provided categories
2021-12-31 13:21:05 -05:00
6a00658119 Update wording of pref_remove_after_marked_as_read (#6418) 2021-12-31 13:20:21 -05:00
353485054e Fix some crashes 2021-12-28 16:53:35 -05:00
800583b5e2 Actually Fix #6341 (#6392) 2021-12-26 15:45:29 -05:00
2db2b7348d Fix crash for bound intListPreferences 2021-12-26 15:44:34 -05:00
f3718257f5 Reduce redundancy in some preference declarations
The remaining ones could also be converted to FlowPreferences for this, but it's not really necessary.
2021-12-26 12:44:38 -05:00
5500762acd Update "Library updates restrictions" wording (#6371)
* Update "Library updates restrictions" wording

Co-Authored-By: OncePunchedMan <64155117+OncePunchedMan@users.noreply.github.com>
Co-Authored-By: nicki <72807749+curche@users.noreply.github.com>
Co-Authored-By: Soitora <simon.mattila@protonmail.com>
Co-Authored-By: FourTOne5 <59261191+FourTOne5@users.noreply.github.com>

* Update strings.xml

Co-Authored-By: loocool2 <36128021+loocool2@users.noreply.github.com>

Co-authored-by: OncePunchedMan <64155117+OncePunchedMan@users.noreply.github.com>
Co-authored-by: nicki <72807749+curche@users.noreply.github.com>
Co-authored-by: Soitora <simon.mattila@protonmail.com>
Co-authored-by: FourTOne5 <59261191+FourTOne5@users.noreply.github.com>
Co-authored-by: loocool2 <36128021+loocool2@users.noreply.github.com>
2021-12-26 11:49:27 -05:00
4c8f5e1f7a Use animation to hide/show fab (#6385) 2021-12-26 11:38:35 -05:00
733cf99bb4 Fix incorrect locale name casing in extension details (fixes #6391)
Also closing https://github.com/tachiyomiorg/tachiyomi-extensions/issues/10007 since multisource extensions aren't really a thing anymore.
2021-12-26 11:35:28 -05:00
58c2f22120 Truncate MAL search queries to first 64 characters (closes #6314)
Is it worth telling the user? ¯\_(ツ)_/¯
2021-12-26 11:35:28 -05:00
42accebeca Case insensitive sort in extension list. (#6375)
* Sort Extension irrespective of it's name's case.

* Avoid creating unnecessary strings

Co-Authored-By: arkon <arkon@users.noreply.github.com>

Co-authored-by: arkon <arkon@users.noreply.github.com>
2021-12-24 14:55:11 -05:00
1c5c370c12 Avoid unnecessary string creation when sorting 2021-12-24 10:26:24 -05:00
448645d83a Don't recompute constant device info 2021-12-24 10:25:02 -05:00
09b6a3b41e Rename night theme color files too 2021-12-24 09:55:22 -05:00
74206d60ce Rename theme color value files so they are not scattered (#6384) 2021-12-24 09:53:10 -05:00
c3a0de7fab Update dependencies 2021-12-24 09:45:56 -05:00
7edf7a434f Avoid crash on Samsung devices on Android 12
Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
2021-12-24 09:42:45 -05:00
b701821550 Handle potentially missing sources list in extensions JSON
Can happen in:
- Unofficial repos
- If the inspector breaks
2021-12-24 09:32:44 -05:00
d022bf2673 Fix Global Search ignoring incognito mode when setting last used source. (#6374) 2021-12-24 09:32:19 -05:00
7eed8c440c Fix readded chapters polluting 'Updates' tab. (#6377) 2021-12-24 09:28:48 -05:00
1ab12e380a Fix #6341 (#6383) 2021-12-24 09:28:23 -05:00
728e14e8e4 TachiyomiCoordinatorLayout: Remove app bar lift mechanism for view pager (#6379)
This is a follow up to 845e061382
...jk i actually forgot about it
2021-12-24 09:27:57 -05:00
8aa402526a Fix #6366 (#6372) 2021-12-21 09:35:00 -05:00
4793ee4786 Update some wording in Delete Chapters preference. (#6365) 2021-12-19 09:09:48 -05:00
a09d6c0470 Better Upload Date to not have a single blank upload date. (#6358) 2021-12-18 14:47:07 -05:00
9e83130bd8 Add Better Extension Search (#6359)
Add support to searching with source name, id and baseUrl for a extension's sources.
2021-12-18 14:46:45 -05:00
2ed01af723 Action toolbar adjustments (#6353)
* Pair ActionToolbar with ActionMode

This makes ActionToolbar an activity object that can be configured in the
similar way as ActionMode

* Remove action toolbar workaround now that it stays in activity layout

5924

* Set status bar color when action mode is active

6256

* Adjust fab show timing after action mode finished

* Adjust action toolbar layout and animation

Default corner size and use bottom sheet animation

6069

* Adjust action toolbar layout on large screen

Right half of the screen
2021-12-18 14:16:26 -05:00
afc80d6a7c Adjust global update preference wording and visibility 2021-12-17 14:14:48 -05:00
532a1b1aba Address some IDE warnings 2021-12-17 12:30:41 -05:00
65062b4bcb Remove library update order setting
This doesn't make sense to have if the intention is to have reasonably sized global updates. Opting to remove it to remove complexity instead.
2021-12-17 12:29:54 -05:00
c16206d816 [skip ci] update workflow actions 2021-12-17 10:47:55 -05:00
185283f864 [skip ci] fix thread locking workflow to actually be daily 2021-12-17 10:40:52 -05:00
7d1f5c7383 Hide irrelevant settings if global update isn't enabled 2021-12-17 10:14:04 -05:00
945afc71ef Refactor dependant preference visibility flows 2021-12-17 10:11:07 -05:00
818fe50f77 Combine global update item restrictions 2021-12-17 09:57:37 -05:00
6fddad7a77 Add option for library update only update completely read manga (#6323)
* Add option for library update only update completely read manga

only check manga for updates if there is no unread chapter

* sum
2021-12-17 09:40:54 -05:00
38d131be37 Workaround cleanup (#6350)
* Remove material-components workaround that was fixed upstream

* Remove unused toolbar workaround

* Fix cover dialog navigation icon
2021-12-17 09:32:42 -05:00
aeff846e1f Update dependencies 2021-12-16 23:00:04 -05:00
6b52fc1e2d Use elevated overlay on reader menu (#6347) 2021-12-16 22:57:31 -05:00
0671b530ba Update to Kotlin 1.6.10 2021-12-15 17:45:33 -05:00
207f9c26ae Add link to privacy policy 2021-12-15 17:45:33 -05:00
6367ce5e5e sfix some colors and going back to original pink-ish color (#6344) 2021-12-13 11:09:36 -05:00
ba1a2e9942 Remove Gson dependencies
All official extensions no longer use Gson and Kotson
2021-12-12 18:06:04 -05:00
7f998ecdbd Revert download notification icon changes 2021-12-12 11:14:47 -05:00
ecd5414287 Move custom brightness slider to top of filter sheet (closes #6205)
Brightness should be modified more often than the color filter. Since this will always be visible even when the sheet is half expanded, you have a better idea of its effect.
2021-12-11 14:07:18 -05:00
6107f5f3d2 Refactor backup restore process to stop relying on file extension 2021-12-11 13:53:49 -05:00
13afa9f476 Show version name in new update notification 2021-12-11 13:09:16 -05:00
cd87c7e88e Don't preselect any options in library remove manga/downloads dialog (closes #6333)
Since apparently people don't read and either option is considered destructive to different people.
2021-12-11 13:05:13 -05:00
ed4dea8686 Update notification icons
Although no recent version of Android even shows these....
2021-12-11 12:59:05 -05:00
808177f8c9 Add download action to New Chapters Notification (#6336) 2021-12-11 12:51:30 -05:00
aed51251b3 Update AGP and Gradle 2021-12-11 11:24:58 -05:00
1c2730163d Apply dialog theme to Material Alert Dialog Theme (#6340) 2021-12-11 10:16:00 -05:00
0de86dfe6f Fix back button having wrong tint in Toolbar (#6339) 2021-12-11 08:44:05 -05:00
7a1b99be46 Tweak Midnight Dusk colors (#6327)
* tweak midnight dusk colors

* more tweaking and change pure black dark mode option visibility

* revert changing pure black dark mode option visibility

* change tertiary color on light theme to match dark theme
2021-12-09 18:00:43 -05:00
9b64b0139c Check if dynamic colors are available using official API 2021-12-05 11:37:03 -05:00
0a6160d7cf Add sui support (#6318)
* Update shizuku api version

* SettingsAdvanced Controller: Verify if Sui is available
2021-12-05 11:19:37 -05:00
e51a6d332e SourcePreferencesController: Also call onBindEditText listener set by extension (#6310) 2021-12-04 10:52:52 -05:00
a9d2741e6a Automatically set tracker as completed after reading the last chapter (#6289)
* Automatically set tracker as completed after reading the last chapter.

* use integer value in comparison

* also set `started_reading` date

* don't use source manga's status

* remove useless line
2021-12-04 09:59:39 -05:00
12bd7268d2 Remove unnecessary tab style 2021-12-04 09:58:41 -05:00
be0a23d9ad Tabbed bottom sheet adjustments (#6309)
* SimpleNavigationView: Don't set background and elevation

* Add divider for tabs in bottom sheet
2021-12-04 09:57:29 -05:00
458a0e608a Apply elevation overlay to colored navbar (#6308) 2021-12-04 09:57:02 -05:00
32f3a50def Update dependencies 2021-12-02 23:09:38 -05:00
7de4226d80 [skip ci] Update gradle-command-action 2021-11-28 19:08:42 -05:00
6a39c8fc13 Avoid loading available extensions list if it seems too small 2021-11-28 18:29:22 -05:00
dc39669321 Use default snackbar styles (fixes unreadable text)
Sorry AMOLED users, you'll just have to deal with the brief light snackbars.
2021-11-28 15:30:51 -05:00
be4f27028c Throw exceptions if some of the deprecated source methods are used 2021-11-28 15:27:21 -05:00
60e73e2d1f Allow loading extension-lib 1.3
(Which doesn't actually exist yet, but will at some point after the next major release)
2021-11-28 14:55:03 -05:00
e8f284d377 Add convenience extension functions for rate limit interceptors
To be included in extension-lib 1.3 as a replacement for the lib that's currently compiled in tachiyomi-extensions.
2021-11-28 14:41:46 -05:00
3ea3b0bf2e Add UnmeteredSource interface
To be included in extension-lib 1.3 (or whatever it's going to be). This applies to sources like Komga or Lanragi, where large numbers of update/download aren't of concern since they're (usually) self-hosted.
2021-11-28 14:41:03 -05:00
e1a43d2e7d Update dependencies 2021-11-28 14:24:43 -05:00
2e918fe1d6 [skip ci] update issue-moderator-action 2021-11-27 22:33:52 -05:00
601309c7cc Weblate translations (#6179)
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alifian Caesar <alifiancaesar@gmail.com>
Co-authored-by: Anup Pandey <pandeyanup58@gmail.com>
Co-authored-by: Arunava Ghosh <senseiarunava@gmail.com>
Co-authored-by: Blue <bluestuffish@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: FateXBlood <zecrofelix@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Guerilla Girl <tnfgdqzx@guerrillamail.info>
Co-authored-by: Haithem Djabi <zabiz9632@gmail.com>
Co-authored-by: HaruSasaki <aiqusubaru@gmail.com>
Co-authored-by: HeavenShadow <heavenshadow@outlook.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: Italian Translator <nekoxtranslator@etlgr.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jendrej <ejjendrej@gmail.com>
Co-authored-by: Jozef Hollý <j2.00ghz@gmail.com>
Co-authored-by: KasukeLp <kasukelp23@yahoo.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nepx <anandabaskara@outlook.com>
Co-authored-by: Neterskian <neterskian@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pavka <pavel-mosein@yandex.ru>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Raven Neil Ocampo <ocamporavenneil@gmail.com>
Co-authored-by: Rostyslav <info@ubilling.net.ua>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Tom de Groot <ikbeniemanddieheet@gmail.com>
Co-authored-by: Zakhar Timoshenko <vp1984tanki@gmail.com>
Co-authored-by: anenasa <anenasaa@yahoo.com>
Co-authored-by: pepe1987 <killyourpepe@gmail.com>
Co-authored-by: ricardofontao2000 <up201806317@fe.up.pt>
Co-authored-by: sebastians17 <sebastians117.ss@gmail.com>
Co-authored-by: swastik <smokexd676@gmail.com>
Co-authored-by: zm-dksg <zemariadekonincksg@gmail.com>
Co-authored-by: Újvári Marcell <mmarci72@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ar/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/bn/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/el/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es_419/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hu/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/id/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ne/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ru/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sc/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/uk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/vi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alifian Caesar <alifiancaesar@gmail.com>
Co-authored-by: Anup Pandey <pandeyanup58@gmail.com>
Co-authored-by: Arunava Ghosh <senseiarunava@gmail.com>
Co-authored-by: Blue <bluestuffish@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: FateXBlood <zecrofelix@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Guerilla Girl <tnfgdqzx@guerrillamail.info>
Co-authored-by: Haithem Djabi <zabiz9632@gmail.com>
Co-authored-by: HaruSasaki <aiqusubaru@gmail.com>
Co-authored-by: HeavenShadow <heavenshadow@outlook.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: Italian Translator <nekoxtranslator@etlgr.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jendrej <ejjendrej@gmail.com>
Co-authored-by: KasukeLp <kasukelp23@yahoo.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nepx <anandabaskara@outlook.com>
Co-authored-by: Neterskian <neterskian@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pavka <pavel-mosein@yandex.ru>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Raven Neil Ocampo <ocamporavenneil@gmail.com>
Co-authored-by: Rostyslav <info@ubilling.net.ua>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Tom de Groot <ikbeniemanddieheet@gmail.com>
Co-authored-by: Zakhar Timoshenko <vp1984tanki@gmail.com>
Co-authored-by: anenasa <anenasaa@yahoo.com>
Co-authored-by: pepe1987 <killyourpepe@gmail.com>
Co-authored-by: ricardofontao2000 <up201806317@fe.up.pt>
Co-authored-by: sebastians17 <sebastians117.ss@gmail.com>
Co-authored-by: swastik <smokexd676@gmail.com>
Co-authored-by: zm-dksg <zemariadekonincksg@gmail.com>
Co-authored-by: Újvári Marcell <mmarci72@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2021-11-27 13:27:51 -05:00
10ddeeb799 Fix local source cover changing (#6252)
* fix local source cover changing

* Remove unnecessary check for `exists()`

* fix for when there is no thumbnail_url in the db
2021-11-27 12:49:26 -05:00
3463d6c752 MinMaxNumberPicker: Set IME input to use number only (#6286)
* MinMaxNumberPicker: Set IME input to use number only

* MinMaxNumberPicker: Auto disable keyboard input when needed
2021-11-27 12:48:49 -05:00
8acce011b5 fix MAL search novel filter (#6279) 2021-11-25 12:55:52 -05:00
fe9ea50356 Change Tako dark elevation overlay color (#6255) 2021-11-24 17:38:23 -05:00
e6f29ae57f Tweak Teal & Turquoise color for new M3 (#6268)
* Tweak Teal & Turquoise color for new M3

* capitalize

* tweak elevationOverlayColor

* more tweak
2021-11-24 17:38:17 -05:00
6cfd2c510b Fix crash in clear database screen (fixes #6271) 2021-11-24 17:34:39 -05:00
430ff80198 Add tertiary badge in appearance preview (closes #5867) 2021-11-19 17:39:30 -05:00
230fa76d57 Add divider under extension details header 2021-11-19 16:42:28 -05:00
46a4b0e0b6 Partially migrate LocalSource to 1.x methods 2021-11-19 16:42:19 -05:00
5b3cadb7a8 Clean up some tablet dimension values 2021-11-19 14:06:43 -05:00
3153071a8a Update to Conductor 3.1.1 2021-11-19 14:06:11 -05:00
bba7372556 Add ability to clear cookies per-extension (closes #3153) 2021-11-19 11:28:59 -05:00
9fe1a7e2ae Add feature to clear database manga by source (#6241)
* Implement feature to selectively clear manga from database based on it's source

* Code cleanup and refactoring
2021-11-19 11:24:46 -05:00
98822a39d9 Option to clear chapter cache when MainActivity is closed (closes #5651) 2021-11-19 10:50:52 -05:00
a2c830b908 Tweak app theme preference selection (closes #5866) 2021-11-19 10:35:48 -05:00
bdef2cfdfb Replace Resume FAB reveal animation with container transform (#6250) 2021-11-19 10:16:39 -05:00
f229a5e2ec Tweak relative date function (#6249)
* Tweak relative date function

* Cleanup
2021-11-19 10:05:39 -05:00
845e061382 Reinstate elevation overlay (#6243)
* Theme default elevation overlay

* Fix app bar elevation overlay

Elevation overlay is disabled when tabs are visible

* Remove custom elevation overlay in tracking sheet item

* upsi
2021-11-18 10:47:24 -05:00
e7d4eb1ae3 Rework the Library icon for the third time (#6237)
Power outtage made me lose an hour of work sadg
2021-11-18 10:44:56 -05:00
b4ba56bfb4 Update dependencies 2021-11-18 10:42:09 -05:00
25784d1fe5 Clean up ActionMode styles 2021-11-15 10:48:07 -05:00
619eca7a51 Use outlined cards in tracker search 2021-11-15 10:45:04 -05:00
f3d85655a0 Adjust manga genre chip style 2021-11-15 10:44:52 -05:00
9600675677 Adjust CardView styles 2021-11-15 10:11:47 -05:00
ce8a759192 Fix colorFilterActive in Tako theme 2021-11-15 10:11:16 -05:00
88bc0bf613 Adapt App Themes to M3 Color System (#6230)
* Adapt Default theme to M3 color system

* Adapt Dynamic theme to M3 color system

* Adapt Midnight Dusk theme to M3 color system

* Adapt Strawberry Daiquiri theme to M3 color system

* Adapt Yotsuba theme to M3 color system

* Adapt Tako theme to M3 color system

* Adapt Green Apple theme to M3 color system

* Adapt Teal & Turquoise theme to M3 color system

* Adapt Yin & Yang theme to M3 color system

* Remove old theme colors

* Yotsuba theme adjustments

Co-authored-by: ztimms73 <vp1984tanki@gmail.com>

* Green Apple theme adjustments

Co-authored-by: Soitora <10836780+Soitora@users.noreply.github.com>

* Tako theme adjustments

* Midnight Dusk theme adjustments

* Use colorSurfaceVariant for colorControlHighlight

* Nits

Co-authored-by: ztimms73 <vp1984tanki@gmail.com>
Co-authored-by: Soitora <10836780+Soitora@users.noreply.github.com>
2021-11-15 09:53:57 -05:00
b508e4208a Fix library animation lag (#6233) 2021-11-15 09:52:07 -05:00
c74d8cf499 Fix overflowed action toolbar items 2021-11-15 09:51:02 -05:00
a34c2b082f Remove outline from download queue items 2021-11-15 09:50:53 -05:00
ad49a02879 Address some Android lint warnings 2021-11-14 11:16:18 -05:00
e985ffc690 Remove custom tab indicator style
M3 TabLayout has the same style built-in.
2021-11-14 10:52:21 -05:00
6cbb02f02d Adapt M3 Typography (#6228) 2021-11-14 10:23:44 -05:00
c0d0ff66b6 Fix "Check for updates" not working due to time cooldown (#6232)
* Fix "Check for updates" not working due to time cooldown

* Update AppUpdateChecker.kt

Co-authored-by: arkon <arkon@users.noreply.github.com>
2021-11-14 10:23:12 -05:00
1e4d7f8c6e Only allow digits in custom download range dialog (closes #6220) 2021-11-13 10:14:55 -05:00
a8a761aa5f Initial pass of Material 3 styling
Adjustments/fixes to follow.
2021-11-13 10:08:01 -05:00
41952f0215 Added tabletUI option: "Automatic" (#6208)
* added automatic tablet ui option; useful for foldables

* set automatic as default, rename setting

* remove redundant checks

Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>

* remove redundant checks

Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>

* fix defaultValue

Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
2021-11-11 16:32:28 -05:00
bfcc883f01 Update dependencies 2021-11-11 16:25:45 -05:00
39722055f5 Don't auto-download chapters if excluded but no categories selected (fixes #6126) 2021-11-11 16:25:38 -05:00
f85dfa90b8 Remove legacy blue theme
Causing too many theming issues/complexity. This will make the Material 3 transition easier.
2021-11-10 09:15:13 -05:00
0a4163d236 Default to only updating non-completed manga 2021-11-10 09:09:29 -05:00
78de11a9e3 Fix SwipeRefresh initial position in MangaController (#6211)
* Lower position of swipe refresh

* Tweak existing code that sets swipe refresh position
2021-11-07 11:58:45 -05:00
d2fc6d9f44 Use sw720dp for tablet UI threshold 2021-11-07 11:55:18 -05:00
abf31f4a79 Fix cutoff ripple for extension install cancel button 2021-11-07 09:49:40 -05:00
f28dd4f4de Disable some unnecessary build features 2021-11-07 09:20:13 -05:00
55b64899f5 Update dependencies 2021-11-07 09:20:00 -05:00
d4aeeadb26 Avoid crashing when notification channels can't be created/deleted
For example, the application may be launched from a service, where channels cannot be deleted.
2021-11-07 09:11:41 -05:00
7ce0110158 Disable updates badge by default 2021-11-03 09:21:01 -04:00
7c1e55eb7f Update metadata in same scope as the rest of library update (fixes #5702, probably) 2021-11-02 17:27:25 -04:00
27542bc81d Fix crash when updating library whithout manga to update (#6181) 2021-10-31 14:25:32 -04:00
9ebbfb2d90 Clean up local source chapter name cleaning (closes #5969) 2021-10-30 18:36:23 -04:00
701b1ee744 Fix bottom nav sometimes appearing within navbar area 2021-10-30 18:03:29 -04:00
0edc981cd2 Move app and extension update notifications to new channels/group (closes #6168) 2021-10-30 17:42:06 -04:00
da5942b398 Remove unused fast scroll bubble drawable and accidentally committed file 2021-10-30 13:14:34 -04:00
709de81814 Move unread chapters badge setting to General section 2021-10-30 12:48:37 -04:00
90b312a56e Extension "Update all" button (#6171)
Disabled for legacy installer
2021-10-30 12:34:26 -04:00
459759bfe5 Add badge to bottom bar Updates tab indicating how many unread chapter updates are available (#5620)
Co-authored-by: arkon <arkon@users.noreply.github.com>
2021-10-30 12:32:51 -04:00
00817aacfe Remove translations of non-translatable strings 2021-10-30 12:25:18 -04:00
e306eb0874 Weblate translations (#6118)
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alifian Caesar <alifiancaesar@gmail.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Areen Anwar <areenanwar66@gmail.com>
Co-authored-by: Blue <bluestuffish@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hautzii <am.03012002@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jozef Hollý <j2.00ghz@gmail.com>
Co-authored-by: KasukeLp <kasukelp23@yahoo.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Neterskian <neterskian@gmail.com>
Co-authored-by: Nin Gun <luis_noxer@hotmail.es>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rafi <ziomeq65@gmail.com>
Co-authored-by: Resshi <jyxo@centrum.cz>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Soitora <simon.mattila@protonmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: jTnqr <juliuspanjul25@gmail.com>
Co-authored-by: monolifed <monolifed@protonmail.com>
Co-authored-by: sebastians17 <sebastians117.ss@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/el/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es_419/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/id/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ru/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sc/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sdh/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/vi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alifian Caesar <alifiancaesar@gmail.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Areen Anwar <areenanwar66@gmail.com>
Co-authored-by: Blue <bluestuffish@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hautzii <am.03012002@gmail.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: KasukeLp <kasukelp23@yahoo.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Neterskian <neterskian@gmail.com>
Co-authored-by: Nin Gun <luis_noxer@hotmail.es>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rafi <ziomeq65@gmail.com>
Co-authored-by: Resshi <jyxo@centrum.cz>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Soitora <simon.mattila@protonmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: jTnqr <juliuspanjul25@gmail.com>
Co-authored-by: monolifed <monolifed@protonmail.com>
Co-authored-by: sebastians17 <sebastians117.ss@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2021-10-30 12:22:17 -04:00
33a02b47d5 Hide cutout toggle button if fullscreen is off (#6150) 2021-10-30 12:19:15 -04:00
f0a5557e60 Fix storing covers for local manga (#6127)
getCoverFile only returns a cover if it already exists, meaning
the block of code to write it from the inputstream never executes.
If getCoverFile returns null, then use previous behaviour of setting
it to cover.jpg so that if the file doesn't exist it's created
2021-10-30 12:16:29 -04:00
58a871c8cc Allow manga titles to update from source if they are not in library (#6177)
The previous rationale for not allowing manga titles to update (at all) was that it would be confusing for users if a manga's title arbitrarily changed when the source changed it. Presumably, users would care less about this arbitrary change for manga that is not in library, so this provides a path for getting a manga's title updated, and prevents incorrect titles from persisting in the DB for manga that get title updates but aren't in library.
2021-10-30 12:15:48 -04:00
4f56071786 Validate backup during creation 2021-10-28 22:40:53 -04:00
f8b2c79aef Update dependencies 2021-10-28 22:40:53 -04:00
8f00d34b0b Change zoom from 3x to 5x (#6164)
Because some people actually read images with really small text

*I hope they have some extreme high quality pictures else I don't know how they read the raster images*
2021-10-27 23:33:36 -04:00
6129519e5a More sensical string for 'pref_hide_threshold' (#6157) 2021-10-24 10:21:13 -04:00
593091a5e3 Sync view state with controller on activity resume
Hopefully fixes some weird states where the bottom nav shows up when it shouldn't.
2021-10-23 17:30:56 -04:00
22ed163c8f Fix what's new link in dialog 2021-10-23 17:29:27 -04:00
93e2b88d41 Minor cleanup 2021-10-23 17:29:13 -04:00
7cd54dc8f0 Launch the download warning toast in the UI thread
Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
2021-10-23 17:05:34 -04:00
ccd7c8df53 Fix double increment when updating covers (#6138)
* Fix double increment when updating covers

* Remove redundant block
2021-10-20 20:10:55 -04:00
5b3bd3f470 Remove jcenter usage (closes #4387) 2021-10-18 12:39:41 -04:00
bf1b7f44b6 Change tablet UI threshold to w720dp (closes #6054)
Was previously sw720dp. Now matches J2K.
2021-10-18 11:03:27 -04:00
538dd60580 Adjust update/download warnings
- Uses toasts now
- Adjusted wording to emphasize effect on sources
- Download warning has a different threshold (15 chapters per source, vs. 60 entries per source for library update)
2021-10-18 10:46:07 -04:00
f453236840 [6068] - Use semibold text for Browse items primary text (#6087)
* Changing the text on source title (browse items) to semibold and fixing the color of the subtitle on global search

* Updated history_item, updates_item and global_search to not have bold titles

* Changing global_search_controller_card

* Changing back history_item
2021-10-18 10:05:54 -04:00
bfe7aa1ed2 Minor cleanup 2021-10-18 10:02:25 -04:00
9e2ef82902 Remove global update intervals below 12 hours, add every 3 day interval
Users with smaller libraries have a lower change of getting updates frequently. "Power users" are actively hurting sources by updating frequently.
2021-10-18 10:02:18 -04:00
9352e249ee Make tapping library update and backup restore error notifications open log 2021-10-18 09:58:35 -04:00
3800065230 Fix crashing when clicking the search icon (#6128) 2021-10-18 09:57:52 -04:00
ebc2c4f73a Remove paused text when resuming downloads with info hidden (fixes #6119) 2021-10-16 17:40:56 -04:00
f057440cc1 Use natural ordering when sorting by chapter numbers (fixes #6121) 2021-10-16 17:37:51 -04:00
506f9cfca8 Weblate translations (#6047)
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Archie <careless.archie@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Forqen <krecio555@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jendrej <ejjendrej@gmail.com>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Jozef Hollý <j2.00ghz@gmail.com>
Co-authored-by: KasukeLp <kasukelp23@yahoo.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matey Krastev <matey_krastev2@abv.bg>
Co-authored-by: Pedro <pedro-mediavilla@hotmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Rostyslav <info@ubilling.net.ua>
Co-authored-by: Shippo <shiposhouyou@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: jTnqr <juliuspanjul25@gmail.com>
Co-authored-by: monolifed <monolifed@protonmail.com>
Co-authored-by: swastik <smokexd676@gmail.com>
Co-authored-by: turhv jbufv <turhvjbufv@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ar/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/bg/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/el/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es_419/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/he/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/id/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ru/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sc/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/uk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/vi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Archie <careless.archie@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Forqen <krecio555@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jendrej <ejjendrej@gmail.com>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: KasukeLp <kasukelp23@yahoo.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matey Krastev <matey_krastev2@abv.bg>
Co-authored-by: Pedro <pedro-mediavilla@hotmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Rostyslav <info@ubilling.net.ua>
Co-authored-by: Shippo <shiposhouyou@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: jTnqr <juliuspanjul25@gmail.com>
Co-authored-by: monolifed <monolifed@protonmail.com>
Co-authored-by: swastik <smokexd676@gmail.com>
Co-authored-by: turhv jbufv <turhvjbufv@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2021-10-16 12:05:39 -04:00
8a70c3353f Change global update unmetered connection restriction to connected to Wi-Fi (closes #6117) 2021-10-16 11:10:05 -04:00
3d8f123e05 Add notification action to open GitHub release page
Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
2021-10-16 10:42:14 -04:00
a8c8f15e07 Update dependencies 2021-10-16 10:21:25 -04:00
21e647017b Rename app updating classes
So I stop confusing it for updaters of other things.
2021-10-16 10:21:15 -04:00
2a1bb3dc27 Fix reappearing indicator in the History tab (#6105) 2021-10-15 22:14:45 -04:00
55a3094a65 Fix AppBar lift state when snapped (#6103)
status bar foreground alpha is now handled separately
2021-10-15 22:09:19 -04:00
b4490e209b Fix inset not applying when in landscape (#6104)
Reverts inset change from #5997, was changed due to it not changing the padding when using setPadding
2021-10-15 22:08:37 -04:00
9aa676333c Use default source filters in global search (fixes #5583)
Based on 45fbd9d2f5
2021-10-15 22:06:16 -04:00
71b23e57ff [skip ci] Avoid building PRs that only affect Markdown docs or string translations 2021-10-13 09:29:07 -04:00
2c76bc99fc Add ability to copy a genre/tag to clipboard by long-pressing it's chip (#6084)
* Allow copying a genre by long-pressing it's chip

* Make chip click listeners nullable, and only attach if not-null
2021-10-13 09:23:59 -04:00
bb06895145 Fix MangaController fast scroller position (#6090) 2021-10-13 09:23:46 -04:00
684965f3e5 MangaController optimizations (#6089)
* MangaController: Fix ignored stable ids

* MangaController: Replace notifyDataSetChanged

* ChaptersSettingsSheet: Optimizations
2021-10-13 09:23:38 -04:00
e621f4e2fa Add migration to add "all" to enabled langauges
Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
2021-10-13 09:18:43 -04:00
028ea57232 Update missing chapters warning
Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
2021-10-13 09:17:26 -04:00
718fa25c10 Bump queue warning threshold to 60
Aligns with J2K.
2021-10-13 09:16:19 -04:00
90c9f28818 Update AGP 2021-10-13 09:15:46 -04:00
cb9c5a35cb Minor cleanup 2021-10-13 09:13:38 -04:00
fadaefeaef Handle HTTP 403 responses with CloudflareInterceptor
Based on 8d34da591e

Co-authored-by: jmir1 <jmir1@users.noreply.github.com>
2021-10-11 16:12:26 -04:00
b17b882a3b Adjust update/download warning threshold 2021-10-11 16:08:32 -04:00
f0f3afd5f1 Fix issues with NSFW sources setting (#6085) 2021-10-11 13:51:20 -04:00
42026b49bf Allow hiding "All" section in extensions list (closes #6081) 2021-10-11 10:29:08 -04:00
151193c4c3 Reword missing chapters warning (closes #6074) 2021-10-11 10:22:31 -04:00
3448751e0e Fix crash when deleting last item in library (#6079) 2021-10-11 10:17:01 -04:00
aae011ed83 Use SwitchMaterial for preferences too (closes #5724) 2021-10-09 17:47:04 -04:00
c95a269460 Use single layout for grid badges 2021-10-09 17:26:53 -04:00
98c0e5271f Reword badge titles 2021-10-09 17:16:01 -04:00
f343131802 Require authentication to toggle showing NSFW sources 2021-10-09 17:10:04 -04:00
ea34ba53b9 Allow searching for multiple extensions at once (closes #5922) 2021-10-09 16:59:18 -04:00
b8d8cf19d9 Add some info about automatic backups 2021-10-09 16:48:20 -04:00
c9be4093e7 Smaller font size for reader page indicator (closes #6071) 2021-10-09 16:48:02 -04:00
082eef708f Add warnings when library and download queues are considered large (closes #5950)
Arbitrarily set at a size of 100 for now. We could adjust this in the future as appropriate if needed.
2021-10-09 14:55:21 -04:00
9106fc5b94 Grouped chapter download list by source (#5575) 2021-10-09 11:41:45 -04:00
918502742d [5893] - Implemented Language Badge (#6050)
* Implemented language badge on library items

* Added left margin for better viewing the badge on list view

* Adjusting borders on badges, cleaning string interpolation and cleaning code

* Improving readability on Holders and removing unused background and text on grid items
2021-10-09 11:10:36 -04:00
f32f1eeaa5 Manga description adjustments (#6011)
* Manga description adjustments

- Animated state changes
- Adjust scrim position to fully show 2 lines when shrunk
- Set minLines to avoid scrim hiding oneliner

* Change icon and adjust animation

* Revert fancy scrim animation
2021-10-09 11:02:45 -04:00
2d1404d155 Fix Local and Other lang sources showing up in seperate Other Categories (#6024)
* group LocalSource and Other lang source together

* use better kotlin syntactic sugar

* add lang "other" to local

* remove duplicate LocalSource entries in Browse

* linting

* revert unnecessary linting

was a manually adding change

* Revert previous two commit but not the most recent

This reverts commit 30250f2f82fc5e38a1b30c7b55c445efec23a114
This also reversts commit 359ed5a8cda91577216b593a4138280e971e0126

* better way to avoid duplicate Local Sources

* more linting by plugin

* `""` lang is no longer used anywhere
2021-10-09 11:01:22 -04:00
a56997e98c Hide slider tooltip label everywhere 2021-10-09 10:44:08 -04:00
ef918078d1 Update dependencies 2021-10-09 10:40:30 -04:00
7e61900cf5 Add new build type for weekly preview (#6067)
This adds new build type for minified non-debuggable preview builds.
"debugFull" is removed and "debug" will be unminified.

**It means preview build action needs to be updated to build "standardPreview"**
2021-10-09 10:28:43 -04:00
e98f90b099 [6059] - Pending downloads count on Download queue screen (#6064)
* Updating the download queue label to account for pending downloads even on paused state

* changing separator

* Created observer to update the TitleBar of the controller to reflect pending downloads

* Reverting changes from MoreController that were made in an another commit

* Refactoring updateTitle method
2021-10-07 22:13:35 -04:00
2e127dff1f Replace Timber with Square Logcat and make logging configurable (#6062)
* Replace Timber with Square Logcat

* Configurable logger
2021-10-07 22:12:55 -04:00
828db19e02 [5753] - Add pending downloads count on Download queue (#6049)
* Updating the download queue label to account for pending downloads even on paused state

* changing separator
2021-10-06 22:03:07 -04:00
99aa3f5713 Weblate translations (#6046)
Co-authored-by: AHmed HarBy <themagic1093@gmail.com>
Co-authored-by: Afiq Nazrie <afnazrie@gmail.com>
Co-authored-by: Ainārs Lapkovskis <ainarslapkovskis@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Albedo <Illiator27@gmail.com>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alifian Caesar <alifiancaesar@gmail.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Blue <bluestuffish@gmail.com>
Co-authored-by: Christian Elbrianno <christian.elbrianno41@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Druvvaldis <druvvaldisr@gmail.com>
Co-authored-by: Emerson Nunes <emerson.nunes.ds@gmail.com>
Co-authored-by: Emma Jane Bonestell <EmmaJaneBonestell@gmail.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Fernando Sanchez <cheeze.sprinkels@gmail.com>
Co-authored-by: Forqen <krecio555@gmail.com>
Co-authored-by: Francesco Zanella <franzghosts@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hassay Ádám Tamás <hassayadam@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jakub Fabijan <jakubfabijan@tuta.io>
Co-authored-by: Junan Chk <junanchakma2000@gmail.com>
Co-authored-by: K. Sz. Bence <tudi20@protonmail.com>
Co-authored-by: Kaleb <kalebcarvalho1@gmail.com>
Co-authored-by: Krishna Chand <krishna_chand67@naver.com>
Co-authored-by: LoneHash <sameepsk2@gmail.com>
Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Miguel Alexandro Manzano Guerra <kuro_eis@hotmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nishant Bodkhe <nishantbodkhe44@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pedro <pedro-mediavilla@hotmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Redy Apriyadi <redy.apriyadi@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Sieg Jaeger <zekerett@gmail.com>
Co-authored-by: Steven Pedroza <stevenpedroza56@gmail.com>
Co-authored-by: Temporary Person <TemporaryPerson@protonmail.com>
Co-authored-by: Zero O <godarms2010@live.com>
Co-authored-by: ZiomaleQ <r.partyka30@gmail.com>
Co-authored-by: crackheadakira <lasn.mine@gmail.com>
Co-authored-by: dmswd <Bmswad1@gmail.com>
Co-authored-by: julptk <julptk8@gmail.com>
Co-authored-by: monolifed <monolifed@protonmail.com>
Co-authored-by: phannhanhn201 <phannhanhn201@gmail.com>
Co-authored-by: rytis sertvytis <knysliukas2002@gmail.com>
Co-authored-by: soplatnik <jestapom@protonmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: พรหมชัย ชูแสง <promchai2sin@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/aii/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ar/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/bn/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/el/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/eo/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es_419/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hu/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/id/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/jv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/lt/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/lv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/mr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ne/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ru/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sc/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/th/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/vi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: AHmed HarBy <themagic1093@gmail.com>
Co-authored-by: Afiq Nazrie <afnazrie@gmail.com>
Co-authored-by: Ainārs Lapkovskis <ainarslapkovskis@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Albedo <Illiator27@gmail.com>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alifian Caesar <alifiancaesar@gmail.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Blue <bluestuffish@gmail.com>
Co-authored-by: Christian Elbrianno <christian.elbrianno41@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Druvvaldis <druvvaldisr@gmail.com>
Co-authored-by: Emerson Nunes <emerson.nunes.ds@gmail.com>
Co-authored-by: Emma Jane Bonestell <EmmaJaneBonestell@gmail.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Fernando Sanchez <cheeze.sprinkels@gmail.com>
Co-authored-by: Forqen <krecio555@gmail.com>
Co-authored-by: Francesco Zanella <franzghosts@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hassay Ádám Tamás <hassayadam@gmail.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jakub Fabijan <jakubfabijan@tuta.io>
Co-authored-by: Junan Chk <junanchakma2000@gmail.com>
Co-authored-by: K. Sz. Bence <tudi20@protonmail.com>
Co-authored-by: Kaleb <kalebcarvalho1@gmail.com>
Co-authored-by: Krishna Chand <krishna_chand67@naver.com>
Co-authored-by: LoneHash <sameepsk2@gmail.com>
Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Miguel Alexandro Manzano Guerra <kuro_eis@hotmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nishant Bodkhe <nishantbodkhe44@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pedro <pedro-mediavilla@hotmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Redy Apriyadi <redy.apriyadi@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Sieg Jaeger <zekerett@gmail.com>
Co-authored-by: Steven Pedroza <stevenpedroza56@gmail.com>
Co-authored-by: Temporary Person <TemporaryPerson@protonmail.com>
Co-authored-by: Zero O <godarms2010@live.com>
Co-authored-by: ZiomaleQ <r.partyka30@gmail.com>
Co-authored-by: crackheadakira <lasn.mine@gmail.com>
Co-authored-by: dmswd <Bmswad1@gmail.com>
Co-authored-by: julptk <julptk8@gmail.com>
Co-authored-by: monolifed <monolifed@protonmail.com>
Co-authored-by: phannhanhn201 <phannhanhn201@gmail.com>
Co-authored-by: rytis sertvytis <knysliukas2002@gmail.com>
Co-authored-by: soplatnik <jestapom@protonmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: พรหมชัย ชูแสง <promchai2sin@gmail.com>
2021-10-05 11:09:05 -04:00
1a568e2961 Fix stuck display mode for when not using per category setting (#6044) 2021-10-05 11:03:51 -04:00
e863e8c64b Adjust Wi-Fi connection check (related to #6038) 2021-10-04 17:06:24 -04:00
f5b591430c Release v0.12.3 2021-10-04 15:55:06 -04:00
8cfaf8eb51 Weblate translations (#5913)
Co-authored-by: AHmed HarBy <themagic1093@gmail.com>
Co-authored-by: Ainārs Lapkovskis <ainarslapkovskis@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Albedo <Illiator27@gmail.com>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alifian Caesar <alifiancaesar@gmail.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Blue <bluestuffish@gmail.com>
Co-authored-by: Christian Elbrianno <christian.elbrianno41@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Druvvaldis <druvvaldisr@gmail.com>
Co-authored-by: Emerson Nunes <emerson.nunes.ds@gmail.com>
Co-authored-by: Emma Jane Bonestell <EmmaJaneBonestell@gmail.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Fernando Sanchez <cheeze.sprinkels@gmail.com>
Co-authored-by: Forqen <krecio555@gmail.com>
Co-authored-by: Francesco Zanella <franzghosts@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hassay Ádám Tamás <hassayadam@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jakub Fabijan <jakubfabijan@tuta.io>
Co-authored-by: Junan Chk <junanchakma2000@gmail.com>
Co-authored-by: K. Sz. Bence <tudi20@protonmail.com>
Co-authored-by: Kaleb <kalebcarvalho1@gmail.com>
Co-authored-by: Krishna Chand <krishna_chand67@naver.com>
Co-authored-by: LoneHash <sameepsk2@gmail.com>
Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Miguel Alexandro Manzano Guerra <kuro_eis@hotmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nishant Bodkhe <nishantbodkhe44@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pedro <pedro-mediavilla@hotmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Redy Apriyadi <redy.apriyadi@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Sieg Jaeger <zekerett@gmail.com>
Co-authored-by: Steven Pedroza <stevenpedroza56@gmail.com>
Co-authored-by: Temporary Person <TemporaryPerson@protonmail.com>
Co-authored-by: Zero O <godarms2010@live.com>
Co-authored-by: ZiomaleQ <r.partyka30@gmail.com>
Co-authored-by: crackheadakira <lasn.mine@gmail.com>
Co-authored-by: dmswd <Bmswad1@gmail.com>
Co-authored-by: julptk <julptk8@gmail.com>
Co-authored-by: monolifed <monolifed@protonmail.com>
Co-authored-by: phannhanhn201 <phannhanhn201@gmail.com>
Co-authored-by: rytis sertvytis <knysliukas2002@gmail.com>
Co-authored-by: soplatnik <jestapom@protonmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: พรหมชัย ชูแสง <promchai2sin@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/aii/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ar/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/bn/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/el/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/eo/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es_419/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hu/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/id/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/jv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/lt/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/lv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/mr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ne/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ru/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sc/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/th/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/vi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: AHmed HarBy <themagic1093@gmail.com>
Co-authored-by: Ainārs Lapkovskis <ainarslapkovskis@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Albedo <Illiator27@gmail.com>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alifian Caesar <alifiancaesar@gmail.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Blue <bluestuffish@gmail.com>
Co-authored-by: Christian Elbrianno <christian.elbrianno41@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Druvvaldis <druvvaldisr@gmail.com>
Co-authored-by: Emerson Nunes <emerson.nunes.ds@gmail.com>
Co-authored-by: Emma Jane Bonestell <EmmaJaneBonestell@gmail.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Fernando Sanchez <cheeze.sprinkels@gmail.com>
Co-authored-by: Forqen <krecio555@gmail.com>
Co-authored-by: Francesco Zanella <franzghosts@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hassay Ádám Tamás <hassayadam@gmail.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jakub Fabijan <jakubfabijan@tuta.io>
Co-authored-by: Junan Chk <junanchakma2000@gmail.com>
Co-authored-by: K. Sz. Bence <tudi20@protonmail.com>
Co-authored-by: Kaleb <kalebcarvalho1@gmail.com>
Co-authored-by: Krishna Chand <krishna_chand67@naver.com>
Co-authored-by: LoneHash <sameepsk2@gmail.com>
Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Miguel Alexandro Manzano Guerra <kuro_eis@hotmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nishant Bodkhe <nishantbodkhe44@gmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pedro <pedro-mediavilla@hotmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Redy Apriyadi <redy.apriyadi@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Sieg Jaeger <zekerett@gmail.com>
Co-authored-by: Steven Pedroza <stevenpedroza56@gmail.com>
Co-authored-by: Temporary Person <TemporaryPerson@protonmail.com>
Co-authored-by: Zero O <godarms2010@live.com>
Co-authored-by: ZiomaleQ <r.partyka30@gmail.com>
Co-authored-by: crackheadakira <lasn.mine@gmail.com>
Co-authored-by: dmswd <Bmswad1@gmail.com>
Co-authored-by: julptk <julptk8@gmail.com>
Co-authored-by: monolifed <monolifed@protonmail.com>
Co-authored-by: phannhanhn201 <phannhanhn201@gmail.com>
Co-authored-by: rytis sertvytis <knysliukas2002@gmail.com>
Co-authored-by: soplatnik <jestapom@protonmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: พรหมชัย ชูแสง <promchai2sin@gmail.com>
2021-10-04 15:41:54 -04:00
675c0cefc3 Fix crash in single-page chapters 2021-10-04 11:06:23 -04:00
1a52385b78 Formatting 2021-10-04 10:50:13 -04:00
372e500590 Remove extra padding when using list with Per Category setting (#5997)
* Remove padding when using list with Per Category setting (fixes #5636)

* Add view type to RecyclerViewPagerAdapter

Correctly this time (ノ◕ヮ◕)ノ*:・゚✧

* Minor tweaks
2021-10-04 10:41:20 -04:00
cc1a317439 enable "ALL" in Browse by default (#6023)
some extensions, including self-hosted ones, have the "ALL" label and
sometimes users get confused with not having enabled "ALL" after
installing new extensions
2021-10-03 15:40:51 -04:00
6d650518a1 App-wide typography adjustments (#5931)
* Manga detail

Also adjust chapter item layout to accommodate bigger
display/font size

* Library

* Updates

* History

* Browse

* Preferences

* Button

* Navigation view

* category-download

* Google Sans

* Reader

* Chips

* Revert "Google Sans"

This reverts commit 5dd4c41f

* Misc

* Cleanups

* Section header text appearance

* Increase library manga title size

* Revert "Increase library manga title size"

This reverts commit 474be913

* Increase section header letter spacing

* Derps
2021-10-03 12:32:04 -04:00
7940117577 Sort and remove duplicates in genres (#6021)
* Sort and remove duplicates in genres

Co-authored-by: ivaniskandar <12537387+ivaniskandar@users.noreply.github.com>

* Remove Sort and filter out blank genre

Co-authored-by: ivaniskandar <12537387+ivaniskandar@users.noreply.github.com>
2021-10-03 12:19:37 -04:00
b0f87fdd21 LicensesController: Move item init to IO thread (#6020) 2021-10-03 12:00:00 -04:00
dc92ffed87 Switch to Material Slider in color filter settings 2021-10-03 11:58:52 -04:00
4af578e310 Apply navigation bar insets to fast scroller and settings search list (#6015) 2021-10-03 11:28:20 -04:00
e22825d818 Check if wifi is connected rather than enabled while downloading. (#5967)
* Fixxy Wixxy

* Downgrade check from Android S to Android Q
2021-10-03 11:27:56 -04:00
e2da6259e7 Update AboutLib plugin 2021-10-03 11:14:56 -04:00
d149017c60 Switch to Material Slider for reader seekbar
Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
2021-10-03 11:14:49 -04:00
afc400121b Update dependencies 2021-10-01 18:28:02 -04:00
ef993515c6 Fix MangaController toolbar title showing when editing category (#6005) 2021-10-01 17:52:06 -04:00
edb1d21ddc Don't bury sort menu in overflow in Migrate screen 2021-10-01 17:41:14 -04:00
ba8abd94a8 Ability to order sources by library count when migrating (#6000)
* order sources by library count when migrating (closes #4703)

* Use plain menu instead of full-on sheet
2021-10-01 17:37:43 -04:00
c6d4e4c15f Move extensions enabled languages on top (closes #5694) (#5998) 2021-10-01 09:15:04 -04:00
09f0ac866f Fix incorrect appbar lift state when opening MangaController in hidden state (#5990) 2021-10-01 09:13:00 -04:00
7ed25704d6 Add chapter bookmarking feature to Updates screen (#5984) 2021-10-01 08:11:31 -04:00
2196dac63e Fix variable name in isOnline (#5991) 2021-10-01 08:09:46 -04:00
c8f70efded ReaderActivity: Block focus on viewer (#5996) 2021-10-01 08:09:36 -04:00
ea97488670 Revert parseAs inline function change
Some people sometimes get compile issues?
2021-09-30 17:52:07 -04:00
c2255b0a0f Mark installer names as non-translatable 2021-09-25 21:08:31 -04:00
f754b081ce Use data class to parse extensions list 2021-09-25 14:57:54 -04:00
07771cb5e4 Update kotlinx.serialization 2021-09-25 14:41:48 -04:00
690d8e43ae Show message in migrate screen if library is empty 2021-09-25 14:41:35 -04:00
82f14a7d59 Hide soft keyboard after submitting search query throughout app (#5837)
* Clear focus from SearchView when submitting a search query in BrowseSourceController

* Revert "Clear focus from SearchView when submitting a search query"

* Implement SearchView focus clearing in Tachiyomi's subclass to enable feature throughout app

* Add support for keyboard Enter key

Pressing enter on a keyboard (when using the emulator for example) now also submits the query
2021-09-25 14:32:19 -04:00
b284384f0a Implement new extension install methods (#5904)
* Implement new extension install methods

* Fixes

* Resolve feedback

* Keep pending status when waiting to install

* Cancellable installation

* Remove auto error now that we have cancellable job
2021-09-25 14:31:52 -04:00
1ae0d1b5d0 Reattach after slight delay instead on every db update (#5956) 2021-09-23 18:45:55 -04:00
9de08c8166 Update dependencies 2021-09-20 14:33:35 -04:00
a2d007f2a9 Toolbar and bottom nav scroll snap (#5915) 2021-09-18 16:41:23 -04:00
774f818bbb Fix setting search re-animating on activity recreation (fixes #5882) 2021-09-18 16:28:58 -04:00
0ec7121b8f Adjust snackbar durations (closes #5932) 2021-09-18 16:17:07 -04:00
d7d46f4447 Minor cleanup 2021-09-18 16:13:14 -04:00
45fad147bf Remove spaces at end of line before removing multiple new lines (#5928) 2021-09-18 15:16:03 -04:00
3664195c71 rewrite getFormat the kotlin way (#5930) 2021-09-18 15:15:38 -04:00
fce3cd00a1 Remove setting to disable update error notifications and split out notification channel
Users can exclude things from updating if needed, or disable the notification channel from system settings.
2021-09-17 19:14:30 -04:00
33b3be0d0e Move extension app info button
Aligns with TachiyomiJ2K.
2021-09-16 17:57:41 -04:00
cfd1b4a6c6 Fix toolbar title alpha (#5910) 2021-09-16 17:39:13 -04:00
d45fefd6f0 handle maxNumberSort from API (#5917) 2021-09-16 17:37:42 -04:00
f125ab01ee Change how the bottom navigation is hidden (#5823)
* Change how the bottom navigation is hidden

Modifies the translationY instead of the height.

* Cleanups
2021-09-16 17:37:17 -04:00
be001d090c [skip ci] Update issue closer to ignore myanimelist (#5911)
Not sure if there's any limitation for the regex but this will ignore myanimelist strings, in practice.
2021-09-14 11:50:21 -04:00
971d8a7e40 Allow preferences to multi-line (#5905) 2021-09-13 18:39:14 -04:00
a2cf210a52 Unify NSFW flagging for sources/extensions
Since multisource extensions are no longer a thing, we now simply rely on the flag at the extension level, i.e. the per-Source/SourceFactory `@Nsfw` annotation is no longer checked.
We'll have to remove all of the annotation usages from the existing sources, which will also effectively break the setting for older versions of the app.
2021-09-13 17:49:58 -04:00
3eec207166 Release v0.12.2 2021-09-13 15:10:41 -04:00
b5d83bdb56 Weblate translations (#5852)
Co-authored-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Co-authored-by: Ahmed gamal <12355.ahmedgamal.com@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Forqen <krecio555@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Jozef Hollý <j2.00ghz@gmail.com>
Co-authored-by: Long Nguyễn Khánh <khanhlong17112000@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Maciej Sładkiewicz <krecio555@gmail.com>
Co-authored-by: Madddog1997 <madddog1997@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Nguyễn Thanh Bình <sikea0801@gmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rocco Casadei <roccobot@gmail.com>
Co-authored-by: Scoop <Scoo0p@yandex.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Tymofii Lytvynenko <till.svit@gmail.com>
Co-authored-by: monolifed <monolifed@protonmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ar/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ca/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/el/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ru/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sc/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/uk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/vi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Co-authored-by: Ahmed gamal <12355.ahmedgamal.com@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Forqen <krecio555@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Long Nguyễn Khánh <khanhlong17112000@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Madddog1997 <madddog1997@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Nguyễn Thanh Bình <sikea0801@gmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rocco Casadei <roccobot@gmail.com>
Co-authored-by: Scoop <Scoo0p@yandex.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Tymofii Lytvynenko <till.svit@gmail.com>
Co-authored-by: monolifed <monolifed@protonmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2021-09-13 15:05:24 -04:00
2c495c4119 Don't count "other" as a language. (#5901) 2021-09-13 15:05:12 -04:00
7c72d6cb7c Fix scroller getting dragged incorrectly in RTL (fixes #5496) 2021-09-12 13:08:21 -04:00
8362bf0886 Don't show option to delete chapters for local manga (closes #5243) 2021-09-12 13:01:53 -04:00
1a8155c45b Add link to help translate in about 2021-09-12 12:52:19 -04:00
3f2f946019 Update ExtensionPresenter.kt (#5895) 2021-09-12 09:34:37 -04:00
2c14a8dee1 Minor cleanup for download delete exclusion 2021-09-11 18:39:34 -04:00
917a283bd1 Fix manga info expand button background 2021-09-11 18:36:49 -04:00
3e403d5ab3 Opt out of WebView metrics and disable Google Safe Browsing
cf. https://developer.android.com/guide/webapps/managing-webview
2021-09-11 18:29:55 -04:00
746d35b52b Reuse reader's image view in MangaFullCoverDialog (#5824)
* MangaFullCoverDialog: Support animated drawable

* Scaled zoom duration

* Wrap reader's image view to be reused in MangaFullCoverDialog

* Cleanups

* Forgot animated stuff for webtoon view

* Cleanups

* Oopsie

* Cleanups

* Consistent max scale for SubsamplingScaleImageView

The max scale will be obtained from the default scale times 3 for
consistent 3x zoom scale.
2021-09-11 18:28:54 -04:00
9a7a03e327 Change ProtoNumber of Backup Models for History and Source to a non-zero digit (#5849)
* Change ProtoNumber of Backup Models for History and Source to non-zero

Changed BackupHistory url and BackupSource name properties

* Provide backwards compatibility to current proto backups

- Added data class for zero-based protoNumber
- Restore both 'new' proto and old ones by mapping old to 'new' proto format
- Thanks to @jobobby04  for providing the initial solution.

* Fix on createBackup missing parameter for brokenSource

* Fix issues on build

* Fix missing import on FullBackupRestore
2021-09-11 18:10:10 -04:00
a051079c6a Allow exclusion on Delete After Read per category (#5857)
* Added the exclude category from delete after being read

* Stopped it from adding a wildcard to the import

* Placed the remove after read to the download manager
2021-09-11 18:09:24 -04:00
7b3c18bb97 Less hacky way to make sure bottom action toolbar doesn't scroll down (#5871)
* Less hacky way to make sure bottom action toolbar doesn't scroll down

* Fix action toolbar overlapping on landscape

* Disable app bar transparency when ActionMode is present
2021-09-11 10:22:01 -04:00
52daf3d58c During migration, only do MangaController replacement if previous controller is also MangaController (#5869)
If previous controller is instead a MigrationController/other, push the new MangaController onto the stack instead
2021-09-11 10:21:12 -04:00
f41bde5ee1 MangaController: Fix listeners cancelled when pushing new controller within (#5883) 2021-09-11 10:20:52 -04:00
6151318ac1 use chapter_number instead of ordinal index for syncChaptersWithTrackServiceTwoWay (#5846)
use v2 api for Komga tracker for series
2021-09-09 21:07:16 -04:00
b45c322729 MangaController: Title fixes (#5879)
* MangaController: Move toolbar's TextView reference to ElevationAppBarLayout

* MangaController: Update title alpha earlier when exiting
2021-09-09 21:05:41 -04:00
b00e8768dc Disable action mode status bar guard (#5872) 2021-09-09 21:03:53 -04:00
156feb6e8e Use "isOnline" utils in DownloadService (#5863)
* Use isOnline

* when -> if/else
2021-09-06 12:31:03 -04:00
e942b8a402 Read from streams for local source manga details and legacy backups 2021-09-06 11:54:00 -04:00
abdb67a123 Remove the remaining MotionLayout (#5854)
* Remove the remaining MotionLayout

* Use ImageButton instead of Blank View to handle taps in dead area

And some tweaks
2021-09-06 11:46:38 -04:00
ee20787c5e Retain GLUtil.maxTextureSize 2021-09-05 14:34:54 -04:00
ec4e631760 Clean up some companion object usages 2021-09-05 14:34:29 -04:00
02b430a5bf Skip bookmark check when cancelling downloads (#5853)
* Skip bookmark check when cancelling downloads

* DownloadManager: simplified filteredChapters declaration

* Completed documentation of DownloadManager's deleteChapters()
2021-09-04 22:43:56 -04:00
7878053df2 Fix crash in settings search (fixes #5855) 2021-09-04 22:31:25 -04:00
12a593c3c6 Ensure all fields in new migrated manga are persisted (fixes #5848) 2021-09-04 19:05:43 -04:00
6b1f130750 Adjust padding of themes preference 2021-09-04 18:55:51 -04:00
bde4c0a648 Avoid multiline library badges
Related to #5725
2021-09-04 18:51:30 -04:00
5ae4621da1 Queue tracking updates when offline (closes #1497)
Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
2021-09-04 16:37:35 -04:00
5ea8d0546e Fix chapters getting deleted when marking as unread from library (fixes #5755) 2021-09-04 15:29:13 -04:00
8a064c118f Minor cleanup 2021-09-04 15:27:37 -04:00
2f91c27df2 Don't allow focus on reader containers (closes #5727) 2021-09-04 15:23:00 -04:00
763bd54707 Hide language tag when only one language is used (#5834)
* Hide lang tag when only one lang used

* Comment the code

Can't be too useless and do nothing, Ghostbear practically wrote the entire PR for me

* Exclude 'all' from counting as a language

Co-Authored-By: Andreas <6576096+ghostbear@users.noreply.github.com>

* Use existing Preferences directly from Presenter

* Replace regex with an existing value

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
2021-09-04 15:04:40 -04:00
0ea3cc7ce4 Weblate translations (#5670)
Co-authored-by: Ahmed gamal <12355.ahmedgamal.com@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alifian Caesar <alifiancaesar@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Gianna E <giannela.e@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: IRFAN SHADIK <irfanshadikofficial@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jendrej <ejjendrej@gmail.com>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: KIRA <belguareh1@gmail.com>
Co-authored-by: Karlo Orioli <korioli1@gmail.com>
Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
Co-authored-by: Lyaiya <hipsnafoha@outlook.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Marian Leontiev <leontievmarian@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Nikita Epifanov <nikgreens@protonmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Rostyslav <info@ubilling.net.ua>
Co-authored-by: Samuel Carvalho de Araújo <samuelnegro12345@gmail.com>
Co-authored-by: Sebastian Skoczek <sebastians17@onet.pl>
Co-authored-by: Sebs11_B <chevabermudezcastillo@gmail.com>
Co-authored-by: Shippo <shiposhouyou@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Tmp341 <tmp341@gmail.com>
Co-authored-by: Tymofii Lytvynenko <till.svit@gmail.com>
Co-authored-by: Wise <phxwise@gmail.com>
Co-authored-by: Zakhar Timoshenko <vp1984tanki@gmail.com>
Co-authored-by: Zero O <godarms2010@live.com>
Co-authored-by: anenasa <anenasaa@yahoo.com>
Co-authored-by: dmswd <Bmswad1@gmail.com>
Co-authored-by: monolifed <monolifed@protonmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: 신민준 <sinmin70@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ar/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/be/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/bn/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/el/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es_419/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/hr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/id/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ko/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ru/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sc/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/uk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ahmed gamal <12355.ahmedgamal.com@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alifian Caesar <alifiancaesar@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eric <spice2wolf@gmail.com>
Co-authored-by: Gianna E <giannela.e@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: IRFAN SHADIK <irfanshadikofficial@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jendrej <ejjendrej@gmail.com>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: KIRA <belguareh1@gmail.com>
Co-authored-by: Karlo Orioli <korioli1@gmail.com>
Co-authored-by: Luna Jernberg <droidbittin@gmail.com>
Co-authored-by: Lyaiya <hipsnafoha@outlook.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Marian Leontiev <leontievmarian@gmail.com>
Co-authored-by: Matyáš Caras <contact@hernikplays.cz>
Co-authored-by: Nikita Epifanov <nikgreens@protonmail.com>
Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Rostyslav <info@ubilling.net.ua>
Co-authored-by: Samuel Carvalho de Araújo <samuelnegro12345@gmail.com>
Co-authored-by: Sebastian Skoczek <sebastians17@onet.pl>
Co-authored-by: Sebs11_B <chevabermudezcastillo@gmail.com>
Co-authored-by: Shippo <shiposhouyou@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Tmp341 <tmp341@gmail.com>
Co-authored-by: Tymofii Lytvynenko <till.svit@gmail.com>
Co-authored-by: Wise <phxwise@gmail.com>
Co-authored-by: Zakhar Timoshenko <vp1984tanki@gmail.com>
Co-authored-by: Zero O <godarms2010@live.com>
Co-authored-by: anenasa <anenasaa@yahoo.com>
Co-authored-by: dmswd <Bmswad1@gmail.com>
Co-authored-by: monolifed <monolifed@protonmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: 신민준 <sinmin70@gmail.com>
2021-09-04 12:05:25 -04:00
0de3558ab3 Retain scroll position when selecting app theme preference
Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
2021-09-04 11:58:44 -04:00
069f4e12d8 Rearrange themes, rename "Blue" to "Legacy Blue" 2021-09-04 11:50:00 -04:00
ae4dfc9956 Reword advanced tablet UI setting 2021-09-04 11:22:17 -04:00
ee711dc0fb Edit mangas' Categories in Library using TriState list (#5422)
* Use QuadState Categories to edit mangas in Library

Add updateMangasToCategories to build build correct Categories list for
  each manga using Common and Mix list
Update QuadState Multi-Choice to either Action or Display List
  Display list would have different state sequece from Action
  Uncheck-> Indeterminate (only if initial so)-> Check

fixup manga categories logic as Windows and push request comments

* fixup: Use QuadStateTextView.State enum

Update function to use  QuadStateTextView.State enum that missed in last change

* fixup: missing closing bracket and type cast

Co-authored-by: quangkieu <quangkieu1993@gmail.com>
2021-09-04 11:13:19 -04:00
c316e7faab Migrate to flow version of ReactiveNetwork 2021-09-04 10:38:12 -04:00
7083b3d912 Don't show update progress notifications if job isn't active anymore (closes #5844) 2021-09-04 10:24:55 -04:00
2d3a1b6a9e Update dependencies 2021-09-04 10:09:33 -04:00
0df23ab878 Tablet UI override (#5830)
* Tablet UI override

* Tablet UI advanced pref
2021-09-04 10:06:56 -04:00
7ed8de2ef4 Remove autoSizeText (#5850)
Apparently it produces unexpected results in combination with 'wrap_content'.
2021-09-04 10:05:24 -04:00
d935e22f0d Add status icons to manga info (#5832)
* Add icons to manga status

* Slightly better formatting

Mixed in with a dose of syntactic sugar

* Remove unnecessary lines

I think they are, at least

* Change according to review comments

- Fix forgotten Tablet code removal
- Change 'android:background' to 'app:srcCompat'

* Adjust size of icon

Smaller and more fitting to the environment
2021-09-02 17:57:54 -04:00
0e26abf7a6 Use ShapeableImageView for rounded thumbnails instead of Coil transformations 2021-08-31 22:35:52 -04:00
59aef13200 Improve placement of manga title section (#5796)
Also makes content expand logically through the help of constraint barriers.
2021-08-31 17:53:37 -04:00
9d1f6c4416 Update Material Components 2021-08-31 17:51:24 -04:00
b9f7660a91 Added a getting started guide action for when the library is empty
Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
2021-08-31 17:51:15 -04:00
18b5250ed1 Fix MangaController's loading view initial position (#5827)
Make sure the loading view is hidden before updating the offset.
2021-08-31 17:49:57 -04:00
f683f21ee2 Trim line breaks in manga info only when collapsed (#5818)
* don't trim newlines if summary expanded

* move description trim logic to separate function

* logic error oops

* let's try something

* fix bug on first load

makes it so that, description text is trimmed when entering manga from
library

Co-authored-by: Andreas <andreas.everos@gmail.com>

Co-authored-by: Andreas <andreas.everos@gmail.com>
2021-08-31 17:44:33 -04:00
bd033db84c Fix animated image detection (#5826) 2021-08-31 17:43:29 -04:00
ab036312a4 Handle small cover better (#5815) 2021-08-29 11:13:48 -04:00
634da15191 Update kitsu to not show "null" for empty descriptions
(cherry picked from commit e6ea530532523ed033fd232fcea2da8f17b973f7)
2021-08-29 10:03:40 -04:00
cea1720ea0 Make appearance settings searchable (fixes #5814) 2021-08-29 09:53:36 -04:00
3f2f542265 Fix divider color in AMOLED mode (fixes #5778) 2021-08-28 17:41:36 -04:00
b77edb2b5b Fix crash when tapping title of "App theme" preference 2021-08-28 17:31:30 -04:00
1b699bb814 Fix reader action sheet not opening 2021-08-28 17:24:42 -04:00
333c035fed Clean up reader action sheet layout 2021-08-28 17:22:41 -04:00
ce29914c56 Update build release wording 2021-08-28 17:22:28 -04:00
70e5361146 Update save icon 2021-08-28 16:59:44 -04:00
e7d6dfff53 Replace MotionLayout with full screen dialog (#5806)
* Remove MotionLayout and add full screen dialog for enlarged cover

* Address some of the review comments
2021-08-28 16:53:59 -04:00
eebfad5a95 Register TachiyomiImageDecoder after built-in Coil decoders
Not sure if this is related to #5702.
2021-08-28 12:29:11 -04:00
77c0a93ac6 Tweak theme preference item UI 2021-08-28 12:28:15 -04:00
63a3e126b3 Rename Layout category to Navigation 2021-08-28 12:08:11 -04:00
3ea84cf0ce Add IME_FLAG_NO_PERSONALIZED_LEARNING flag to text input when incognito is enabled (#5801)
* Add IME_FLAG_NO_PERSONALIZED_LEARNING flag to text input when incognito is enabled

Tested with Gboard only.

* Revert "Add IME_FLAG_NO_PERSONALIZED_LEARNING flag to text input when incognito is enabled"

This reverts commit 068399db

* Add IME_FLAG_NO_PERSONALIZED_LEARNING flag to text inputs when incognito is enabled

Source preference is not affected.

* Source preference stuff
2021-08-28 12:06:29 -04:00
7fa80ae556 Only update chapter/viewer flags for library manga instead of everything (addresses #5809) 2021-08-28 12:02:08 -04:00
925f71af15 Clean up track button changes 2021-08-28 11:19:38 -04:00
c666dd623d Tracking: replace tick with button (#5768)
* make check only visible after selecting an item

* replace tick with button and send to bottom

* fixed button visibility

* grey btn out

* resolving some bits

* removing the tick from appbar

* remove useless lines, appl insetter
2021-08-28 11:13:09 -04:00
2cd8733212 change Track.last_chapter_read to Float (#5802)
each TrackService can convert it to Int if decimal chapters are not supported
2021-08-28 10:37:45 -04:00
4b2a9bc621 Clean up imports 2021-08-27 16:45:59 -04:00
12a9d0575d Use more Compat utilities (#5786)
* Use ActivityCompat.recreate

* Use more KTX extensions

* Use PackageInfoCompat.getLongVersionCode

* Remove unnecessary compat usages
2021-08-27 16:33:12 -04:00
edcfa28b0b Tweak theme preference item UI (closes #5805) 2021-08-27 16:25:03 -04:00
3155829994 Replace Wi-Fi connection check with WifiManager
Previous implementation couldn't detect Wi-Fi connection while using a VPN.
2021-08-27 15:41:47 -04:00
d25707554e Fix shadow behind the Expand Info icon (#5804) 2021-08-27 15:34:41 -04:00
38df44ef4b Fix crash caused by missing line in #5794 (#5803)
Co-Authored-By: Andreas <6576096+ghostbear@users.noreply.github.com>

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
2021-08-27 14:05:09 -04:00
df683375b1 Apply system animation scale to parts of Tachiyomi that don't respect it by default (#5794)
* Add initial code for scaling animations, apply scale to reader nav overlay

* Rename extension function, apply system animator scale to ActionToolbar

* Apply system animator scale to expanding manga cover animation

* Apply system animator scale to image crossfade (also disables animated covers when browsing)

* Add documentation, make MotionScene Transition comment a bit more clear

* Disable animated covers in MangaInfoHeaderAdapter if animator duration scale is 0

* Disable animated covers in Library if animator duration scale is 0

* Convert loadAny listener to extension function
2021-08-27 08:44:09 -04:00
cc3cbbc4bb Update Kotlin and Kotlinter 2021-08-26 22:13:53 -04:00
6922394b8e Replace NetworkInfo with NetworkCapabilities (#5785) 2021-08-26 22:09:40 -04:00
24fd82d773 Use NotificationChannelCompat utilities (#5781) 2021-08-26 22:08:27 -04:00
57aefcd917 New manga info expander (#5771)
* Replace "More" with Arrows

We used to have arrows but it was set away from the description which took a lot of space.

It was changed to "More" text, but with the recent design changes I think it'd look better to get a mix between them both.

* Properly align icons

Co-Authored-By: Andreas <6576096+ghostbear@users.noreply.github.com>

* Expand support to Tablets

Get it... expand... hehe 😎

* Fix expanded width

Also fixes so that the constraint for the toggleLess is dependant on the right thing

* Give info toggles its own space

Uses its own margin now to push info rather than just being attached as a info margin.

* Remove weird duplicates I did not add

I did not add these but I don't see a reason to keep dupes

* Add bottom scrim

* Change to centered arrow under info

Anyone wanna experiment/build on top off then feel free to tweak

* Add background glow to icon for contrast

Co-Authored-By: Andreas <6576096+ghostbear@users.noreply.github.com>

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
Co-authored-by: Andreas <andreas.everos@gmail.com>
2021-08-26 22:07:30 -04:00
b3854ad382 Fix reader crash on Android 9 (#5789)
* Fix failed reader context creation on v28

* Re-apply the reader styles manually after overriding night mode

This commit replaces the ThemeCompat.rebase() call since the private API used is
in dark greylist max target P, thus making it unreachable.

* Revert "Fix failed reader context creation on v28"

This reverts commit 6e2104d7
2021-08-25 17:27:34 -04:00
5f5fc77877 Fix toolbar text color in light blue theme 2021-08-23 17:31:16 -04:00
0493e77cff Split out appearance settings from general section 2021-08-23 12:24:30 -04:00
6240fe1dfc Update app theme preference UI
Heavily influenced by TachiyomiJ2K.
2021-08-23 12:11:13 -04:00
beb7f90908 Make nav overlay non-clickable (maybe fixes #5727) 2021-08-22 19:25:40 -04:00
a3917972b4 Update deprecated Android Gradle DSL calls 2021-08-22 18:05:18 -04:00
7094fef37f Update tracker services logo layout (closes #5625) 2021-08-22 16:48:08 -04:00
0f41e56a24 [skip ci] Move acknowledgements to bottom of issue templates 2021-08-22 15:45:11 -04:00
52b283283f Revert "Hardcode bottom nav height (fixes #5698)"
This reverts commit ebb15bf96c.
2021-08-22 15:40:13 -04:00
ebb15bf96c Hardcode bottom nav height (fixes #5698)
This shouldn't be an issue since the spec defines the height to always be 56dp anyway.
2021-08-22 14:17:28 -04:00
6c527d52fb Use custom tabs instead of browser (closes #5754) 2021-08-22 14:16:54 -04:00
b8ea57e097 Minor cleanup 2021-08-22 14:00:07 -04:00
909aed4262 Fix blue background under action mode text selection handlers in blue theme 2021-08-22 12:25:19 -04:00
4d2fff9538 Update release workflow to handle multiple ABI variants 2021-08-22 12:15:53 -04:00
9a45983f17 Update dependencies 2021-08-22 11:48:57 -04:00
11926014da Bold author and artist fields (#5770) 2021-08-22 11:07:18 -04:00
72002c13d6 Tweak MangaInfoHeader (#5766)
Make margin between transparent toolbar and cover more match 1.x
Fixes from when view was redone with MotionLayout
2021-08-21 19:09:19 -04:00
6ed767ae84 Move PR template 2021-08-21 19:08:38 -04:00
3826b307f7 Add a much more clean design to Chips (#5765)
Based on the default chips and what is seen on J2K/Neko
2021-08-21 18:23:46 -04:00
887b157056 Add haptic feedback to reader page slider (#5763) 2021-08-21 18:05:57 -04:00
d36dd39743 Add a Pull Request template (#5764) 2021-08-21 18:05:44 -04:00
dd008bc13a Adjust blue theme 2021-08-21 18:05:08 -04:00
50b282f58b update Anilist tracking title during refresh (#5760)
Co-authored-by: Andreas <andreas.everos@gmail.com>

Co-authored-by: Andreas <andreas.everos@gmail.com>
2021-08-21 10:51:20 -04:00
f8a7efbce7 Update jsoup 2021-08-20 22:42:21 -04:00
7d2caeb270 Minor cleanup 2021-08-20 22:42:16 -04:00
708e71a35a Use user preferred title language in Anilist (#5758)
* Use user preferred title language in Anilist

Since Anilist is only used by authenticated users, the title language
can be set using the `userPreferred` field (defaults to romaji)

Changed wherever `title>romaji` was being used. Shouldn't have missed
any. `userPreferred` is also available for Staff and Character but not
relevant to Tachiyomi for now.

Users might need to go Logout and log back in on Anilist to see the
change. Actual setting can be found at https://anilist.co/settings/media

closes https://github.com/tachiyomiorg/tachiyomi/issues/5757

* correct title in anilist model

indicates the fact that userPreferred title is used

* convert forgotten `type` to `format` as well

leads to NPE when using `findLibManga`.
missed one query in https://github.com/tachiyomiorg/tachiyomi/pull/5741
2021-08-20 18:20:04 -04:00
4eaccc966e Hide reader progress indicator right away (#5750)
The image will be drawn over it so the animation won't be visible anyway
2021-08-19 18:12:31 -04:00
3670d649b8 Make default category translatable (#5751)
* Make default category translatable

* Replace duplicate strings with common one
2021-08-19 18:10:43 -04:00
90ab04e81d Require authentication-confirmation to change biometric lock settings (#5695)
* Requires authentication-confirmation to change biometric lock settings

* Prevent double authentications on older APIs when confirming settings changes

* Use new AuthPrompt API for app lock

With this commit, the app lock will only explicitly require Class 2 biometrics
or screen lock credential. Class 3 biometrics are guaranteed to meet Class 2
requirements thus will also be used when available.

* Use extension toast
2021-08-19 18:10:07 -04:00
26b8df5354 Partial revert 914b686c8e (#5749)
Didn't mean to remove this line, this fixes resuming to read downloaded chapter.
2021-08-19 11:53:26 -04:00
11a8046c5f PagerPageHolder: Move chooseBackground call to IO thread (#5737)
* ImageUtil.chooseBackground: Use built-in decoder

* PagerPageHolder: Move chooseBackground call to IO thread

Also move stuffs and reuse image stream as bytes
2021-08-19 09:15:45 -04:00
da16110e1c Edge-to-edge manga details view (#5613)
* Prepare for edge-to-edge MangaController

* Fix derpy liftToScroll with our own implementation

* Edge-to-edge MangaController

Except when legacy blue theme is used.

* Save app bar lift state for controller backstack

* Fix expanded cover position after the view recycled

* Handle overlap changes when incognito mode disabled

* Tablet fixes

* Revert "Handle overlap changes when incognito mode disabled"

This reverts commit 1f492449

Breaks on rotation changes.

* Fix MangaController's swipe refresh position

* All controllers are now doing lift app bar on scroll by default

They are already doing that before so this pretty much just a cleanups.

* TachiyomiCoordinatorLayout: Support ViewPager for app bar lift state check

I'm willing to revert this if this minute detail solution is deemed too hacky xD

* Fix app bar not lifted when scrolled without fling

* Save app bar lift state across configuration changes

* Fix MangaController's swipe refresh position after configuration change

* TachiyomiCoordinatorLayout: Update ViewPager reference when controller is changed
2021-08-19 09:12:52 -04:00
914b686c8e ReaderTransitionView: Use context theme color for texts (#5738)
* Put themed reader context in adapter

This avoids creating themed context everytime the page holder is created, this
also allows the transition view to use the same themed context.

* Check against app night mode to create themed reader context

* ReaderTransitionView: Use context theme color for texts

The whole reader will need to be recreated when changing reader background while
webtoon mode is used, because recreating just the RecyclerView without messing
up the scroll position is impossible (I hope I just missed something).
2021-08-19 09:10:05 -04:00
27133520fc Label one-shots correctly in anilist track search (#5741)
* use format instead of type in anilist search

As per anilist graphql docs, `type` refers to whether anime/manga and is
redundant (since we already limit it to `MANGA`). What we actually want
is `format` which includes whether the media is a One-shot or Manga

This should help in making search a bit better as one no longer needs to
rely on the Date to figure out if its the One-shot entry or the Manga
entry

* Revert "use format instead of type in anilist search"

This reverts commit 6f0ba4888669f414a2093d7632eb1fab109d74de.

Accidentally changed the wrong query while further testing whoops

* use format instead of type in anilist search

As per anilist graphql docs, `type` refers to whether anime/manga and is
redundant (since we already limit it to `MANGA`). What we actually want
is `format` which includes whether the media is a One-shot or Manga

Changes search query and corresponding JSONALManga structure
2021-08-19 09:08:48 -04:00
24b967ad5c Fix start/resume fab showing up when entering and then exiting action mode (#5735) 2021-08-17 22:44:35 -04:00
ca4b4a3f1e [skip ci] Replace deprecated argument for gradle command action 2021-08-17 22:40:34 -04:00
faef35ec47 Add check for current controller before setting extension update tab badge (#5733) 2021-08-16 11:58:30 -04:00
326d4c2641 Fix today still being displayed even though relative time is off (#5732) 2021-08-16 10:28:40 -04:00
83436c9550 add Theme "Teal & Turquoise" (#5681)
* add Theme "Teal & Turquoise"

* re sorting & change tertiary dark

* use alpha on ripple color & capitalize
2021-08-16 10:15:28 -04:00
2084822731 Fix library icon unchecked state (#5728)
Path data from AVD version
2021-08-16 10:15:10 -04:00
071bad1232 Use separate string for toRelativeString "Today"
Apparently 0 quantity is ignored for some locales...
2021-08-15 17:42:31 -04:00
ae1a76da2b Use toRelativeString in Updates and History headings 2021-08-15 17:42:06 -04:00
fbc6965c4e Update google-services.json with latest version from Firebase Console 2021-08-15 17:08:43 -04:00
57a5862840 Use relative time in ChapterHolder (#5719)
* Use relative time in ChapterHolder

Similar to how J2K does it

* Use custom implementation for relative time

* Changes based on review comments
2021-08-15 17:07:48 -04:00
91fbccdbaa Allow FilterList to be passed with default values (#5716) 2021-08-15 17:06:32 -04:00
0ab0dd95ae DNS-over-HTTPS (Adguard) (#5715)
* Update DohProviders.kt

* Update NetworkHelper.kt

* Update SettingsAdvancedController.kt

* fix typo

* Fix typo

* Fix typo
2021-08-15 11:20:52 -04:00
bc41040fd3 [skip ci] Split push and PR build workflows so they don't cancel each other 2021-08-15 11:07:27 -04:00
4c8dfd0c0c Add toggle to invert page color in reader color filter settings (#5713) 2021-08-15 10:58:01 -04:00
2b9dbfb390 Fix global search menu item title 2021-08-15 10:53:52 -04:00
84d546b724 Set expanded cover dimension ratio from the source image (#5721)
Avoids cropping.
2021-08-15 10:53:25 -04:00
63053b9940 Update menu icons in Browse Sources view (closes #5397) 2021-08-15 10:46:04 -04:00
2256030a2a Don't allow focus on ReaderNavigationOverlayView (maybe fixes #5555) 2021-08-15 10:42:45 -04:00
79da33b597 Open tracker page when clicking logo (closes #5624) 2021-08-15 10:38:10 -04:00
7d67450e58 Always re-setup background jobs on migration runs 2021-08-13 18:28:07 -04:00
8aa11951bf Do background app/extension checks less frequently
Since the in-app checks occur at least once a day anyway.
2021-08-13 18:24:21 -04:00
f23f22ab01 Add in-app app update check 2021-08-13 18:18:53 -04:00
96a64c7bd2 Update dependencies 2021-08-13 18:18:22 -04:00
d1bb0fdf1d Apply app theme styling to reader page errors and progress dialog (#5705) 2021-08-13 15:44:42 -04:00
feca30d7ed Fix selector in search card item (#5711) 2021-08-13 15:44:25 -04:00
b650151693 [skip ci] Update documentation 2021-08-10 18:10:46 -04:00
bb3afd0dc9 Update to Contributor Covenant 2.1 (#5697) 2021-08-10 13:30:54 -04:00
5e77ae208d Use correct color for reader loading indicator (#5685)
* Revert "Revert "Use correct color for reader loading indicator (#5645)" (fixes #5669)"

This reverts commit a4eba50c

* Fix crash on older APIs
2021-08-09 17:48:28 -04:00
24e5a4d7ec Enable elevation overlay for MaterialSwitch (#5686) 2021-08-09 17:47:57 -04:00
1d10d29fa9 Replace AboutLibraries activity with custom controller 2021-08-07 11:50:20 -04:00
9b00e91773 Reorganize dependencies a bit 2021-08-07 10:50:50 -04:00
cd73c30d6f Remove explicit CardView dependency 2021-08-07 10:50:40 -04:00
7bbba0c7d9 Update Duktape 2021-08-07 10:50:26 -04:00
7907a4fc24 Add ability to tweak auto hide sensitivity in Webtoon Reader (#5650)
* Tweak threshold

* Put setting under Webtoon instead

Because it only affects Webtoon related viewers
2021-08-07 10:34:47 -04:00
2f94f62a56 Merge branch 'fix-12' into master
# Conflicts:
#	.github/ISSUE_TEMPLATE.md
#	.github/ISSUE_TEMPLATE/report_issue.yml
#	.github/ISSUE_TEMPLATE/request_feature.yml
2021-08-06 17:33:24 -04:00
85791a9336 Release v0.12.1 2021-08-06 17:31:22 -04:00
a4eba50cfd Revert "Use correct color for reader loading indicator (#5645)" (fixes #5669)
This reverts commit 7a1b6142df.
2021-08-06 17:30:51 -04:00
03980b2f27 Remove ability to set in-app language differently from system's 2021-08-06 16:45:40 -04:00
664e5cfb59 [skip ci] Update issue templates 2021-08-06 15:43:24 -04:00
b9736df7e0 Re-enable preview build things 2021-08-06 15:38:16 -04:00
709 changed files with 24925 additions and 13405 deletions

5
.editorconfig Normal file
View File

@ -0,0 +1,5 @@
[*.{kt,kts}]
indent_size=4
insert_final_newline=true
ij_kotlin_allow_trailing_comma=true
ij_kotlin_allow_trailing_comma_on_call_site=true

View File

@ -3,7 +3,7 @@
I acknowledge that:
- I have updated:
- To the latest version of the app (stable is v0.11.1)
- To the latest version of the app (stable is v0.13.4)
- All extensions
- I have tried the troubleshooting guide: https://tachiyomi.org/help/guides/troubleshooting-problems/
- If this is an issue with an extension, that I should be opening an issue in https://github.com/tachiyomiorg/tachiyomi-extensions

View File

@ -3,57 +3,6 @@ description: Report an issue in Tachiyomi
labels: [Bug]
body:
- type: checkboxes
id: acknowledgements
attributes:
label: Acknowledgements
description: Read this carefully, we will close and ignore your issue if you skimmed through this.
options:
- label: I have searched the existing issues and this is a new ticket, **NOT** a duplicate or related to another open issue.
required: true
- label: I have written a short but informative title.
required: true
- label: If this is an issue with an extension, I should be opening an issue in the [extensions repository](https://github.com/tachiyomiorg/tachiyomi-extensions/issues/new/choose).
required: true
- label: I have tried the [troubleshooting guide](https://tachiyomi.org/help/guides/troubleshooting/).
required: true
- label: I have updated the app to version **[0.11.1](https://github.com/tachiyomiorg/tachiyomi/releases/tag/v0.11.1)**.
required: true
- label: I have updated all installed extensions.
required: true
- label: I will fill out all of the requested information in this form.
required: true
- type: input
id: tachiyomi-version
attributes:
label: Tachiyomi version
description: You can find your Tachiyomi version in **More → About**.
placeholder: |
Example: "0.11.1"
validations:
required: true
- type: input
id: android-version
attributes:
label: Android version
description: You can find this somewhere in your Android settings.
placeholder: |
Example: "Android 11"
validations:
required: true
- type: input
id: device
attributes:
label: Device
description: List your device and model.
placeholder: |
Example: "Google Pixel 5"
validations:
required: true
- type: textarea
id: reproduce-steps
attributes:
@ -84,7 +33,7 @@ body:
label: Actual behavior
description: Explain what actually happens.
placeholder: |
Example:
Example:
"This happened instead..."
validations:
required: true
@ -98,9 +47,60 @@ body:
placeholder: |
You can paste the crash logs in pure text or upload it as an attachment.
- type: input
id: tachiyomi-version
attributes:
label: Tachiyomi version
description: You can find your Tachiyomi version in **More → About**.
placeholder: |
Example: "0.13.4"
validations:
required: true
- type: input
id: android-version
attributes:
label: Android version
description: You can find this somewhere in your Android settings.
placeholder: |
Example: "Android 11"
validations:
required: true
- type: input
id: device
attributes:
label: Device
description: List your device and model.
placeholder: |
Example: "Google Pixel 5"
validations:
required: true
- type: textarea
id: other-details
attributes:
label: Other details
placeholder: |
Additional details and attachments.
- type: checkboxes
id: acknowledgements
attributes:
label: Acknowledgements
description: Read this carefully, we will close and ignore your issue if you skimmed through this.
options:
- label: I have searched the existing issues and this is a new ticket, **NOT** a duplicate or related to another open issue.
required: true
- label: I have written a short but informative title.
required: true
- label: If this is an issue with an extension, I should be opening an issue in the [extensions repository](https://github.com/tachiyomiorg/tachiyomi-extensions/issues/new/choose).
required: true
- label: I have tried the [troubleshooting guide](https://tachiyomi.org/help/guides/troubleshooting/).
required: true
- label: I have updated the app to version **[0.13.4](https://github.com/tachiyomiorg/tachiyomi/releases/latest)**.
required: true
- label: I have updated all installed extensions.
required: true
- label: I will fill out all of the requested information in this form.
required: true

View File

@ -3,23 +3,6 @@ description: Suggest a feature to improve Tachiyomi
labels: [Feature request]
body:
- type: checkboxes
id: acknowledgements
attributes:
label: Acknowledgements
description: Read this carefully, we will close and ignore your issue if you skimmed through this.
options:
- label: I have searched the existing issues and this is a new ticket, **NOT** a duplicate or related to another open issue.
required: true
- label: I have written a short but informative title.
required: true
- label: If this is an issue with an extension, I should be opening an issue in the [extensions repository](https://github.com/tachiyomiorg/tachiyomi-extensions/issues/new/choose).
required: true
- label: I have updated the app to version **[0.11.1](https://github.com/tachiyomiorg/tachiyomi/releases/tag/v0.11.1)**.
required: true
- label: I will fill out all of the requested information in this form.
required: true
- type: textarea
id: feature-description
attributes:
@ -37,3 +20,20 @@ body:
label: Other details
placeholder: |
Additional details and attachments.
- type: checkboxes
id: acknowledgements
attributes:
label: Acknowledgements
description: Read this carefully, we will close and ignore your issue if you skimmed through this.
options:
- label: I have searched the existing issues and this is a new ticket, **NOT** a duplicate or related to another open issue.
required: true
- label: I have written a short but informative title.
required: true
- label: If this is an issue with an extension, I should be opening an issue in the [extensions repository](https://github.com/tachiyomiorg/tachiyomi-extensions/issues/new/choose).
required: true
- label: I have updated the app to version **[0.13.4](https://github.com/tachiyomiorg/tachiyomi/releases/latest)**.
required: true
- label: I will fill out all of the requested information in this form.
required: true

12
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,12 @@
<!--
Please include a summary of the change and which issue is fixed.
Also make sure you've tested your code and also done a self-review of it.
Don't forget to check all base themes and tablet mode for relevant changes.
If your changes are visual, please provide images below:
### Images
| Image 1 | Image 2 |
| ------- | ------- |
| ![](https://github.githubassets.com/images/modules/logos_page/Octocat.png) | ![](https://github.githubassets.com/images/modules/logos_page/Octocat.png) |
-->

Binary file not shown.

Before

Width:  |  Height:  |  Size: 454 KiB

View File

@ -2,5 +2,4 @@ org.gradle.daemon=false
org.gradle.jvmargs=-Xmx5120m
org.gradle.workers.max=2
kotlin.incremental=false
kotlin.compiler.execution.strategy=in-process
kotlin.incremental=false

View File

@ -0,0 +1,39 @@
name: PR build check
on:
pull_request:
paths-ignore:
- '**.md'
- 'app/src/main/res/**/strings.xml'
permissions:
contents: read
jobs:
build:
name: Build app
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Dependency Review
uses: actions/dependency-review-action@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Copy CI gradle.properties
run: |
mkdir -p ~/.gradle
cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties
- name: Build app
uses: gradle/gradle-command-action@v2
with:
arguments: assembleStandardRelease

View File

@ -5,33 +5,24 @@ on:
- master
tags:
- v*
pull_request:
jobs:
check_wrapper:
name: Validate Gradle Wrapper
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
build:
name: Build app
needs: check_wrapper
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.5.0
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
all_but_latest: true
- name: Clone repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
@ -44,24 +35,18 @@ jobs:
cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties
- name: Build app
uses: eskatos/gradle-command-action@v1
uses: gradle/gradle-command-action@v2
with:
arguments: assembleStandardRelease
wrapper-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
# Sign APK and create release for tags
- name: Get tag name
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'tachiyomiorg/tachiyomi'
id: get_tag_name
run: |
set -x
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
# TODO: need to support multiple APKs
- name: Sign APK
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'tachiyomiorg/tachiyomi'
uses: r0adkll/sign-android-release@v1
@ -75,9 +60,23 @@ jobs:
- name: Clean up build artifacts
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'tachiyomiorg/tachiyomi'
run: |
cp ${{ env.SIGNED_RELEASE_FILE }} tachiyomi-${{ env.VERSION_TAG }}.apk
md5=`md5sum tachiyomi-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
echo "APK_MD5=$md5" >> $GITHUB_ENV
set -e
mv app/build/outputs/apk/standard/release/app-standard-universal-release-unsigned-signed.apk tachiyomi-${{ env.VERSION_TAG }}.apk
sha=`sha256sum tachiyomi-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
echo "APK_UNIVERSAL_SHA=$sha" >> $GITHUB_ENV
cp app/build/outputs/apk/standard/release/app-standard-arm64-v8a-release-unsigned-signed.apk tachiyomi-arm64-v8a-${{ env.VERSION_TAG }}.apk
sha=`sha256sum tachiyomi-arm64-v8a-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
echo "APK_ARM64_V8A_SHA=$sha" >> $GITHUB_ENV
cp app/build/outputs/apk/standard/release/app-standard-armeabi-v7a-release-unsigned-signed.apk tachiyomi-armeabi-v7a-${{ env.VERSION_TAG }}.apk
sha=`sha256sum tachiyomi-armeabi-v7a-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
echo "APK_ARMEABI_V7A_SHA=$sha" >> $GITHUB_ENV
cp app/build/outputs/apk/standard/release/app-standard-x86-release-unsigned-signed.apk tachiyomi-x86-${{ env.VERSION_TAG }}.apk
sha=`sha256sum tachiyomi-x86-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
echo "APK_X86_SHA=$sha" >> $GITHUB_ENV
- name: Create Release
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'tachiyomiorg/tachiyomi'
@ -86,9 +85,21 @@ jobs:
tag_name: ${{ env.VERSION_TAG }}
name: Tachiyomi ${{ env.VERSION_TAG }}
body: |
MD5: ${{ env.APK_MD5 }}
---
### Checksums
| Variant | SHA-256 |
| ------- | ------- |
| Universal | ${{ env.APK_UNIVERSAL_SHA }}
| arm64-v8a | ${{ env.APK_ARM64_V8A_SHA }}
| armeabi-v7a | ${{ env.APK_ARMEABI_V7A_SHA }}
| x86 | ${{ env.APK_X86_SHA }} |
files: |
tachiyomi-${{ env.VERSION_TAG }}.apk
tachiyomi-arm64-v8a-${{ env.VERSION_TAG }}.apk
tachiyomi-armeabi-v7a-${{ env.VERSION_TAG }}.apk
tachiyomi-x86-${{ env.VERSION_TAG }}.apk
draft: true
prerelease: false
env:

View File

@ -0,0 +1,16 @@
name: Cancel old pull request workflows
on:
workflow_run:
workflows: ["PR build check"]
types:
- requested
jobs:
cancel:
runs-on: ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.9.1
with:
all_but_latest: true
workflow_id: ${{ github.event.workflow.id }}

View File

@ -1,32 +0,0 @@
name: Issue closer
on:
issues:
types: [opened, edited, reopened]
jobs:
autoclose:
runs-on: ubuntu-latest
steps:
- name: Autoclose issues
uses: arkon/issue-closer-action@v3.4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
rules: |
[
{
"type": "body",
"regex": ".*DELETE THIS SECTION IF YOU HAVE READ AND ACKNOWLEDGED IT.*",
"message": "The acknowledgment section was not removed."
},
{
"type": "body",
"regex": ".*\\* (Tachiyomi version|Android version|Device): \\?.*",
"message": "Requested information in the template was not filled out."
},
{
"type": "both",
"regex": ".*(aniyomi|anime).*",
"ignoreCase": true,
"message": "Tachiyomi does not support anime, and has no plans to support anime. In addition Tachiyomi is not affiliated with Aniyomi https://github.com/jmir1/aniyomi"
}
]

View File

@ -1,6 +1,8 @@
name: Issue moderator
on:
issues:
types: [opened, edited, reopened]
issue_comment:
types: [created]
@ -9,6 +11,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Moderate issues
uses: tachiyomiorg/issue-moderator-action@v1.1
uses: tachiyomiorg/issue-moderator-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
auto-close-rules: |
[
{
"type": "body",
"regex": ".*DELETE THIS SECTION IF YOU HAVE READ AND ACKNOWLEDGED IT.*",
"message": "The acknowledgment section was not removed."
},
{
"type": "body",
"regex": ".*\\* (Tachiyomi version|Android version|Device): \\?.*",
"message": "Requested information in the template was not filled out."
},
{
"type": "both",
"regex": "^(?!.*myanimelist.*).*(aniyomi|anime).*$",
"ignoreCase": true,
"message": "Tachiyomi does not support anime, and has no plans to support anime. In addition Tachiyomi is not affiliated with Aniyomi https://github.com/jmir1/aniyomi"
}
]

View File

@ -3,7 +3,7 @@ name: Lock threads
on:
# Daily
schedule:
- cron: '0 * * * *'
- cron: '0 0 * * *'
# Manual trigger
workflow_dispatch:
inputs:
@ -12,8 +12,8 @@ jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2
- uses: dessant/lock-threads@v3
with:
github-token: ${{ github.token }}
issue-lock-inactive-days: '2'
pr-lock-inactive-days: '2'
issue-inactive-days: '2'
pr-inactive-days: '2'

View File

@ -1,76 +1,126 @@
# Code of Conduct
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
Examples of behavior that contributes to a positive environment for our
community include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior by participants include:
Examples of unacceptable behavior include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
professional setting
## Our Responsibilities
## Enforcement Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Community moderators are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Community moderators have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at the Tachiyomi [Discord server](https://discord.gg/tachiyomi). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
reported to the community moderators responsible for enforcement at
the [Tachiyomi Discord server](https://discord.gg/tachiyomi).
All complaints will be reviewed and investigated promptly and fairly.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
All community moderators are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community moderators will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community moderators, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/),
version 2.1, available at
[v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
[homepage]: https://www.contributor-covenant.org
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
For answers to common questions about this code of conduct, see the FAQ at
[FAQ](https://www.contributor-covenant.org/faq). Translations are available
at [translations](https://www.contributor-covenant.org/translations).

View File

@ -10,7 +10,23 @@ Thanks for your interest in contributing to Tachiyomi!
Pull requests are welcome!
If you're interested in taking on [an open issue](https://github.com/tachiyomiorg/tachiyomi/issues), please comment on it so others are aware.
You do not need to ask for permission nor an assignment.
## Prerequisites
Before you start, please note that the ability to use following technologies is **required** and that existing contributors will not actively teach them to you.
- Basic [Android development](https://developer.android.com/)
- [Kotlin](https://kotlinlang.org/)
### Tools
- [Android Studio](https://developer.android.com/studio)
- Emulator or phone with developer options enabled to test changes.
## Getting help
- Join [the Discord server](https://discord.gg/tachiyomi) for online help and to ask questions while developing.
# Translations
@ -26,7 +42,7 @@ When creating a fork, remember to:
- To avoid confusion with the main app:
- Change the app name
- Change the app icon
- Change or disable the [app update checker](https://github.com/tachiyomiorg/tachiyomi/blob/master/app/src/main/java/eu/kanade/tachiyomi/data/updater/GithubUpdateChecker.kt)
- Change or disable the [app update checker](https://github.com/tachiyomiorg/tachiyomi/blob/master/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt)
- To avoid installation conflicts:
- Change the `applicationId` in [`build.gradle.kts`](https://github.com/tachiyomiorg/tachiyomi/blob/master/app/build.gradle.kts)
- To avoid having your data polluting the main app's analytics and crash report services:

View File

@ -6,8 +6,6 @@
# ![app icon](./.github/readme-images/app-icon.png)Tachiyomi
Tachiyomi is a free and open source manga reader for Android 6.0 and above.
![screenshots of app](./.github/readme-images/screens.png)
## Features
Features include:
@ -38,7 +36,7 @@ Please make sure to read the full guidelines. Your issue may be closed without w
<details><summary>Bugs</summary>
* Include version (More > About > Version)
* Include version (More About Version)
* If not latest, try updating, it may have already been solved
* Preview version is equal to the number of commits as seen in the main page
* Include steps to reproduce (if not obvious from description)

View File

@ -1,8 +1,4 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.io.ByteArrayOutputStream
import java.text.SimpleDateFormat
import java.util.Date
import java.util.TimeZone
plugins {
id("com.android.application")
@ -13,7 +9,7 @@ plugins {
}
if (gradle.startParameter.taskRequests.toString().contains("Standard")) {
apply(plugin = "com.google.gms.google-services")
apply<com.google.gms.googleservices.GoogleServicesPlugin>()
}
shortcutHelper.setFilePath("./shortcuts.xml")
@ -28,14 +24,14 @@ android {
applicationId = "eu.kanade.tachiyomi"
minSdk = AndroidConfig.minSdk
targetSdk = AndroidConfig.targetSdk
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
versionCode = 66
versionName = "0.12.0"
versionCode = 80
versionName = "0.13.4"
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
buildConfigField("String", "BUILD_TIME", "\"${getBuildTime()}\"")
buildConfigField("boolean", "INCLUDE_UPDATER", "false")
buildConfigField("boolean", "PREVIEW", "false")
// Please disable ACRA or use your own instance in forked versions of the project
buildConfigField("String", "ACRA_URI", "\"https://tachiyomi.kanade.eu/crash_report\"")
@ -43,11 +39,13 @@ android {
ndk {
abiFilters += SUPPORTED_ABIS
}
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
splits {
abi {
isEnable = false
isEnable = true
reset()
include(*SUPPORTED_ABIS.toTypedArray())
isUniversalApk = true
@ -58,28 +56,28 @@ android {
named("debug") {
versionNameSuffix = "-${getCommitCount()}"
applicationIdSuffix = ".debug"
isShrinkResources = true
isMinifyEnabled = true
proguardFiles("proguard-android-optimize.txt", "proguard-rules.pro")
}
create("debugFull") { // Debug without R8
initWith(getByName("debug"))
isShrinkResources = false
isMinifyEnabled = false
}
named("release") {
isShrinkResources = true
isMinifyEnabled = true
proguardFiles("proguard-android-optimize.txt", "proguard-rules.pro")
}
create("preview") {
initWith(getByName("release"))
buildConfigField("boolean", "PREVIEW", "true")
val debugType = getByName("debug")
signingConfig = debugType.signingConfig
versionNameSuffix = debugType.versionNameSuffix
applicationIdSuffix = debugType.applicationIdSuffix
}
}
sourceSets {
getByName("debugFull").res.srcDirs("src/debug/res")
getByName("preview").res.srcDirs("src/debug/res")
}
flavorDimensions("default")
flavorDimensions.add("default")
productFlavors {
create("standard") {
@ -87,18 +85,22 @@ android {
dimension = "default"
}
create("dev") {
resConfigs("en", "xxhdpi")
resourceConfigurations.addAll(listOf("en", "xxhdpi"))
dimension = "default"
}
}
packagingOptions {
exclude("META-INF/DEPENDENCIES")
exclude("LICENSE.txt")
exclude("META-INF/LICENSE")
exclude("META-INF/LICENSE.txt")
exclude("META-INF/NOTICE")
exclude("META-INF/*.kotlin_module")
resources.excludes.addAll(listOf(
"META-INF/DEPENDENCIES",
"LICENSE.txt",
"META-INF/LICENSE",
"META-INF/LICENSE.txt",
"META-INF/README.md",
"META-INF/NOTICE",
"META-INF/*.kotlin_module",
"META-INF/*.version",
))
}
dependenciesInfo {
@ -107,12 +109,17 @@ android {
buildFeatures {
viewBinding = true
// Disable some unused things
aidl = false
renderScript = false
shaders = false
}
lint {
disable("MissingTranslation", "ExtraTranslation")
isAbortOnError = false
isCheckReleaseBuilds = false
disable.addAll(listOf("MissingTranslation", "ExtraTranslation"))
abortOnError = false
checkReleaseBuilds = false
}
compileOptions {
@ -126,150 +133,122 @@ android {
}
dependencies {
implementation(kotlinx.reflect)
implementation(kotlin("reflect", version = BuildPluginsVersion.KOTLIN))
val coroutinesVersion = "1.5.1"
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion")
implementation(kotlinx.bundles.coroutines)
// Source models and interfaces from Tachiyomi 1.x
implementation("org.tachiyomi:source-api:1.1")
implementation(libs.tachiyomi.api)
// AndroidX libraries
implementation("androidx.annotation:annotation:1.3.0-alpha01")
implementation("androidx.appcompat:appcompat:1.4.0-alpha03")
implementation("androidx.biometric:biometric-ktx:1.2.0-alpha03")
implementation("androidx.browser:browser:1.3.0")
implementation("androidx.cardview:cardview:1.0.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.0")
implementation("androidx.coordinatorlayout:coordinatorlayout:1.1.0")
implementation("androidx.core:core-ktx:1.7.0-alpha01")
implementation("androidx.core:core-splashscreen:1.0.0-alpha01")
implementation("androidx.preference:preference-ktx:1.1.1")
implementation("androidx.recyclerview:recyclerview:1.2.1")
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01")
implementation(androidx.annotation)
implementation(androidx.appcompat)
implementation(androidx.biometricktx)
implementation(androidx.constraintlayout)
implementation(androidx.coordinatorlayout)
implementation(androidx.corektx)
implementation(androidx.splashscreen)
implementation(androidx.recyclerview)
implementation(androidx.swiperefreshlayout)
implementation(androidx.viewpager)
val lifecycleVersion = "2.4.0-alpha01"
implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-process:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion")
implementation(androidx.bundles.lifecycle)
// Job scheduling
implementation("androidx.work:work-runtime-ktx:2.6.0-beta01")
implementation(androidx.bundles.workmanager)
// UI library
implementation("com.google.android.material:material:1.5.0-alpha01")
"standardImplementation"("com.google.firebase:firebase-core:19.0.0")
// ReactiveX
implementation("io.reactivex:rxandroid:1.2.1")
implementation("io.reactivex:rxjava:1.3.8")
implementation("com.jakewharton.rxrelay:rxrelay:1.2.0")
implementation("com.github.pwittchen:reactivenetwork:0.13.0")
// RX
implementation(libs.bundles.reactivex)
implementation(libs.flowreactivenetwork)
// Network client
val okhttpVersion = "4.9.1"
implementation("com.squareup.okhttp3:okhttp:$okhttpVersion")
implementation("com.squareup.okhttp3:logging-interceptor:$okhttpVersion")
implementation("com.squareup.okhttp3:okhttp-dnsoverhttps:$okhttpVersion")
implementation("com.squareup.okio:okio:2.10.0")
implementation(libs.bundles.okhttp)
implementation(libs.okio)
// TLS 1.3 support for Android < 10
implementation("org.conscrypt:conscrypt-android:2.5.2")
implementation(libs.conscrypt.android)
// JSON
val kotlinSerializationVersion = "1.2.2"
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializationVersion")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-protobuf:$kotlinSerializationVersion")
implementation("com.google.code.gson:gson:2.8.7")
implementation("com.github.salomonbrys.kotson:kotson:2.5.0")
// Data serialization (JSON, protobuf)
implementation(kotlinx.bundles.serialization)
// JavaScript engine
implementation("com.squareup.duktape:duktape-android:1.3.0")
// Disk
implementation("com.jakewharton:disklrucache:2.0.2")
implementation("com.github.tachiyomiorg:unifile:17bec43")
implementation("com.github.junrar:junrar:7.4.0")
implementation(libs.bundles.js.engine)
// HTML parser
implementation("org.jsoup:jsoup:1.14.1")
implementation(libs.jsoup)
// Disk
implementation(libs.disklrucache)
implementation(libs.unifile)
implementation(libs.junrar)
// Database
implementation("androidx.sqlite:sqlite-ktx:2.1.0")
implementation(libs.bundles.sqlite)
implementation("com.github.inorichi.storio:storio-common:8be19de@aar")
implementation("com.github.inorichi.storio:storio-sqlite:8be19de@aar")
implementation("com.github.requery:sqlite-android:3.36.0")
// Preferences
implementation("com.github.tfcporciuncula.flow-preferences:flow-preferences:1.4.0")
implementation(libs.preferencektx)
implementation(libs.flowpreferences)
// Model View Presenter
val nucleusVersion = "3.0.0"
implementation("info.android15.nucleus:nucleus:$nucleusVersion")
implementation("info.android15.nucleus:nucleus-support-v7:$nucleusVersion")
implementation(libs.bundles.nucleus)
// Dependency injection
implementation("com.github.inorichi.injekt:injekt-core:65b0440")
implementation(libs.injekt.core)
// Image library
val coilVersion = "1.3.2"
implementation("io.coil-kt:coil:$coilVersion")
implementation("io.coil-kt:coil-gif:$coilVersion")
// Image loading
implementation(libs.bundles.coil)
implementation("com.github.tachiyomiorg:subsampling-scale-image-view:846abe0") {
implementation(libs.subsamplingscaleimageview) {
exclude(module = "image-decoder")
}
implementation("com.github.tachiyomiorg:image-decoder:7481a4a")
// Logging
implementation("com.jakewharton.timber:timber:4.7.1")
// Crash reports
implementation("ch.acra:acra-http:5.8.1")
implementation(libs.image.decoder)
// Sort
implementation("com.github.gpanther:java-nat-sort:natural-comparator-1.1")
implementation(libs.natural.comparator)
// UI
implementation("com.github.dmytrodanylyk.android-process-button:library:1.0.4")
implementation("eu.davidea:flexible-adapter:5.1.0")
implementation("eu.davidea:flexible-adapter-ui:1.0.0")
implementation("com.nightlynexus.viewstatepageradapter:viewstatepageradapter:1.1.0")
implementation("com.github.chrisbanes:PhotoView:2.3.0")
implementation("com.github.tachiyomiorg:DirectionalViewPager:1.0.0")
implementation("dev.chrisbanes.insetter:insetter:0.6.0")
// UI libraries
implementation(libs.material)
implementation(libs.androidprocessbutton)
implementation(libs.flexible.adapter.core)
implementation(libs.flexible.adapter.ui)
implementation(libs.viewstatepageradapter)
implementation(libs.photoview)
implementation(libs.directionalviewpager) {
exclude(group = "androidx.viewpager", module = "viewpager")
}
implementation(libs.insetter)
implementation(libs.markwon)
// Conductor
val conductorVersion = "3.0.0"
implementation("com.bluelinelabs:conductor:$conductorVersion")
implementation("com.bluelinelabs:conductor-viewpager:$conductorVersion")
implementation("com.github.tachiyomiorg:conductor-support-preference:$conductorVersion")
implementation(libs.bundles.conductor)
// FlowBinding
val flowbindingVersion = "1.2.0"
implementation("io.github.reactivecircus.flowbinding:flowbinding-android:$flowbindingVersion")
implementation("io.github.reactivecircus.flowbinding:flowbinding-appcompat:$flowbindingVersion")
implementation("io.github.reactivecircus.flowbinding:flowbinding-recyclerview:$flowbindingVersion")
implementation("io.github.reactivecircus.flowbinding:flowbinding-swiperefreshlayout:$flowbindingVersion")
implementation("io.github.reactivecircus.flowbinding:flowbinding-viewpager:$flowbindingVersion")
implementation(libs.bundles.flowbinding)
// Logging
implementation(libs.logcat)
// Crash reports/analytics
implementation(libs.acra.http)
"standardImplementation"(libs.firebase.analytics)
// Licenses
implementation("com.mikepenz:aboutlibraries:${BuildPluginsVersion.ABOUTLIB_PLUGIN}")
implementation(libs.aboutlibraries.core)
// Shizuku
implementation(libs.bundles.shizuku)
// Tests
testImplementation("junit:junit:4.13.2")
testImplementation("org.assertj:assertj-core:3.16.1")
testImplementation("org.mockito:mockito-core:1.10.19")
testImplementation(libs.junit)
testImplementation(libs.assertj.core)
testImplementation(libs.mockito.core)
val robolectricVersion = "3.1.4"
testImplementation("org.robolectric:robolectric:$robolectricVersion")
testImplementation("org.robolectric:shadows-play-services:$robolectricVersion")
testImplementation(libs.bundles.robolectric)
// For detecting memory leaks; see https://square.github.io/leakcanary/
// debugImplementation("com.squareup.leakcanary:leakcanary-android:2.7")
// debugImplementation(libs.leakcanary.android)
}
tasks {
@ -278,12 +257,12 @@ tasks {
kotlinOptions.freeCompilerArgs += listOf(
"-Xopt-in=kotlin.Experimental",
"-Xopt-in=kotlin.RequiresOptIn",
"-Xuse-experimental=kotlin.ExperimentalStdlibApi",
"-Xuse-experimental=kotlinx.coroutines.FlowPreview",
"-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-Xuse-experimental=kotlinx.coroutines.InternalCoroutinesApi",
"-Xuse-experimental=kotlinx.serialization.ExperimentalSerializationApi",
"-Xuse-experimental=coil.annotation.ExperimentalCoilApi",
"-Xopt-in=kotlin.ExperimentalStdlibApi",
"-Xopt-in=kotlinx.coroutines.FlowPreview",
"-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-Xopt-in=kotlinx.coroutines.InternalCoroutinesApi",
"-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi",
"-Xopt-in=coil.annotation.ExperimentalCoilApi",
)
}
@ -299,40 +278,8 @@ tasks {
}
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath(kotlin("gradle-plugin", version = BuildPluginsVersion.KOTLIN))
classpath(kotlinx.gradle)
}
}
// Git is needed in your system PATH for these commands to work.
// If it's not installed, you can return a random value as a workaround
fun getCommitCount(): String {
return runCommand("git rev-list --count HEAD")
// return "1"
}
fun getGitSha(): String {
return runCommand("git rev-parse --short HEAD")
// return "1"
}
fun getBuildTime(): String {
val df = SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'")
df.timeZone = TimeZone.getTimeZone("UTC")
return df.format(Date())
}
fun runCommand(command: String): String {
val byteOut = ByteArrayOutputStream()
project.exec {
commandLine = command.split(" ")
standardOutput = byteOut
}
return String(byteOut.toByteArray()).trim()
}

View File

@ -12,6 +12,7 @@
-keep,allowoptimization class com.google.gson.** { public protected *; }
-keep,allowoptimization class com.github.salomonbrys.kotson.** { public protected *; }
-keep,allowoptimization class com.squareup.duktape.** { public protected *; }
-keep,allowoptimization class app.cash.quickjs.** { public protected *; }
-keep,allowoptimization class uy.kohesive.injekt.** { public protected *; }
##---------------Begin: proguard configuration for RxJava 1.x ----------

View File

@ -2,4 +2,5 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@android:color/transparent"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_tachi_monochrome_launcher" />
</adaptive-icon>

View File

@ -18,6 +18,7 @@
<!-- For managing extensions -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
<uses-permission android:name="android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION" />
<!-- To view extension packages in API 30+ -->
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
@ -25,7 +26,6 @@
android:name=".App"
android:allowBackup="false"
android:hardwareAccelerated="true"
android:hasFragileUserData="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
@ -177,17 +177,16 @@
android:exported="false" />
<service
android:name=".data.updater.UpdaterService"
android:exported="false" />
<service
android:name=".data.backup.BackupCreateService"
android:name=".data.updater.AppUpdateService"
android:exported="false" />
<service
android:name=".data.backup.BackupRestoreService"
android:exported="false" />
<service android:name=".extension.util.ExtensionInstallService"
android:exported="false" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
@ -198,6 +197,19 @@
android:resource="@xml/provider_paths" />
</provider>
<provider
android:name="rikka.shizuku.ShizukuProvider"
android:authorities="${applicationId}.shizuku"
android:multiprocess="false"
android:enabled="true"
android:exported="true"
android:permission="android.permission.INTERACT_ACROSS_USERS_FULL" />
<meta-data android:name="android.webkit.WebView.EnableSafeBrowsing"
android:value="false" />
<meta-data android:name="android.webkit.WebView.MetricsOptOut"
android:value="true" />
</application>
</manifest>

View File

@ -1,5 +1,6 @@
package eu.kanade.tachiyomi
import android.annotation.SuppressLint
import android.app.ActivityManager
import android.app.Application
import android.app.PendingIntent
@ -8,50 +9,59 @@ import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.os.Build
import android.os.Looper
import android.webkit.WebView
import androidx.appcompat.app.AppCompatDelegate
import androidx.core.app.NotificationManagerCompat
import androidx.core.content.getSystemService
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.OnLifecycleEvent
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.ProcessLifecycleOwner
import androidx.lifecycle.lifecycleScope
import coil.ImageLoader
import coil.ImageLoaderFactory
import coil.decode.GifDecoder
import coil.decode.ImageDecoderDecoder
import eu.kanade.tachiyomi.data.coil.ByteBufferFetcher
import coil.disk.DiskCache
import coil.util.DebugLogger
import eu.kanade.tachiyomi.data.coil.MangaCoverFetcher
import eu.kanade.tachiyomi.data.coil.MangaCoverKeyer
import eu.kanade.tachiyomi.data.coil.TachiyomiImageDecoder
import eu.kanade.tachiyomi.data.notification.Notifications
import eu.kanade.tachiyomi.data.preference.PreferenceValues
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.data.preference.asImmediateFlow
import eu.kanade.tachiyomi.network.NetworkHelper
import eu.kanade.tachiyomi.ui.security.SecureActivityDelegate
import eu.kanade.tachiyomi.ui.base.delegate.SecureActivityDelegate
import eu.kanade.tachiyomi.util.preference.asImmediateFlow
import eu.kanade.tachiyomi.util.system.AuthenticatorUtil
import eu.kanade.tachiyomi.util.system.WebViewUtil
import eu.kanade.tachiyomi.util.system.animatorDurationScale
import eu.kanade.tachiyomi.util.system.isDevFlavor
import eu.kanade.tachiyomi.util.system.logcat
import eu.kanade.tachiyomi.util.system.notification
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import logcat.AndroidLogcatLogger
import logcat.LogPriority
import logcat.LogcatLogger
import org.acra.config.httpSender
import org.acra.ktx.initAcra
import org.acra.sender.HttpSender
import org.conscrypt.Conscrypt
import timber.log.Timber
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import uy.kohesive.injekt.injectLazy
import java.security.Security
open class App : Application(), LifecycleObserver, ImageLoaderFactory {
open class App : Application(), DefaultLifecycleObserver, ImageLoaderFactory {
private val preferences: PreferencesHelper by injectLazy()
private val disableIncognitoReceiver = DisableIncognitoReceiver()
@SuppressLint("LaunchActivityFromNotification")
override fun onCreate() {
super.onCreate()
if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree())
super<Application>.onCreate()
// TLS 1.3 support for Android < 10
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
@ -87,7 +97,7 @@ open class App : Application(), LifecycleObserver, ImageLoaderFactory {
this@App,
0,
Intent(ACTION_DISABLE_INCOGNITO_MODE),
PendingIntent.FLAG_ONE_SHOT
PendingIntent.FLAG_ONE_SHOT,
)
setContentIntent(pendingIntent)
}
@ -106,42 +116,69 @@ open class App : Application(), LifecycleObserver, ImageLoaderFactory {
PreferenceValues.ThemeMode.light -> AppCompatDelegate.MODE_NIGHT_NO
PreferenceValues.ThemeMode.dark -> AppCompatDelegate.MODE_NIGHT_YES
PreferenceValues.ThemeMode.system -> AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
}
},
)
}.launchIn(ProcessLifecycleOwner.get().lifecycleScope)
if (!LogcatLogger.isInstalled && preferences.verboseLogging()) {
LogcatLogger.install(AndroidLogcatLogger(LogPriority.VERBOSE))
}
}
override fun newImageLoader(): ImageLoader {
return ImageLoader.Builder(this).apply {
componentRegistry {
add(TachiyomiImageDecoder(this@App.resources))
val callFactoryInit = { Injekt.get<NetworkHelper>().client }
val diskCacheInit = { CoilDiskCache.get(this@App) }
components {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
add(ImageDecoderDecoder(this@App))
add(ImageDecoderDecoder.Factory())
} else {
add(GifDecoder())
add(GifDecoder.Factory())
}
add(ByteBufferFetcher())
add(MangaCoverFetcher())
add(TachiyomiImageDecoder.Factory())
add(MangaCoverFetcher.Factory(lazy(callFactoryInit), lazy(diskCacheInit)))
add(MangaCoverKeyer())
}
okHttpClient(Injekt.get<NetworkHelper>().coilClient)
crossfade(300)
callFactory(callFactoryInit)
diskCache(diskCacheInit)
crossfade((300 * this@App.animatorDurationScale).toInt())
allowRgb565(getSystemService<ActivityManager>()!!.isLowRamDevice)
if (preferences.verboseLogging()) logger(DebugLogger())
}.build()
}
@OnLifecycleEvent(Lifecycle.Event.ON_STOP)
@Suppress("unused")
fun onAppBackgrounded() {
if (preferences.lockAppAfter().get() >= 0) {
override fun onStop(owner: LifecycleOwner) {
if (!AuthenticatorUtil.isAuthenticating && preferences.lockAppAfter().get() >= 0) {
SecureActivityDelegate.locked = true
}
}
override fun getPackageName(): String {
// This causes freezes in Android 6/7 for some reason
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
try {
// Override the value passed as X-Requested-With in WebView requests
val stackTrace = Looper.getMainLooper().thread.stackTrace
val chromiumElement = stackTrace.find {
it.className.equals(
"org.chromium.base.BuildInfo",
ignoreCase = true,
)
}
if (chromiumElement?.methodName.equals("getAll", ignoreCase = true)) {
return WebViewUtil.SPOOF_PACKAGE_NAME
}
} catch (e: Exception) {
}
}
return super.getPackageName()
}
protected open fun setupAcra() {
if (BuildConfig.FLAVOR != "dev") {
if (isDevFlavor.not()) {
initAcra {
buildConfigClass = BuildConfig::class.java
excludeMatchingSharedPreferencesKeys = arrayOf(".*username.*", ".*password.*", ".*token.*")
excludeMatchingSharedPreferencesKeys = listOf(".*username.*", ".*password.*", ".*token.*")
httpSender {
uri = BuildConfig.ACRA_URI
@ -152,7 +189,11 @@ open class App : Application(), LifecycleObserver, ImageLoaderFactory {
}
protected open fun setupNotificationChannels() {
Notifications.createChannels(this)
try {
Notifications.createChannels(this)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e) { "Failed to modify notification channels" }
}
}
private inner class DisableIncognitoReceiver : BroadcastReceiver() {
@ -176,8 +217,27 @@ open class App : Application(), LifecycleObserver, ImageLoaderFactory {
}
}
}
}
companion object {
private const val ACTION_DISABLE_INCOGNITO_MODE = "tachi.action.DISABLE_INCOGNITO_MODE"
private const val ACTION_DISABLE_INCOGNITO_MODE = "tachi.action.DISABLE_INCOGNITO_MODE"
/**
* Direct copy of Coil's internal SingletonDiskCache so that [MangaCoverFetcher] can access it.
*/
internal object CoilDiskCache {
private const val FOLDER_NAME = "image_cache"
private var instance: DiskCache? = null
@Synchronized
fun get(context: Context): DiskCache {
return instance ?: run {
val safeCacheDir = context.cacheDir.apply { mkdirs() }
// Create the singleton disk cache instance.
DiskCache.Builder()
.directory(safeCacheDir.resolve(FOLDER_NAME))
.build()
.also { instance = it }
}
}
}

View File

@ -0,0 +1,11 @@
package eu.kanade.tachiyomi
/**
* Used by extensions.
*
* @since extension-lib 1.3
*/
object AppInfo {
fun getVersionCode() = BuildConfig.VERSION_CODE
fun getVersionName() = BuildConfig.VERSION_NAME
}

View File

@ -7,7 +7,9 @@ import eu.kanade.tachiyomi.data.cache.CoverCache
import eu.kanade.tachiyomi.data.database.DatabaseHelper
import eu.kanade.tachiyomi.data.download.DownloadManager
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.data.saver.ImageSaver
import eu.kanade.tachiyomi.data.track.TrackManager
import eu.kanade.tachiyomi.data.track.job.DelayedTrackingStore
import eu.kanade.tachiyomi.extension.ExtensionManager
import eu.kanade.tachiyomi.network.NetworkHelper
import eu.kanade.tachiyomi.source.SourceManager
@ -23,6 +25,8 @@ class AppModule(val app: Application) : InjektModule {
override fun InjektRegistrar.registerInjectables() {
addSingleton(app)
addSingletonFactory { Json { ignoreUnknownKeys = true } }
addSingletonFactory { PreferencesHelper(app) }
addSingletonFactory { DatabaseHelper(app) }
@ -41,7 +45,9 @@ class AppModule(val app: Application) : InjektModule {
addSingletonFactory { TrackManager(app) }
addSingletonFactory { Json { ignoreUnknownKeys = true } }
addSingletonFactory { DelayedTrackingStore(app) }
addSingletonFactory { ImageSaver(app) }
// Asynchronously init expensive components for a faster cold start
ContextCompat.getMainExecutor(app).execute {

View File

@ -5,16 +5,21 @@ import androidx.core.content.edit
import androidx.preference.PreferenceManager
import eu.kanade.tachiyomi.data.backup.BackupCreatorJob
import eu.kanade.tachiyomi.data.library.LibraryUpdateJob
import eu.kanade.tachiyomi.data.preference.MANGA_NON_COMPLETED
import eu.kanade.tachiyomi.data.preference.PreferenceKeys
import eu.kanade.tachiyomi.data.preference.PreferenceValues
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.data.track.TrackManager
import eu.kanade.tachiyomi.data.updater.UpdaterJob
import eu.kanade.tachiyomi.data.updater.AppUpdateJob
import eu.kanade.tachiyomi.extension.ExtensionUpdateJob
import eu.kanade.tachiyomi.network.PREF_DOH_CLOUDFLARE
import eu.kanade.tachiyomi.ui.library.LibrarySort
import eu.kanade.tachiyomi.ui.library.setting.SortDirectionSetting
import eu.kanade.tachiyomi.ui.library.setting.SortModeSetting
import eu.kanade.tachiyomi.ui.reader.setting.OrientationType
import eu.kanade.tachiyomi.util.preference.minusAssign
import eu.kanade.tachiyomi.util.preference.plusAssign
import eu.kanade.tachiyomi.util.system.DeviceUtil
import eu.kanade.tachiyomi.util.system.toast
import eu.kanade.tachiyomi.widget.ExtendedNavigationView
import uy.kohesive.injekt.Injekt
@ -32,30 +37,29 @@ object Migrations {
fun upgrade(preferences: PreferencesHelper): Boolean {
val context = preferences.context
// Cancel app updater job for debug builds that don't include it
if (BuildConfig.DEBUG && !BuildConfig.INCLUDE_UPDATER) {
UpdaterJob.cancelTask(context)
}
val oldVersion = preferences.lastVersionCode().get()
if (oldVersion < BuildConfig.VERSION_CODE) {
preferences.lastVersionCode().set(BuildConfig.VERSION_CODE)
// Always set up background tasks to ensure they're running
if (BuildConfig.INCLUDE_UPDATER) {
AppUpdateJob.setupTask(context)
}
ExtensionUpdateJob.setupTask(context)
LibraryUpdateJob.setupTask(context)
BackupCreatorJob.setupTask(context)
// Fresh install
if (oldVersion == 0) {
// Set up default background tasks
if (BuildConfig.INCLUDE_UPDATER) {
UpdaterJob.setupTask(context)
}
ExtensionUpdateJob.setupTask(context)
LibraryUpdateJob.setupTask(context)
return false
}
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
if (oldVersion < 14) {
// Restore jobs after upgrading to Evernote's job scheduler.
if (BuildConfig.INCLUDE_UPDATER) {
UpdaterJob.setupTask(context)
AppUpdateJob.setupTask(context)
}
LibraryUpdateJob.setupTask(context)
}
@ -88,7 +92,7 @@ object Migrations {
if (oldVersion < 43) {
// Restore jobs after migrating from Evernote's job scheduler to WorkManager.
if (BuildConfig.INCLUDE_UPDATER) {
UpdaterJob.setupTask(context)
AppUpdateJob.setupTask(context)
}
LibraryUpdateJob.setupTask(context)
BackupCreatorJob.setupTask(context)
@ -98,8 +102,6 @@ object Migrations {
}
if (oldVersion < 44) {
// Reset sorting preference if using removed sort by source
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
val oldSortingMode = prefs.getInt(PreferenceKeys.librarySortingMode, 0)
@Suppress("DEPRECATION")
@ -111,7 +113,6 @@ object Migrations {
}
if (oldVersion < 52) {
// Migrate library filters to tri-state versions
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
fun convertBooleanPrefToTriState(key: String): Int {
val oldPrefValue = prefs.getBoolean(key, false)
return if (oldPrefValue) ExtendedNavigationView.Item.TriStateGroup.State.INCLUDE.value
@ -140,7 +141,6 @@ object Migrations {
}
if (oldVersion < 57) {
// Migrate DNS over HTTPS setting
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
val wasDohEnabled = prefs.getBoolean("enable_doh", false)
if (wasDohEnabled) {
prefs.edit {
@ -151,7 +151,6 @@ object Migrations {
}
if (oldVersion < 59) {
// Reset rotation to Free after replacing Lock
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
if (prefs.contains("pref_rotation_type_key")) {
prefs.edit {
putInt("pref_rotation_type_key", 1)
@ -160,17 +159,16 @@ object Migrations {
// Disable update check for Android 5.x users
if (BuildConfig.INCLUDE_UPDATER && Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
UpdaterJob.cancelTask(context)
AppUpdateJob.cancelTask(context)
}
}
if (oldVersion < 60) {
// Re-enable update check that was prevously accidentally disabled for M
if (BuildConfig.INCLUDE_UPDATER && Build.VERSION.SDK_INT == Build.VERSION_CODES.M) {
UpdaterJob.setupTask(context)
AppUpdateJob.setupTask(context)
}
// Migrate Rotation and Viewer values to default values for viewer_flags
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
val newOrientation = when (prefs.getInt("pref_rotation_type_key", 1)) {
1 -> OrientationType.FREE.flagValue
2 -> OrientationType.PORTRAIT.flagValue
@ -199,8 +197,6 @@ object Migrations {
}
}
if (oldVersion < 64) {
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
val oldSortingMode = prefs.getInt(PreferenceKeys.librarySortingMode, 0)
val oldSortingDirection = prefs.getBoolean(PreferenceKeys.librarySortingDirection, true)
@ -232,11 +228,45 @@ object Migrations {
putString(PreferenceKeys.librarySortingDirection, newSortingDirection.name)
}
}
if (oldVersion < 65) {
if (preferences.lang().get() in listOf("en-US", "en-GB")) {
preferences.lang().set("en")
if (oldVersion < 70) {
if (preferences.enabledLanguages().isSet()) {
preferences.enabledLanguages() += "all"
}
}
if (oldVersion < 71) {
// Handle removed every 3, 4, 6, and 8 hour library updates
val updateInterval = preferences.libraryUpdateInterval().get()
if (updateInterval in listOf(3, 4, 6, 8)) {
preferences.libraryUpdateInterval().set(12)
LibraryUpdateJob.setupTask(context, 12)
}
}
if (oldVersion < 72) {
val oldUpdateOngoingOnly = prefs.getBoolean("pref_update_only_non_completed_key", true)
if (!oldUpdateOngoingOnly) {
preferences.libraryUpdateMangaRestriction() -= MANGA_NON_COMPLETED
}
}
if (oldVersion < 75) {
val oldSecureScreen = prefs.getBoolean("secure_screen", false)
if (oldSecureScreen) {
preferences.secureScreen().set(PreferenceValues.SecureScreenMode.ALWAYS)
}
if (DeviceUtil.isMiui && preferences.extensionInstaller().get() == PreferenceValues.ExtensionInstaller.PACKAGEINSTALLER) {
preferences.extensionInstaller().set(PreferenceValues.ExtensionInstaller.LEGACY)
}
}
if (oldVersion < 76) {
BackupCreatorJob.setupTask(context)
}
if (oldVersion < 77) {
val oldReaderTap = prefs.getBoolean("reader_tap", false)
if (!oldReaderTap) {
preferences.navigationModePager().set(5)
preferences.navigationModeWebtoon().set(5)
}
}
return true
}

View File

@ -1,5 +0,0 @@
package eu.kanade.tachiyomi.annotations
@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS)
annotation class Nsfw

View File

@ -21,7 +21,7 @@ abstract class AbstractBackupManager(protected val context: Context) {
internal val trackManager: TrackManager by injectLazy()
protected val preferences: PreferencesHelper by injectLazy()
abstract fun createBackup(uri: Uri, flags: Int, isJob: Boolean): String?
abstract fun createBackup(uri: Uri, flags: Int, isAutoBackup: Boolean): String
/**
* Returns manga

View File

@ -112,7 +112,7 @@ abstract class AbstractBackupRestore<T : AbstractBackupManager>(protected val co
internal fun showRestoreProgress(
progress: Int,
amount: Int,
title: String
title: String,
) {
notifier.showRestoreProgress(title, progress, amount)
}

View File

@ -14,3 +14,5 @@ abstract class AbstractBackupRestoreValidator {
data class Results(val missingSources: List<String>, val missingTrackers: List<String>)
}
class ValidatorParseException(e: Exception) : RuntimeException(e)

View File

@ -11,4 +11,15 @@ object BackupConst {
const val BACKUP_TYPE_LEGACY = 0
const val BACKUP_TYPE_FULL = 1
// Filter options
internal const val BACKUP_CATEGORY = 0x1
internal const val BACKUP_CATEGORY_MASK = 0x1
internal const val BACKUP_CHAPTER = 0x2
internal const val BACKUP_CHAPTER_MASK = 0x2
internal const val BACKUP_HISTORY = 0x4
internal const val BACKUP_HISTORY_MASK = 0x4
internal const val BACKUP_TRACK = 0x8
internal const val BACKUP_TRACK_MASK = 0x8
internal const val BACKUP_ALL = 0xF
}

View File

@ -1,114 +0,0 @@
package eu.kanade.tachiyomi.data.backup
import android.app.Service
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.IBinder
import android.os.PowerManager
import androidx.core.content.ContextCompat
import androidx.core.net.toUri
import com.hippo.unifile.UniFile
import eu.kanade.tachiyomi.data.backup.full.FullBackupManager
import eu.kanade.tachiyomi.data.notification.Notifications
import eu.kanade.tachiyomi.util.system.acquireWakeLock
import eu.kanade.tachiyomi.util.system.isServiceRunning
/**
* Service for backing up library information to a JSON file.
*/
class BackupCreateService : Service() {
companion object {
// Filter options
internal const val BACKUP_CATEGORY = 0x1
internal const val BACKUP_CATEGORY_MASK = 0x1
internal const val BACKUP_CHAPTER = 0x2
internal const val BACKUP_CHAPTER_MASK = 0x2
internal const val BACKUP_HISTORY = 0x4
internal const val BACKUP_HISTORY_MASK = 0x4
internal const val BACKUP_TRACK = 0x8
internal const val BACKUP_TRACK_MASK = 0x8
internal const val BACKUP_ALL = 0xF
/**
* Returns the status of the service.
*
* @param context the application context.
* @return true if the service is running, false otherwise.
*/
fun isRunning(context: Context): Boolean =
context.isServiceRunning(BackupCreateService::class.java)
/**
* Make a backup from library
*
* @param context context of application
* @param uri path of Uri
* @param flags determines what to backup
*/
fun start(context: Context, uri: Uri, flags: Int) {
if (!isRunning(context)) {
val intent = Intent(context, BackupCreateService::class.java).apply {
putExtra(BackupConst.EXTRA_URI, uri)
putExtra(BackupConst.EXTRA_FLAGS, flags)
}
ContextCompat.startForegroundService(context, intent)
}
}
}
/**
* Wake lock that will be held until the service is destroyed.
*/
private lateinit var wakeLock: PowerManager.WakeLock
private lateinit var notifier: BackupNotifier
override fun onCreate() {
super.onCreate()
notifier = BackupNotifier(this)
wakeLock = acquireWakeLock(javaClass.name)
startForeground(Notifications.ID_BACKUP_PROGRESS, notifier.showBackupProgress().build())
}
override fun stopService(name: Intent?): Boolean {
destroyJob()
return super.stopService(name)
}
override fun onDestroy() {
destroyJob()
super.onDestroy()
}
private fun destroyJob() {
if (wakeLock.isHeld) {
wakeLock.release()
}
}
/**
* This method needs to be implemented, but it's not used/needed.
*/
override fun onBind(intent: Intent): IBinder? = null
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
if (intent == null) return START_NOT_STICKY
try {
val uri = intent.getParcelableExtra<Uri>(BackupConst.EXTRA_URI)!!
val backupFlags = intent.getIntExtra(BackupConst.EXTRA_FLAGS, 0)
val backupFileUri = FullBackupManager(this).createBackup(uri, backupFlags, false)?.toUri()
val unifile = UniFile.fromUri(this, backupFileUri)
notifier.showBackupComplete(unifile)
} catch (e: Exception) {
notifier.showBackupError(e.message)
}
stopSelf(startId)
return START_NOT_STICKY
}
}

View File

@ -1,14 +1,24 @@
package eu.kanade.tachiyomi.data.backup
import android.content.Context
import android.net.Uri
import androidx.core.net.toUri
import androidx.work.ExistingPeriodicWorkPolicy
import androidx.work.ExistingWorkPolicy
import androidx.work.OneTimeWorkRequestBuilder
import androidx.work.PeriodicWorkRequestBuilder
import androidx.work.WorkInfo
import androidx.work.WorkManager
import androidx.work.Worker
import androidx.work.WorkerParameters
import androidx.work.workDataOf
import com.hippo.unifile.UniFile
import eu.kanade.tachiyomi.data.backup.full.FullBackupManager
import eu.kanade.tachiyomi.data.notification.Notifications
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.util.system.logcat
import eu.kanade.tachiyomi.util.system.notificationManager
import logcat.LogPriority
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.util.concurrent.TimeUnit
@ -18,36 +28,71 @@ class BackupCreatorJob(private val context: Context, workerParams: WorkerParamet
override fun doWork(): Result {
val preferences = Injekt.get<PreferencesHelper>()
val uri = preferences.backupsDirectory().get().toUri()
val flags = BackupCreateService.BACKUP_ALL
val notifier = BackupNotifier(context)
val uri = inputData.getString(LOCATION_URI_KEY)?.let { Uri.parse(it) }
?: preferences.backupsDirectory().get().toUri()
val flags = inputData.getInt(BACKUP_FLAGS_KEY, BackupConst.BACKUP_ALL)
val isAutoBackup = inputData.getBoolean(IS_AUTO_BACKUP_KEY, true)
context.notificationManager.notify(Notifications.ID_BACKUP_PROGRESS, notifier.showBackupProgress().build())
return try {
FullBackupManager(context).createBackup(uri, flags, true)
val location = FullBackupManager(context).createBackup(uri, flags, isAutoBackup)
if (!isAutoBackup) notifier.showBackupComplete(UniFile.fromUri(context, location.toUri()))
Result.success()
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
if (!isAutoBackup) notifier.showBackupError(e.message)
Result.failure()
} finally {
context.notificationManager.cancel(Notifications.ID_BACKUP_PROGRESS)
}
}
companion object {
private const val TAG = "BackupCreator"
fun isManualJobRunning(context: Context): Boolean {
val list = WorkManager.getInstance(context).getWorkInfosByTag(TAG_MANUAL).get()
return list.find { it.state == WorkInfo.State.RUNNING } != null
}
fun setupTask(context: Context, prefInterval: Int? = null) {
val preferences = Injekt.get<PreferencesHelper>()
val interval = prefInterval ?: preferences.backupInterval().get()
val workManager = WorkManager.getInstance(context)
if (interval > 0) {
val request = PeriodicWorkRequestBuilder<BackupCreatorJob>(
interval.toLong(),
TimeUnit.HOURS,
10,
TimeUnit.MINUTES
TimeUnit.MINUTES,
)
.addTag(TAG)
.addTag(TAG_AUTO)
.setInputData(workDataOf(IS_AUTO_BACKUP_KEY to true))
.build()
WorkManager.getInstance(context).enqueueUniquePeriodicWork(TAG, ExistingPeriodicWorkPolicy.REPLACE, request)
workManager.enqueueUniquePeriodicWork(TAG_AUTO, ExistingPeriodicWorkPolicy.REPLACE, request)
} else {
WorkManager.getInstance(context).cancelAllWorkByTag(TAG)
workManager.cancelUniqueWork(TAG_AUTO)
}
}
fun startNow(context: Context, uri: Uri, flags: Int) {
val inputData = workDataOf(
IS_AUTO_BACKUP_KEY to false,
LOCATION_URI_KEY to uri.toString(),
BACKUP_FLAGS_KEY to flags,
)
val request = OneTimeWorkRequestBuilder<BackupCreatorJob>()
.addTag(TAG_MANUAL)
.setInputData(inputData)
.build()
WorkManager.getInstance(context).enqueueUniqueWork(TAG_MANUAL, ExistingWorkPolicy.KEEP, request)
}
}
}
private const val TAG_AUTO = "BackupCreator"
private const val TAG_MANUAL = "$TAG_AUTO:manual"
private const val IS_AUTO_BACKUP_KEY = "is_auto_backup" // Boolean
private const val LOCATION_URI_KEY = "location_uri" // String
private const val BACKUP_FLAGS_KEY = "backup_flags" // Int

View File

@ -73,7 +73,7 @@ class BackupNotifier(private val context: Context) {
addAction(
R.drawable.ic_share_24dp,
context.getString(R.string.action_share),
NotificationReceiver.shareBackupPendingBroadcast(context, unifile.uri, Notifications.ID_BACKUP_COMPLETE)
NotificationReceiver.shareBackupPendingBroadcast(context, unifile.uri, Notifications.ID_BACKUP_COMPLETE),
)
show(Notifications.ID_BACKUP_COMPLETE)
@ -97,7 +97,7 @@ class BackupNotifier(private val context: Context) {
addAction(
R.drawable.ic_close_24dp,
context.getString(R.string.action_stop),
NotificationReceiver.cancelRestorePendingBroadcast(context, Notifications.ID_RESTORE_PROGRESS)
NotificationReceiver.cancelRestorePendingBroadcast(context, Notifications.ID_RESTORE_PROGRESS),
)
}
@ -124,8 +124,8 @@ class BackupNotifier(private val context: Context) {
R.string.restore_duration,
TimeUnit.MILLISECONDS.toMinutes(time),
TimeUnit.MILLISECONDS.toSeconds(time) - TimeUnit.MINUTES.toSeconds(
TimeUnit.MILLISECONDS.toMinutes(time)
)
TimeUnit.MILLISECONDS.toMinutes(time),
),
)
with(completeNotificationBuilder) {
@ -139,10 +139,12 @@ class BackupNotifier(private val context: Context) {
val destFile = File(path, file)
val uri = destFile.getUriCompat(context)
val errorLogIntent = NotificationReceiver.openErrorLogPendingActivity(context, uri)
setContentIntent(errorLogIntent)
addAction(
R.drawable.ic_folder_24dp,
context.getString(R.string.action_show_errors),
NotificationReceiver.openErrorLogPendingActivity(context, uri)
errorLogIntent,
)
}

View File

@ -13,13 +13,14 @@ import eu.kanade.tachiyomi.data.backup.legacy.LegacyBackupRestore
import eu.kanade.tachiyomi.data.notification.Notifications
import eu.kanade.tachiyomi.util.system.acquireWakeLock
import eu.kanade.tachiyomi.util.system.isServiceRunning
import eu.kanade.tachiyomi.util.system.logcat
import kotlinx.coroutines.CoroutineExceptionHandler
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.cancel
import kotlinx.coroutines.launch
import timber.log.Timber
import logcat.LogPriority
/**
* Restores backup.
@ -128,7 +129,7 @@ class BackupRestoreService : Service() {
}
val handler = CoroutineExceptionHandler { _, exception ->
Timber.e(exception)
logcat(LogPriority.ERROR, exception)
backupRestore?.writeErrorLog()
notifier.showRestoreError(exception.message)

View File

@ -3,15 +3,16 @@ package eu.kanade.tachiyomi.data.backup.full
import android.content.Context
import android.net.Uri
import com.hippo.unifile.UniFile
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.backup.AbstractBackupManager
import eu.kanade.tachiyomi.data.backup.BackupCreateService.Companion.BACKUP_CATEGORY
import eu.kanade.tachiyomi.data.backup.BackupCreateService.Companion.BACKUP_CATEGORY_MASK
import eu.kanade.tachiyomi.data.backup.BackupCreateService.Companion.BACKUP_CHAPTER
import eu.kanade.tachiyomi.data.backup.BackupCreateService.Companion.BACKUP_CHAPTER_MASK
import eu.kanade.tachiyomi.data.backup.BackupCreateService.Companion.BACKUP_HISTORY
import eu.kanade.tachiyomi.data.backup.BackupCreateService.Companion.BACKUP_HISTORY_MASK
import eu.kanade.tachiyomi.data.backup.BackupCreateService.Companion.BACKUP_TRACK
import eu.kanade.tachiyomi.data.backup.BackupCreateService.Companion.BACKUP_TRACK_MASK
import eu.kanade.tachiyomi.data.backup.BackupConst.BACKUP_CATEGORY
import eu.kanade.tachiyomi.data.backup.BackupConst.BACKUP_CATEGORY_MASK
import eu.kanade.tachiyomi.data.backup.BackupConst.BACKUP_CHAPTER
import eu.kanade.tachiyomi.data.backup.BackupConst.BACKUP_CHAPTER_MASK
import eu.kanade.tachiyomi.data.backup.BackupConst.BACKUP_HISTORY
import eu.kanade.tachiyomi.data.backup.BackupConst.BACKUP_HISTORY_MASK
import eu.kanade.tachiyomi.data.backup.BackupConst.BACKUP_TRACK
import eu.kanade.tachiyomi.data.backup.BackupConst.BACKUP_TRACK_MASK
import eu.kanade.tachiyomi.data.backup.full.models.Backup
import eu.kanade.tachiyomi.data.backup.full.models.BackupCategory
import eu.kanade.tachiyomi.data.backup.full.models.BackupChapter
@ -26,11 +27,13 @@ import eu.kanade.tachiyomi.data.database.models.History
import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.data.database.models.MangaCategory
import eu.kanade.tachiyomi.data.database.models.Track
import eu.kanade.tachiyomi.util.system.logcat
import kotlinx.serialization.protobuf.ProtoBuf
import logcat.LogPriority
import okio.buffer
import okio.gzip
import okio.sink
import timber.log.Timber
import java.io.FileOutputStream
import kotlin.math.max
class FullBackupManager(context: Context) : AbstractBackupManager(context) {
@ -41,9 +44,9 @@ class FullBackupManager(context: Context) : AbstractBackupManager(context) {
* Create backup Json file from database
*
* @param uri path of Uri
* @param isJob backup called from job
* @param isAutoBackup backup called from scheduled backup job
*/
override fun createBackup(uri: Uri, flags: Int, isJob: Boolean): String? {
override fun createBackup(uri: Uri, flags: Int, isAutoBackup: Boolean): String {
// Create root object
var backup: Backup? = null
@ -53,13 +56,15 @@ class FullBackupManager(context: Context) : AbstractBackupManager(context) {
backup = Backup(
backupManga(databaseManga, flags),
backupCategories(),
backupExtensionInfo(databaseManga)
emptyList(),
backupExtensionInfo(databaseManga),
)
}
var file: UniFile? = null
try {
val file: UniFile = (
if (isJob) {
file = (
if (isAutoBackup) {
// Get dir of file and create
var dir = UniFile.fromUri(context, uri)
dir = dir.createDirectory("automatic")
@ -81,11 +86,28 @@ class FullBackupManager(context: Context) : AbstractBackupManager(context) {
)
?: throw Exception("Couldn't create backup file")
if (!file.isFile) {
throw IllegalStateException("Failed to get handle on file")
}
val byteArray = parser.encodeToByteArray(BackupSerializer, backup!!)
file.openOutputStream().sink().gzip().buffer().use { it.write(byteArray) }
return file.uri.toString()
if (byteArray.isEmpty()) {
throw IllegalStateException(context.getString(R.string.empty_backup_error))
}
file.openOutputStream().also {
// Force overwrite old file
(it as? FileOutputStream)?.channel?.truncate(0)
}.sink().gzip().buffer().use { it.write(byteArray) }
val fileUri = file.uri
// Make sure it's a valid backup file
FullBackupRestoreValidator().validate(context, fileUri)
return fileUri.toString()
} catch (e: Exception) {
Timber.e(e)
logcat(LogPriority.ERROR, e)
file?.delete()
throw e
}
}

View File

@ -9,6 +9,7 @@ import eu.kanade.tachiyomi.data.backup.full.models.BackupCategory
import eu.kanade.tachiyomi.data.backup.full.models.BackupHistory
import eu.kanade.tachiyomi.data.backup.full.models.BackupManga
import eu.kanade.tachiyomi.data.backup.full.models.BackupSerializer
import eu.kanade.tachiyomi.data.backup.full.models.BackupSource
import eu.kanade.tachiyomi.data.database.models.Chapter
import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.data.database.models.Track
@ -33,7 +34,8 @@ class FullBackupRestore(context: Context, notifier: BackupNotifier) : AbstractBa
}
// Store source mapping for error messages
sourceMapping = backup.backupSources.map { it.sourceId to it.name }.toMap()
var backupMaps = backup.backupBrokenSources.map { BackupSource(it.name, it.sourceId) } + backup.backupSources
sourceMapping = backupMaps.map { it.sourceId to it.name }.toMap()
// Restore individual manga
backup.backupManga.forEach {
@ -62,7 +64,7 @@ class FullBackupRestore(context: Context, notifier: BackupNotifier) : AbstractBa
val manga = backupManga.getMangaImpl()
val chapters = backupManga.getChaptersImpl()
val categories = backupManga.categories
val history = backupManga.history
val history = backupManga.brokenHistory.map { BackupHistory(it.url, it.lastRead) } + backupManga.history
val tracks = backupManga.getTrackingImpl()
try {
@ -91,7 +93,7 @@ class FullBackupRestore(context: Context, notifier: BackupNotifier) : AbstractBa
categories: List<Int>,
history: List<BackupHistory>,
tracks: List<Track>,
backupCategories: List<BackupCategory>
backupCategories: List<BackupCategory>,
) {
db.inTransaction {
val dbManga = backupManager.getMangaFromDatabase(manga)
@ -121,7 +123,7 @@ class FullBackupRestore(context: Context, notifier: BackupNotifier) : AbstractBa
categories: List<Int>,
history: List<BackupHistory>,
tracks: List<Track>,
backupCategories: List<BackupCategory>
backupCategories: List<BackupCategory>,
) {
try {
val fetchedManga = backupManager.restoreManga(manga)
@ -141,7 +143,7 @@ class FullBackupRestore(context: Context, notifier: BackupNotifier) : AbstractBa
categories: List<Int>,
history: List<BackupHistory>,
tracks: List<Track>,
backupCategories: List<BackupCategory>
backupCategories: List<BackupCategory>,
) {
backupManager.restoreChaptersForManga(backupManga, chapters)

View File

@ -4,12 +4,14 @@ import android.content.Context
import android.net.Uri
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.backup.AbstractBackupRestoreValidator
import eu.kanade.tachiyomi.data.backup.ValidatorParseException
import eu.kanade.tachiyomi.data.backup.full.models.BackupSerializer
import okio.buffer
import okio.gzip
import okio.source
class FullBackupRestoreValidator : AbstractBackupRestoreValidator() {
/**
* Checks for critical backup file data.
*
@ -19,14 +21,20 @@ class FullBackupRestoreValidator : AbstractBackupRestoreValidator() {
override fun validate(context: Context, uri: Uri): Results {
val backupManager = FullBackupManager(context)
val backupString = context.contentResolver.openInputStream(uri)!!.source().gzip().buffer().use { it.readByteArray() }
val backup = backupManager.parser.decodeFromByteArray(BackupSerializer, backupString)
val backup = try {
val backupString =
context.contentResolver.openInputStream(uri)!!.source().gzip().buffer()
.use { it.readByteArray() }
backupManager.parser.decodeFromByteArray(BackupSerializer, backupString)
} catch (e: Exception) {
throw ValidatorParseException(e)
}
if (backup.backupManga.isEmpty()) {
throw Exception(context.getString(R.string.invalid_backup_file_missing_manga))
}
val sources = backup.backupSources.map { it.sourceId to it.name }.toMap()
val sources = backup.backupSources.associate { it.sourceId to it.name }
val missingSources = sources
.filter { sourceManager.get(it.key) == null }
.values

View File

@ -8,5 +8,6 @@ data class Backup(
@ProtoNumber(1) val backupManga: List<BackupManga>,
@ProtoNumber(2) var backupCategories: List<BackupCategory> = emptyList(),
// Bump by 100 to specify this is a 0.x value
@ProtoNumber(100) var backupSources: List<BackupSource> = emptyList(),
@ProtoNumber(100) var backupBrokenSources: List<BrokenBackupSource> = emptyList(),
@ProtoNumber(101) var backupSources: List<BackupSource> = emptyList(),
)

View File

@ -26,7 +26,7 @@ class BackupCategory(
return BackupCategory(
name = category.name,
order = category.order,
flags = category.flags
flags = category.flags,
)
}
}

View File

@ -49,7 +49,7 @@ data class BackupChapter(
lastPageRead = chapter.last_page_read,
dateFetch = chapter.date_fetch,
dateUpload = chapter.date_upload,
sourceOrder = chapter.source_order
sourceOrder = chapter.source_order,
)
}
}

View File

@ -4,7 +4,13 @@ import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class BackupHistory(
data class BrokenBackupHistory(
@ProtoNumber(0) var url: String,
@ProtoNumber(1) var lastRead: Long
@ProtoNumber(1) var lastRead: Long,
)
@Serializable
data class BackupHistory(
@ProtoNumber(1) var url: String,
@ProtoNumber(2) var lastRead: Long,
)

View File

@ -33,8 +33,9 @@ data class BackupManga(
// Bump by 100 for values that are not saved/implemented in 1.x but are used in 0.x
@ProtoNumber(100) var favorite: Boolean = true,
@ProtoNumber(101) var chapterFlags: Int = 0,
@ProtoNumber(102) var history: List<BackupHistory> = emptyList(),
@ProtoNumber(103) var viewer_flags: Int? = null
@ProtoNumber(102) var brokenHistory: List<BrokenBackupHistory> = emptyList(),
@ProtoNumber(103) var viewer_flags: Int? = null,
@ProtoNumber(104) var history: List<BackupHistory> = emptyList(),
) {
fun getMangaImpl(): MangaImpl {
return MangaImpl().apply {
@ -82,7 +83,7 @@ data class BackupManga(
dateAdded = manga.date_added,
viewer = manga.readingModeType,
viewer_flags = manga.viewer_flags,
chapterFlags = manga.chapter_flags
chapterFlags = manga.chapter_flags,
)
}
}

View File

@ -5,15 +5,21 @@ import kotlinx.serialization.Serializable
import kotlinx.serialization.protobuf.ProtoNumber
@Serializable
data class BackupSource(
data class BrokenBackupSource(
@ProtoNumber(0) var name: String = "",
@ProtoNumber(1) var sourceId: Long
@ProtoNumber(1) var sourceId: Long,
)
@Serializable
data class BackupSource(
@ProtoNumber(1) var name: String = "",
@ProtoNumber(2) var sourceId: Long,
) {
companion object {
fun copyFrom(source: Source): BackupSource {
return BackupSource(
name = source.name,
sourceId = source.id
sourceId = source.id,
)
}
}

View File

@ -32,8 +32,7 @@ data class BackupTracking(
media_id = this@BackupTracking.mediaId
library_id = this@BackupTracking.libraryId
title = this@BackupTracking.title
// convert from float to int because of 1.x types
last_chapter_read = this@BackupTracking.lastChapterRead.toInt()
last_chapter_read = this@BackupTracking.lastChapterRead
total_chapters = this@BackupTracking.totalChapters
score = this@BackupTracking.score
status = this@BackupTracking.status
@ -51,14 +50,13 @@ data class BackupTracking(
// forced not null so its compatible with 1.x backup system
libraryId = track.library_id!!,
title = track.title,
// convert to float for 1.x
lastChapterRead = track.last_chapter_read.toFloat(),
lastChapterRead = track.last_chapter_read,
totalChapters = track.total_chapters,
score = track.score,
status = track.status,
startedReadingDate = track.started_reading_date,
finishedReadingDate = track.finished_reading_date,
trackingUrl = track.tracking_url
trackingUrl = track.tracking_url,
)
}
}

View File

@ -55,9 +55,9 @@ class LegacyBackupManager(context: Context, version: Int = CURRENT_VERSION) : Ab
* Create backup Json file from database
*
* @param uri path of Uri
* @param isJob backup called from job
* @param isAutoBackup backup called from scheduled backup job
*/
override fun createBackup(uri: Uri, flags: Int, isJob: Boolean) =
override fun createBackup(uri: Uri, flags: Int, isAutoBackup: Boolean) =
throw IllegalStateException("Legacy backup creation is not supported")
fun restoreMangaNoFetch(manga: Manga, dbManga: Manga) {

View File

@ -13,13 +13,12 @@ import eu.kanade.tachiyomi.data.database.models.Chapter
import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.data.database.models.Track
import eu.kanade.tachiyomi.source.Source
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonObject
import kotlinx.serialization.json.decodeFromJsonElement
import kotlinx.serialization.json.decodeFromStream
import kotlinx.serialization.json.intOrNull
import kotlinx.serialization.json.jsonPrimitive
import okio.buffer
import okio.source
import java.util.Date
@ -28,8 +27,8 @@ class LegacyBackupRestore(context: Context, notifier: BackupNotifier) : Abstract
override suspend fun performRestore(uri: Uri): Boolean {
// Read the json and create a Json Object,
// cannot use the backupManager json deserializer one because its not initialized yet
val backupObject = Json.decodeFromString<JsonObject>(
context.contentResolver.openInputStream(uri)!!.source().buffer().use { it.readUtf8() }
val backupObject = Json.decodeFromStream<JsonObject>(
context.contentResolver.openInputStream(uri)!!,
)
// Get parser version
@ -110,7 +109,7 @@ class LegacyBackupRestore(context: Context, notifier: BackupNotifier) : Abstract
chapters: List<Chapter>,
categories: List<String>,
history: List<DHistory>,
tracks: List<Track>
tracks: List<Track>,
) {
val dbManga = backupManager.getMangaFromDatabase(manga)
@ -140,7 +139,7 @@ class LegacyBackupRestore(context: Context, notifier: BackupNotifier) : Abstract
chapters: List<Chapter>,
categories: List<String>,
history: List<DHistory>,
tracks: List<Track>
tracks: List<Track>,
) {
try {
val fetchedManga = backupManager.fetchManga(source, manga)
@ -162,7 +161,7 @@ class LegacyBackupRestore(context: Context, notifier: BackupNotifier) : Abstract
chapters: List<Chapter>,
categories: List<String>,
history: List<DHistory>,
tracks: List<Track>
tracks: List<Track>,
) {
if (!backupManager.restoreChaptersForManga(backupManga, chapters)) {
updateChapters(source, backupManga, chapters)

View File

@ -4,12 +4,12 @@ import android.content.Context
import android.net.Uri
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.backup.AbstractBackupRestoreValidator
import eu.kanade.tachiyomi.data.backup.ValidatorParseException
import eu.kanade.tachiyomi.data.backup.legacy.models.Backup
import kotlinx.serialization.decodeFromString
import okio.buffer
import okio.source
import kotlinx.serialization.json.decodeFromStream
class LegacyBackupRestoreValidator : AbstractBackupRestoreValidator() {
/**
* Checks for critical backup file data.
*
@ -19,9 +19,13 @@ class LegacyBackupRestoreValidator : AbstractBackupRestoreValidator() {
override fun validate(context: Context, uri: Uri): Results {
val backupManager = LegacyBackupManager(context)
val backup = backupManager.parser.decodeFromString<Backup>(
context.contentResolver.openInputStream(uri)!!.source().buffer().use { it.readUtf8() }
)
val backup = try {
backupManager.parser.decodeFromStream<Backup>(
context.contentResolver.openInputStream(uri)!!,
)
} catch (e: Exception) {
throw ValidatorParseException(e)
}
if (backup.version == null) {
throw Exception(context.getString(R.string.invalid_backup_file_missing_data))
@ -53,12 +57,10 @@ class LegacyBackupRestoreValidator : AbstractBackupRestoreValidator() {
companion object {
fun getSourceMapping(extensionsMapping: List<String>): Map<Long, String> {
return extensionsMapping
.map {
val items = it.split(":")
items[0].toLong() to items[1]
}
.toMap()
return extensionsMapping.associate {
val items = it.split(":")
items[0].toLong() to items[1]
}
}
}
}

View File

@ -15,7 +15,7 @@ data class Backup(
val version: Int? = null,
var mangas: MutableList<MangaObject> = mutableListOf(),
var categories: List<@Contextual Category>? = null,
var extensions: List<String>? = null
var extensions: List<String>? = null,
) {
companion object {
const val CURRENT_VERSION = 2
@ -33,5 +33,5 @@ data class MangaObject(
var chapters: List<@Contextual Chapter>? = null,
var categories: List<String>? = null,
var track: List<@Contextual Track>? = null,
var history: List<@Contextual DHistory>? = null
var history: List<@Contextual DHistory>? = null,
)

View File

@ -27,7 +27,7 @@ open class CategoryBaseSerializer<T : Category> : KSerializer<T> {
buildJsonArray {
add(value.name)
add(value.order)
}
},
)
}

View File

@ -35,7 +35,7 @@ open class ChapterBaseSerializer<T : Chapter> : KSerializer<T> {
if (value.last_page_read != 0) {
put(LAST_READ, value.last_page_read)
}
}
},
)
}

View File

@ -26,7 +26,7 @@ object HistoryTypeSerializer : KSerializer<DHistory> {
buildJsonArray {
add(value.url)
add(value.lastRead)
}
},
)
}
@ -35,7 +35,7 @@ object HistoryTypeSerializer : KSerializer<DHistory> {
val array = decoder.decodeJsonElement().jsonArray
return DHistory(
url = array[0].jsonPrimitive.content,
lastRead = array[1].jsonPrimitive.long
lastRead = array[1].jsonPrimitive.long,
)
}
}

View File

@ -31,7 +31,7 @@ open class MangaBaseSerializer<T : Manga> : KSerializer<T> {
add(value.source)
add(value.viewer_flags)
add(value.chapter_flags)
}
},
)
}

View File

@ -10,6 +10,7 @@ import kotlinx.serialization.encoding.Encoder
import kotlinx.serialization.json.JsonDecoder
import kotlinx.serialization.json.JsonEncoder
import kotlinx.serialization.json.buildJsonObject
import kotlinx.serialization.json.float
import kotlinx.serialization.json.int
import kotlinx.serialization.json.jsonObject
import kotlinx.serialization.json.jsonPrimitive
@ -32,7 +33,7 @@ open class TrackBaseSerializer<T : Track> : KSerializer<T> {
put(LIBRARY, value.library_id)
put(LAST_READ, value.last_chapter_read)
put(TRACKING_URL, value.tracking_url)
}
},
)
}
@ -46,7 +47,7 @@ open class TrackBaseSerializer<T : Track> : KSerializer<T> {
sync_id = jsonObject[SYNC]!!.jsonPrimitive.int
media_id = jsonObject[MEDIA]!!.jsonPrimitive.int
library_id = jsonObject[LIBRARY]!!.jsonPrimitive.long
last_chapter_read = jsonObject[LAST_READ]!!.jsonPrimitive.int
last_chapter_read = jsonObject[LAST_READ]!!.jsonPrimitive.float
tracking_url = jsonObject[TRACKING_URL]!!.jsonPrimitive.content
} as T
}

View File

@ -49,7 +49,7 @@ class ChapterCache(private val context: Context) {
File(context.cacheDir, PARAMETER_CACHE_DIRECTORY),
PARAMETER_APP_VERSION,
PARAMETER_VALUE_COUNT,
PARAMETER_CACHE_SIZE
PARAMETER_CACHE_SIZE,
)
/**

View File

@ -104,7 +104,7 @@ class CoverCache(private val context: Context) {
* Clear coil's memory cache.
*/
fun clearMemoryCache() {
context.imageLoader.memoryCache.clear()
context.imageLoader.memoryCache?.clear()
}
private fun getCacheDir(dir: String): File {

View File

@ -1,25 +0,0 @@
package eu.kanade.tachiyomi.data.coil
import coil.bitmap.BitmapPool
import coil.decode.DataSource
import coil.decode.Options
import coil.fetch.FetchResult
import coil.fetch.Fetcher
import coil.fetch.SourceResult
import coil.size.Size
import okio.buffer
import okio.source
import java.io.ByteArrayInputStream
import java.nio.ByteBuffer
class ByteBufferFetcher : Fetcher<ByteBuffer> {
override suspend fun fetch(pool: BitmapPool, data: ByteBuffer, size: Size, options: Options): FetchResult {
return SourceResult(
source = ByteArrayInputStream(data.array()).source().buffer(),
mimeType = null,
dataSource = DataSource.MEMORY
)
}
override fun key(data: ByteBuffer): String? = null
}

View File

@ -1,148 +1,261 @@
package eu.kanade.tachiyomi.data.coil
import coil.bitmap.BitmapPool
import coil.ImageLoader
import coil.decode.DataSource
import coil.decode.Options
import coil.decode.ImageSource
import coil.disk.DiskCache
import coil.fetch.FetchResult
import coil.fetch.Fetcher
import coil.fetch.SourceResult
import coil.network.HttpException
import coil.request.get
import coil.size.Size
import coil.request.Options
import coil.request.Parameters
import eu.kanade.tachiyomi.data.cache.CoverCache
import eu.kanade.tachiyomi.data.coil.MangaCoverFetcher.Companion.USE_CUSTOM_COVER
import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.network.NetworkHelper
import eu.kanade.tachiyomi.network.await
import eu.kanade.tachiyomi.source.SourceManager
import eu.kanade.tachiyomi.source.online.HttpSource
import eu.kanade.tachiyomi.util.system.logcat
import logcat.LogPriority
import okhttp3.CacheControl
import okhttp3.Call
import okhttp3.Request
import okhttp3.Response
import okhttp3.ResponseBody
import okhttp3.internal.closeQuietly
import okio.Path.Companion.toOkioPath
import okio.Source
import okio.buffer
import okio.sink
import okio.source
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import uy.kohesive.injekt.injectLazy
import java.io.File
import java.net.HttpURLConnection
/**
* Coil component that fetches [Manga] cover while using the cached file in disk when available.
* A [Fetcher] that fetches cover image for [Manga] object.
*
* It uses [Manga.thumbnail_url] if custom cover is not set by the user.
* Disk caching for library items is handled by [CoverCache], otherwise
* handled by Coil's [DiskCache].
*
* Available request parameter:
* - [USE_CUSTOM_COVER]: Use custom cover if set by user, default is true
*/
class MangaCoverFetcher : Fetcher<Manga> {
private val coverCache: CoverCache by injectLazy()
private val sourceManager: SourceManager by injectLazy()
private val defaultClient = Injekt.get<NetworkHelper>().coilClient
class MangaCoverFetcher(
private val manga: Manga,
private val sourceLazy: Lazy<HttpSource?>,
private val options: Options,
private val coverCache: CoverCache,
private val callFactoryLazy: Lazy<Call.Factory>,
private val diskCacheLazy: Lazy<DiskCache>,
) : Fetcher {
override fun key(data: Manga): String? {
if (data.thumbnail_url.isNullOrBlank()) return null
return data.thumbnail_url!!
}
// For non-custom cover
private val diskCacheKey: String? by lazy { MangaCoverKeyer().key(manga, options) }
private lateinit var url: String
override suspend fun fetch(pool: BitmapPool, data: Manga, size: Size, options: Options): FetchResult {
override suspend fun fetch(): FetchResult {
// Use custom cover if exists
val useCustomCover = options.parameters[USE_CUSTOM_COVER] as? Boolean ?: true
val customCoverFile = coverCache.getCustomCoverFile(data)
val useCustomCover = options.parameters.value(USE_CUSTOM_COVER) ?: true
val customCoverFile = coverCache.getCustomCoverFile(manga)
if (useCustomCover && customCoverFile.exists()) {
return fileLoader(customCoverFile)
}
val cover = data.thumbnail_url
return when (getResourceType(cover)) {
Type.URL -> httpLoader(data, options)
Type.File -> fileLoader(data)
// diskCacheKey is thumbnail_url
url = diskCacheKey ?: error("No cover specified")
return when (getResourceType(url)) {
Type.URL -> httpLoader()
Type.File -> fileLoader(File(url.substringAfter("file://")))
null -> error("Invalid image")
}
}
private suspend fun httpLoader(manga: Manga, options: Options): FetchResult {
private fun fileLoader(file: File): FetchResult {
return SourceResult(
source = ImageSource(file = file.toOkioPath(), diskCacheKey = diskCacheKey),
mimeType = "image/*",
dataSource = DataSource.DISK,
)
}
private suspend fun httpLoader(): FetchResult {
// Only cache separately if it's a library item
val coverCacheFile = if (manga.favorite) {
val libraryCoverCacheFile = if (manga.favorite) {
coverCache.getCoverFile(manga) ?: error("No cover specified")
} else {
null
}
if (coverCacheFile?.exists() == true && options.diskCachePolicy.readEnabled) {
return fileLoader(coverCacheFile)
if (libraryCoverCacheFile?.exists() == true && options.diskCachePolicy.readEnabled) {
return fileLoader(libraryCoverCacheFile)
}
val (response, body) = awaitGetCall(manga, options)
if (!response.isSuccessful) {
body.close()
var snapshot = readFromDiskCache()
try {
// Fetch from disk cache
if (snapshot != null) {
val snapshotCoverCache = moveSnapshotToCoverCache(snapshot, libraryCoverCacheFile)
if (snapshotCoverCache != null) {
// Read from cover cache after added to library
return fileLoader(snapshotCoverCache)
}
// Read from snapshot
return SourceResult(
source = snapshot.toImageSource(),
mimeType = "image/*",
dataSource = DataSource.DISK,
)
}
// Fetch from network
val response = executeNetworkRequest()
val responseBody = checkNotNull(response.body) { "Null response source" }
try {
// Read from cover cache after library manga cover updated
val responseCoverCache = writeResponseToCoverCache(response, libraryCoverCacheFile)
if (responseCoverCache != null) {
return fileLoader(responseCoverCache)
}
// Read from disk cache
snapshot = writeToDiskCache(snapshot, response)
if (snapshot != null) {
return SourceResult(
source = snapshot.toImageSource(),
mimeType = "image/*",
dataSource = DataSource.NETWORK,
)
}
// Read from response if cache is unused or unusable
return SourceResult(
source = ImageSource(source = responseBody.source(), context = options.context),
mimeType = "image/*",
dataSource = if (response.cacheResponse != null) DataSource.DISK else DataSource.NETWORK,
)
} catch (e: Exception) {
responseBody.closeQuietly()
throw e
}
} catch (e: Exception) {
snapshot?.closeQuietly()
throw e
}
}
private suspend fun executeNetworkRequest(): Response {
val client = sourceLazy.value?.client ?: callFactoryLazy.value
val response = client.newCall(newRequest()).await()
if (!response.isSuccessful && response.code != HttpURLConnection.HTTP_NOT_MODIFIED) {
response.body?.closeQuietly()
throw HttpException(response)
}
return response
}
if (coverCacheFile != null && options.diskCachePolicy.writeEnabled) {
@Suppress("BlockingMethodInNonBlockingContext")
response.peekBody(Long.MAX_VALUE).source().use { input ->
coverCacheFile.parentFile?.mkdirs()
if (coverCacheFile.exists()) {
coverCacheFile.delete()
}
coverCacheFile.sink().buffer().use { output ->
output.writeAll(input)
}
private fun newRequest(): Request {
val request = Request.Builder()
.url(url)
.headers(sourceLazy.value?.headers ?: options.headers)
// Support attaching custom data to the network request.
.tag(Parameters::class.java, options.parameters)
val diskRead = options.diskCachePolicy.readEnabled
val networkRead = options.networkCachePolicy.readEnabled
when {
!networkRead && diskRead -> {
request.cacheControl(CacheControl.FORCE_CACHE)
}
networkRead && !diskRead -> if (options.diskCachePolicy.writeEnabled) {
request.cacheControl(CacheControl.FORCE_NETWORK)
} else {
request.cacheControl(CACHE_CONTROL_FORCE_NETWORK_NO_CACHE)
}
!networkRead && !diskRead -> {
// This causes the request to fail with a 504 Unsatisfiable Request.
request.cacheControl(CACHE_CONTROL_NO_NETWORK_NO_CACHE)
}
}
return SourceResult(
source = body.source(),
mimeType = "image/*",
dataSource = if (response.cacheResponse != null) DataSource.DISK else DataSource.NETWORK
)
return request.build()
}
private suspend fun awaitGetCall(manga: Manga, options: Options): Pair<Response, ResponseBody> {
val call = getCall(manga, options)
val response = call.await()
return response to checkNotNull(response.body) { "Null response source" }
}
private fun getCall(manga: Manga, options: Options): Call {
val source = sourceManager.get(manga.source) as? HttpSource
val request = Request.Builder().url(manga.thumbnail_url!!).also {
if (source != null) {
it.headers(source.headers)
private fun moveSnapshotToCoverCache(snapshot: DiskCache.Snapshot, cacheFile: File?): File? {
if (cacheFile == null) return null
return try {
diskCacheLazy.value.run {
fileSystem.source(snapshot.data).use { input ->
writeSourceToCoverCache(input, cacheFile)
}
remove(diskCacheKey!!)
}
cacheFile.takeIf { it.exists() }
} catch (e: Exception) {
logcat(LogPriority.ERROR, e) { "Failed to write snapshot data to cover cache ${cacheFile.name}" }
null
}
}
val networkRead = options.networkCachePolicy.readEnabled
val diskRead = options.diskCachePolicy.readEnabled
when {
!networkRead && diskRead -> {
it.cacheControl(CacheControl.FORCE_CACHE)
}
networkRead && !diskRead -> if (options.diskCachePolicy.writeEnabled) {
it.cacheControl(CacheControl.FORCE_NETWORK)
} else {
it.cacheControl(CACHE_CONTROL_FORCE_NETWORK_NO_CACHE)
}
!networkRead && !diskRead -> {
// This causes the request to fail with a 504 Unsatisfiable Request.
it.cacheControl(CACHE_CONTROL_NO_NETWORK_NO_CACHE)
}
private fun writeResponseToCoverCache(response: Response, cacheFile: File?): File? {
if (cacheFile == null || !options.diskCachePolicy.writeEnabled) return null
return try {
response.peekBody(Long.MAX_VALUE).source().use { input ->
writeSourceToCoverCache(input, cacheFile)
}
}.build()
val client = source?.client?.newBuilder()?.cache(defaultClient.cache)?.build() ?: defaultClient
return client.newCall(request)
cacheFile.takeIf { it.exists() }
} catch (e: Exception) {
logcat(LogPriority.ERROR, e) { "Failed to write response data to cover cache ${cacheFile.name}" }
null
}
}
private fun fileLoader(manga: Manga): FetchResult {
return fileLoader(File(manga.thumbnail_url!!.substringAfter("file://")))
private fun writeSourceToCoverCache(input: Source, cacheFile: File) {
cacheFile.parentFile?.mkdirs()
cacheFile.delete()
try {
cacheFile.sink().buffer().use { output ->
output.writeAll(input)
}
} catch (e: Exception) {
cacheFile.delete()
throw e
}
}
private fun fileLoader(file: File): FetchResult {
return SourceResult(
source = file.source().buffer(),
mimeType = "image/*",
dataSource = DataSource.DISK
)
private fun readFromDiskCache(): DiskCache.Snapshot? {
return if (options.diskCachePolicy.readEnabled) diskCacheLazy.value[diskCacheKey!!] else null
}
private fun writeToDiskCache(
snapshot: DiskCache.Snapshot?,
response: Response,
): DiskCache.Snapshot? {
if (!options.diskCachePolicy.writeEnabled) {
snapshot?.closeQuietly()
return null
}
val editor = if (snapshot != null) {
snapshot.closeAndEdit()
} else {
diskCacheLazy.value.edit(diskCacheKey!!)
} ?: return null
try {
diskCacheLazy.value.fileSystem.write(editor.data) {
response.body!!.source().readAll(this)
}
return editor.commitAndGet()
} catch (e: Exception) {
try {
editor.abort()
} catch (ignored: Exception) {
}
throw e
}
}
private fun DiskCache.Snapshot.toImageSource(): ImageSource {
return ImageSource(file = data, diskCacheKey = diskCacheKey, closeable = this)
}
private fun getResourceType(cover: String?): Type? {
@ -158,6 +271,20 @@ class MangaCoverFetcher : Fetcher<Manga> {
File, URL
}
class Factory(
private val callFactoryLazy: Lazy<Call.Factory>,
private val diskCacheLazy: Lazy<DiskCache>,
) : Fetcher.Factory<Manga> {
private val coverCache: CoverCache by injectLazy()
private val sourceManager: SourceManager by injectLazy()
override fun create(data: Manga, options: Options, imageLoader: ImageLoader): Fetcher {
val source = lazy { sourceManager.get(data.source) as? HttpSource }
return MangaCoverFetcher(data, source, options, coverCache, callFactoryLazy, diskCacheLazy)
}
}
companion object {
const val USE_CUSTOM_COVER = "use_custom_cover"

View File

@ -0,0 +1,11 @@
package eu.kanade.tachiyomi.data.coil
import coil.key.Keyer
import coil.request.Options
import eu.kanade.tachiyomi.data.database.models.Manga
class MangaCoverKeyer : Keyer<Manga> {
override fun key(data: Manga, options: Options): String? {
return data.thumbnail_url?.takeIf { it.isNotBlank() }
}
}

View File

@ -1,13 +1,14 @@
package eu.kanade.tachiyomi.data.coil
import android.content.res.Resources
import android.os.Build
import androidx.core.graphics.drawable.toDrawable
import coil.bitmap.BitmapPool
import coil.ImageLoader
import coil.decode.DecodeResult
import coil.decode.Decoder
import coil.decode.Options
import coil.size.Size
import coil.decode.ImageDecoderDecoder
import coil.decode.ImageSource
import coil.fetch.SourceResult
import coil.request.Options
import eu.kanade.tachiyomi.util.system.ImageUtil
import okio.BufferedSource
import tachiyomi.decoder.ImageDecoder
@ -15,26 +16,10 @@ import tachiyomi.decoder.ImageDecoder
/**
* A [Decoder] that uses built-in [ImageDecoder] to decode images that is not supported by the system.
*/
class TachiyomiImageDecoder(private val resources: Resources) : Decoder {
class TachiyomiImageDecoder(private val resources: ImageSource, private val options: Options) : Decoder {
override fun handles(source: BufferedSource, mimeType: String?): Boolean {
val type = source.peek().inputStream().use {
ImageUtil.findImageType(it)
}
return when (type) {
ImageUtil.ImageType.AVIF, ImageUtil.ImageType.JXL -> true
ImageUtil.ImageType.HEIF -> Build.VERSION.SDK_INT < Build.VERSION_CODES.O
else -> false
}
}
override suspend fun decode(
pool: BitmapPool,
source: BufferedSource,
size: Size,
options: Options
): DecodeResult {
val decoder = source.use {
override suspend fun decode(): DecodeResult {
val decoder = resources.sourceOrNull()?.use {
ImageDecoder.newInstance(it.inputStream())
}
@ -46,8 +31,31 @@ class TachiyomiImageDecoder(private val resources: Resources) : Decoder {
check(bitmap != null) { "Failed to decode image." }
return DecodeResult(
drawable = bitmap.toDrawable(resources),
isSampled = false
drawable = bitmap.toDrawable(options.context.resources),
isSampled = false,
)
}
class Factory : Decoder.Factory {
override fun create(result: SourceResult, options: Options, imageLoader: ImageLoader): Decoder? {
if (!isApplicable(result.source.source())) return null
return TachiyomiImageDecoder(result.source, options)
}
private fun isApplicable(source: BufferedSource): Boolean {
val type = source.peek().inputStream().use {
ImageUtil.findImageType(it)
}
return when (type) {
ImageUtil.ImageType.AVIF, ImageUtil.ImageType.JXL -> true
ImageUtil.ImageType.HEIF -> Build.VERSION.SDK_INT < Build.VERSION_CODES.O
else -> false
}
}
override fun equals(other: Any?) = other is ImageDecoderDecoder.Factory
override fun hashCode() = javaClass.hashCode()
}
}

View File

@ -20,7 +20,7 @@ class DbOpenCallback : SupportSQLiteOpenHelper.Callback(DATABASE_VERSION) {
/**
* Version of the database.
*/
const val DATABASE_VERSION = 12
const val DATABASE_VERSION = 14
}
override fun onCreate(db: SupportSQLiteDatabase) = with(db) {
@ -46,7 +46,7 @@ class DbOpenCallback : SupportSQLiteOpenHelper.Callback(DATABASE_VERSION) {
// Fix kissmanga covers after supporting cloudflare
db.execSQL(
"""UPDATE mangas SET thumbnail_url =
REPLACE(thumbnail_url, '93.174.95.110', 'kissmanga.com') WHERE source = 4"""
REPLACE(thumbnail_url, '93.174.95.110', 'kissmanga.com') WHERE source = 4""",
)
}
if (oldVersion < 3) {
@ -85,6 +85,15 @@ class DbOpenCallback : SupportSQLiteOpenHelper.Callback(DATABASE_VERSION) {
if (oldVersion < 12) {
db.execSQL(MangaTable.addNextUpdateCol)
}
if (oldVersion < 13) {
db.execSQL(TrackTable.renameTableToTemp)
db.execSQL(TrackTable.createTableQuery)
db.execSQL(TrackTable.insertFromTempTable)
db.execSQL(TrackTable.dropTempTable)
}
if (oldVersion < 14) {
db.execSQL(ChapterTable.fixDateUploadIfNeeded)
}
}
override fun onConfigure(db: SupportSQLiteDatabase) {

View File

@ -20,7 +20,7 @@ import eu.kanade.tachiyomi.data.database.tables.CategoryTable.TABLE
class CategoryTypeMapping : SQLiteTypeMapping<Category>(
CategoryPutResolver(),
CategoryGetResolver(),
CategoryDeleteResolver()
CategoryDeleteResolver(),
)
class CategoryPutResolver : DefaultPutResolver<Category>() {
@ -40,17 +40,17 @@ class CategoryPutResolver : DefaultPutResolver<Category>() {
COL_ID to obj.id,
COL_NAME to obj.name,
COL_ORDER to obj.order,
COL_FLAGS to obj.flags
COL_FLAGS to obj.flags,
)
}
class CategoryGetResolver : DefaultGetResolver<Category>() {
override fun mapFromCursor(cursor: Cursor): Category = CategoryImpl().apply {
id = cursor.getInt(cursor.getColumnIndex(COL_ID))
name = cursor.getString(cursor.getColumnIndex(COL_NAME))
order = cursor.getInt(cursor.getColumnIndex(COL_ORDER))
flags = cursor.getInt(cursor.getColumnIndex(COL_FLAGS))
id = cursor.getInt(cursor.getColumnIndexOrThrow(COL_ID))
name = cursor.getString(cursor.getColumnIndexOrThrow(COL_NAME))
order = cursor.getInt(cursor.getColumnIndexOrThrow(COL_ORDER))
flags = cursor.getInt(cursor.getColumnIndexOrThrow(COL_FLAGS))
}
}

View File

@ -28,7 +28,7 @@ import eu.kanade.tachiyomi.data.database.tables.ChapterTable.TABLE
class ChapterTypeMapping : SQLiteTypeMapping<Chapter>(
ChapterPutResolver(),
ChapterGetResolver(),
ChapterDeleteResolver()
ChapterDeleteResolver(),
)
class ChapterPutResolver : DefaultPutResolver<Chapter>() {
@ -56,25 +56,25 @@ class ChapterPutResolver : DefaultPutResolver<Chapter>() {
COL_DATE_UPLOAD to obj.date_upload,
COL_LAST_PAGE_READ to obj.last_page_read,
COL_CHAPTER_NUMBER to obj.chapter_number,
COL_SOURCE_ORDER to obj.source_order
COL_SOURCE_ORDER to obj.source_order,
)
}
class ChapterGetResolver : DefaultGetResolver<Chapter>() {
override fun mapFromCursor(cursor: Cursor): Chapter = ChapterImpl().apply {
id = cursor.getLong(cursor.getColumnIndex(COL_ID))
manga_id = cursor.getLong(cursor.getColumnIndex(COL_MANGA_ID))
url = cursor.getString(cursor.getColumnIndex(COL_URL))
name = cursor.getString(cursor.getColumnIndex(COL_NAME))
scanlator = cursor.getString(cursor.getColumnIndex(COL_SCANLATOR))
read = cursor.getInt(cursor.getColumnIndex(COL_READ)) == 1
bookmark = cursor.getInt(cursor.getColumnIndex(COL_BOOKMARK)) == 1
date_fetch = cursor.getLong(cursor.getColumnIndex(COL_DATE_FETCH))
date_upload = cursor.getLong(cursor.getColumnIndex(COL_DATE_UPLOAD))
last_page_read = cursor.getInt(cursor.getColumnIndex(COL_LAST_PAGE_READ))
chapter_number = cursor.getFloat(cursor.getColumnIndex(COL_CHAPTER_NUMBER))
source_order = cursor.getInt(cursor.getColumnIndex(COL_SOURCE_ORDER))
id = cursor.getLong(cursor.getColumnIndexOrThrow(COL_ID))
manga_id = cursor.getLong(cursor.getColumnIndexOrThrow(COL_MANGA_ID))
url = cursor.getString(cursor.getColumnIndexOrThrow(COL_URL))
name = cursor.getString(cursor.getColumnIndexOrThrow(COL_NAME))
scanlator = cursor.getString(cursor.getColumnIndexOrThrow(COL_SCANLATOR))
read = cursor.getInt(cursor.getColumnIndexOrThrow(COL_READ)) == 1
bookmark = cursor.getInt(cursor.getColumnIndexOrThrow(COL_BOOKMARK)) == 1
date_fetch = cursor.getLong(cursor.getColumnIndexOrThrow(COL_DATE_FETCH))
date_upload = cursor.getLong(cursor.getColumnIndexOrThrow(COL_DATE_UPLOAD))
last_page_read = cursor.getInt(cursor.getColumnIndexOrThrow(COL_LAST_PAGE_READ))
chapter_number = cursor.getFloat(cursor.getColumnIndexOrThrow(COL_CHAPTER_NUMBER))
source_order = cursor.getInt(cursor.getColumnIndexOrThrow(COL_SOURCE_ORDER))
}
}

View File

@ -20,7 +20,7 @@ import eu.kanade.tachiyomi.data.database.tables.HistoryTable.TABLE
class HistoryTypeMapping : SQLiteTypeMapping<History>(
HistoryPutResolver(),
HistoryGetResolver(),
HistoryDeleteResolver()
HistoryDeleteResolver(),
)
open class HistoryPutResolver : DefaultPutResolver<History>() {
@ -40,17 +40,17 @@ open class HistoryPutResolver : DefaultPutResolver<History>() {
COL_ID to obj.id,
COL_CHAPTER_ID to obj.chapter_id,
COL_LAST_READ to obj.last_read,
COL_TIME_READ to obj.time_read
COL_TIME_READ to obj.time_read,
)
}
class HistoryGetResolver : DefaultGetResolver<History>() {
override fun mapFromCursor(cursor: Cursor): History = HistoryImpl().apply {
id = cursor.getLong(cursor.getColumnIndex(COL_ID))
chapter_id = cursor.getLong(cursor.getColumnIndex(COL_CHAPTER_ID))
last_read = cursor.getLong(cursor.getColumnIndex(COL_LAST_READ))
time_read = cursor.getLong(cursor.getColumnIndex(COL_TIME_READ))
id = cursor.getLong(cursor.getColumnIndexOrThrow(COL_ID))
chapter_id = cursor.getLong(cursor.getColumnIndexOrThrow(COL_CHAPTER_ID))
last_read = cursor.getLong(cursor.getColumnIndexOrThrow(COL_LAST_READ))
time_read = cursor.getLong(cursor.getColumnIndexOrThrow(COL_TIME_READ))
}
}

View File

@ -18,7 +18,7 @@ import eu.kanade.tachiyomi.data.database.tables.MangaCategoryTable.TABLE
class MangaCategoryTypeMapping : SQLiteTypeMapping<MangaCategory>(
MangaCategoryPutResolver(),
MangaCategoryGetResolver(),
MangaCategoryDeleteResolver()
MangaCategoryDeleteResolver(),
)
class MangaCategoryPutResolver : DefaultPutResolver<MangaCategory>() {
@ -37,16 +37,16 @@ class MangaCategoryPutResolver : DefaultPutResolver<MangaCategory>() {
contentValuesOf(
COL_ID to obj.id,
COL_MANGA_ID to obj.manga_id,
COL_CATEGORY_ID to obj.category_id
COL_CATEGORY_ID to obj.category_id,
)
}
class MangaCategoryGetResolver : DefaultGetResolver<MangaCategory>() {
override fun mapFromCursor(cursor: Cursor): MangaCategory = MangaCategory().apply {
id = cursor.getLong(cursor.getColumnIndex(COL_ID))
manga_id = cursor.getLong(cursor.getColumnIndex(COL_MANGA_ID))
category_id = cursor.getInt(cursor.getColumnIndex(COL_CATEGORY_ID))
id = cursor.getLong(cursor.getColumnIndexOrThrow(COL_ID))
manga_id = cursor.getLong(cursor.getColumnIndexOrThrow(COL_MANGA_ID))
category_id = cursor.getInt(cursor.getColumnIndexOrThrow(COL_CATEGORY_ID))
}
}

View File

@ -22,7 +22,6 @@ import eu.kanade.tachiyomi.data.database.tables.MangaTable.COL_GENRE
import eu.kanade.tachiyomi.data.database.tables.MangaTable.COL_ID
import eu.kanade.tachiyomi.data.database.tables.MangaTable.COL_INITIALIZED
import eu.kanade.tachiyomi.data.database.tables.MangaTable.COL_LAST_UPDATE
import eu.kanade.tachiyomi.data.database.tables.MangaTable.COL_NEXT_UPDATE
import eu.kanade.tachiyomi.data.database.tables.MangaTable.COL_SOURCE
import eu.kanade.tachiyomi.data.database.tables.MangaTable.COL_STATUS
import eu.kanade.tachiyomi.data.database.tables.MangaTable.COL_THUMBNAIL_URL
@ -34,7 +33,7 @@ import eu.kanade.tachiyomi.data.database.tables.MangaTable.TABLE
class MangaTypeMapping : SQLiteTypeMapping<Manga>(
MangaPutResolver(),
MangaGetResolver(),
MangaDeleteResolver()
MangaDeleteResolver(),
)
class MangaPutResolver : DefaultPutResolver<Manga>() {
@ -63,35 +62,33 @@ class MangaPutResolver : DefaultPutResolver<Manga>() {
COL_THUMBNAIL_URL to obj.thumbnail_url,
COL_FAVORITE to obj.favorite,
COL_LAST_UPDATE to obj.last_update,
COL_NEXT_UPDATE to obj.next_update,
COL_INITIALIZED to obj.initialized,
COL_VIEWER to obj.viewer_flags,
COL_CHAPTER_FLAGS to obj.chapter_flags,
COL_COVER_LAST_MODIFIED to obj.cover_last_modified,
COL_DATE_ADDED to obj.date_added
COL_DATE_ADDED to obj.date_added,
)
}
interface BaseMangaGetResolver {
fun mapBaseFromCursor(manga: Manga, cursor: Cursor) = manga.apply {
id = cursor.getLong(cursor.getColumnIndex(COL_ID))
source = cursor.getLong(cursor.getColumnIndex(COL_SOURCE))
url = cursor.getString(cursor.getColumnIndex(COL_URL))
artist = cursor.getString(cursor.getColumnIndex(COL_ARTIST))
author = cursor.getString(cursor.getColumnIndex(COL_AUTHOR))
description = cursor.getString(cursor.getColumnIndex(COL_DESCRIPTION))
genre = cursor.getString(cursor.getColumnIndex(COL_GENRE))
title = cursor.getString(cursor.getColumnIndex(COL_TITLE))
status = cursor.getInt(cursor.getColumnIndex(COL_STATUS))
thumbnail_url = cursor.getString(cursor.getColumnIndex(COL_THUMBNAIL_URL))
favorite = cursor.getInt(cursor.getColumnIndex(COL_FAVORITE)) == 1
last_update = cursor.getLong(cursor.getColumnIndex(COL_LAST_UPDATE))
next_update = cursor.getLong(cursor.getColumnIndex(COL_NEXT_UPDATE))
initialized = cursor.getInt(cursor.getColumnIndex(COL_INITIALIZED)) == 1
viewer_flags = cursor.getInt(cursor.getColumnIndex(COL_VIEWER))
chapter_flags = cursor.getInt(cursor.getColumnIndex(COL_CHAPTER_FLAGS))
cover_last_modified = cursor.getLong(cursor.getColumnIndex(COL_COVER_LAST_MODIFIED))
date_added = cursor.getLong(cursor.getColumnIndex(COL_DATE_ADDED))
id = cursor.getLong(cursor.getColumnIndexOrThrow(COL_ID))
source = cursor.getLong(cursor.getColumnIndexOrThrow(COL_SOURCE))
url = cursor.getString(cursor.getColumnIndexOrThrow(COL_URL))
artist = cursor.getString(cursor.getColumnIndexOrThrow(COL_ARTIST))
author = cursor.getString(cursor.getColumnIndexOrThrow(COL_AUTHOR))
description = cursor.getString(cursor.getColumnIndexOrThrow(COL_DESCRIPTION))
genre = cursor.getString(cursor.getColumnIndexOrThrow(COL_GENRE))
title = cursor.getString(cursor.getColumnIndexOrThrow(COL_TITLE))
status = cursor.getInt(cursor.getColumnIndexOrThrow(COL_STATUS))
thumbnail_url = cursor.getString(cursor.getColumnIndexOrThrow(COL_THUMBNAIL_URL))
favorite = cursor.getInt(cursor.getColumnIndexOrThrow(COL_FAVORITE)) == 1
last_update = cursor.getLong(cursor.getColumnIndexOrThrow(COL_LAST_UPDATE))
initialized = cursor.getInt(cursor.getColumnIndexOrThrow(COL_INITIALIZED)) == 1
viewer_flags = cursor.getInt(cursor.getColumnIndexOrThrow(COL_VIEWER))
chapter_flags = cursor.getInt(cursor.getColumnIndexOrThrow(COL_CHAPTER_FLAGS))
cover_last_modified = cursor.getLong(cursor.getColumnIndexOrThrow(COL_COVER_LAST_MODIFIED))
date_added = cursor.getLong(cursor.getColumnIndexOrThrow(COL_DATE_ADDED))
}
}

View File

@ -29,7 +29,7 @@ import eu.kanade.tachiyomi.data.database.tables.TrackTable.TABLE
class TrackTypeMapping : SQLiteTypeMapping<Track>(
TrackPutResolver(),
TrackGetResolver(),
TrackDeleteResolver()
TrackDeleteResolver(),
)
class TrackPutResolver : DefaultPutResolver<Track>() {
@ -58,26 +58,26 @@ class TrackPutResolver : DefaultPutResolver<Track>() {
COL_TRACKING_URL to obj.tracking_url,
COL_SCORE to obj.score,
COL_START_DATE to obj.started_reading_date,
COL_FINISH_DATE to obj.finished_reading_date
COL_FINISH_DATE to obj.finished_reading_date,
)
}
class TrackGetResolver : DefaultGetResolver<Track>() {
override fun mapFromCursor(cursor: Cursor): Track = TrackImpl().apply {
id = cursor.getLong(cursor.getColumnIndex(COL_ID))
manga_id = cursor.getLong(cursor.getColumnIndex(COL_MANGA_ID))
sync_id = cursor.getInt(cursor.getColumnIndex(COL_SYNC_ID))
media_id = cursor.getInt(cursor.getColumnIndex(COL_MEDIA_ID))
library_id = cursor.getLong(cursor.getColumnIndex(COL_LIBRARY_ID))
title = cursor.getString(cursor.getColumnIndex(COL_TITLE))
last_chapter_read = cursor.getInt(cursor.getColumnIndex(COL_LAST_CHAPTER_READ))
total_chapters = cursor.getInt(cursor.getColumnIndex(COL_TOTAL_CHAPTERS))
status = cursor.getInt(cursor.getColumnIndex(COL_STATUS))
score = cursor.getFloat(cursor.getColumnIndex(COL_SCORE))
tracking_url = cursor.getString(cursor.getColumnIndex(COL_TRACKING_URL))
started_reading_date = cursor.getLong(cursor.getColumnIndex(COL_START_DATE))
finished_reading_date = cursor.getLong(cursor.getColumnIndex(COL_FINISH_DATE))
id = cursor.getLong(cursor.getColumnIndexOrThrow(COL_ID))
manga_id = cursor.getLong(cursor.getColumnIndexOrThrow(COL_MANGA_ID))
sync_id = cursor.getInt(cursor.getColumnIndexOrThrow(COL_SYNC_ID))
media_id = cursor.getInt(cursor.getColumnIndexOrThrow(COL_MEDIA_ID))
library_id = cursor.getLong(cursor.getColumnIndexOrThrow(COL_LIBRARY_ID))
title = cursor.getString(cursor.getColumnIndexOrThrow(COL_TITLE))
last_chapter_read = cursor.getFloat(cursor.getColumnIndexOrThrow(COL_LAST_CHAPTER_READ))
total_chapters = cursor.getInt(cursor.getColumnIndexOrThrow(COL_TOTAL_CHAPTERS))
status = cursor.getInt(cursor.getColumnIndexOrThrow(COL_STATUS))
score = cursor.getFloat(cursor.getColumnIndexOrThrow(COL_SCORE))
tracking_url = cursor.getString(cursor.getColumnIndexOrThrow(COL_TRACKING_URL))
started_reading_date = cursor.getLong(cursor.getColumnIndexOrThrow(COL_START_DATE))
finished_reading_date = cursor.getLong(cursor.getColumnIndexOrThrow(COL_FINISH_DATE))
}
}

View File

@ -1,5 +1,7 @@
package eu.kanade.tachiyomi.data.database.models
import android.content.Context
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.ui.library.setting.DisplayModeSetting
import eu.kanade.tachiyomi.ui.library.setting.SortDirectionSetting
import eu.kanade.tachiyomi.ui.library.setting.SortModeSetting
@ -37,6 +39,6 @@ interface Category : Serializable {
this.name = name
}
fun createDefault(): Category = create("Default").apply { id = 0 }
fun createDefault(context: Context): Category = create(context.getString(R.string.label_default)).apply { id = 0 }
}
}

View File

@ -2,7 +2,14 @@ package eu.kanade.tachiyomi.data.database.models
class LibraryManga : MangaImpl() {
var unread: Int = 0
var unreadCount: Int = 0
var readCount: Int = 0
val totalChapters
get() = readCount + unreadCount
val hasStarted
get() = readCount > 0
var category: Int = 0
}

View File

@ -16,9 +16,6 @@ interface Manga : SManga {
// last time the chapter list changed in any way
var last_update: Long
// predicted next update time based on latest (by date) 4 chapters' deltas
var next_update: Long
var date_added: Long
var viewer_flags: Int
@ -36,7 +33,8 @@ interface Manga : SManga {
}
fun getGenres(): List<String>? {
return genre?.split(", ")?.map { it.trim() }
if (genre.isNullOrBlank()) return null
return genre?.split(", ")?.map { it.trim() }?.filterNot { it.isBlank() }?.distinct()
}
private fun setChapterFlags(flag: Int, mask: Int) {
@ -127,6 +125,6 @@ fun Manga.toMangaInfo(): MangaInfo {
genres = this.getGenres() ?: emptyList(),
key = this.url,
status = this.status,
title = this.title
title = this.title,
)
}

View File

@ -26,8 +26,6 @@ open class MangaImpl : Manga {
override var last_update: Long = 0
override var next_update: Long = 0
override var date_added: Long = 0
override var initialized: Boolean = false

View File

@ -0,0 +1,3 @@
package eu.kanade.tachiyomi.data.database.models
data class SourceIdMangaCount(val source: Long, val count: Int)

View File

@ -16,7 +16,7 @@ interface Track : Serializable {
var title: String
var last_chapter_read: Int
var last_chapter_read: Float
var total_chapters: Int

View File

@ -14,7 +14,7 @@ class TrackImpl : Track {
override lateinit var title: String
override var last_chapter_read: Int = 0
override var last_chapter_read: Float = 0F
override var total_chapters: Int = 0

View File

@ -15,7 +15,7 @@ interface CategoryQueries : DbProvider {
Query.builder()
.table(CategoryTable.TABLE)
.orderBy(CategoryTable.COL_ORDER)
.build()
.build(),
)
.prepare()
@ -25,7 +25,7 @@ interface CategoryQueries : DbProvider {
RawQuery.builder()
.query(getCategoriesForMangaQuery())
.args(manga.id)
.build()
.build(),
)
.prepare()

View File

@ -23,7 +23,7 @@ interface ChapterQueries : DbProvider {
.table(ChapterTable.TABLE)
.where("${ChapterTable.COL_MANGA_ID} = ?")
.whereArgs(manga.id)
.build()
.build(),
)
.prepare()
@ -34,7 +34,7 @@ interface ChapterQueries : DbProvider {
.query(getRecentsQuery())
.args(date.time)
.observesTables(ChapterTable.TABLE)
.build()
.build(),
)
.withGetResolver(MangaChapterGetResolver.INSTANCE)
.prepare()
@ -46,7 +46,7 @@ interface ChapterQueries : DbProvider {
.table(ChapterTable.TABLE)
.where("${ChapterTable.COL_ID} = ?")
.whereArgs(id)
.build()
.build(),
)
.prepare()
@ -57,7 +57,7 @@ interface ChapterQueries : DbProvider {
.table(ChapterTable.TABLE)
.where("${ChapterTable.COL_URL} = ?")
.whereArgs(url)
.build()
.build(),
)
.prepare()
@ -68,7 +68,7 @@ interface ChapterQueries : DbProvider {
.table(ChapterTable.TABLE)
.where("${ChapterTable.COL_URL} = ? AND ${ChapterTable.COL_MANGA_ID} = ?")
.whereArgs(url, mangaId)
.build()
.build(),
)
.prepare()

View File

@ -32,7 +32,7 @@ interface HistoryQueries : DbProvider {
.query(getRecentMangasQuery(search))
.args(date.time, limit, offset)
.observesTables(HistoryTable.TABLE)
.build()
.build(),
)
.withGetResolver(MangaChapterHistoryGetResolver.INSTANCE)
.prepare()
@ -44,7 +44,7 @@ interface HistoryQueries : DbProvider {
.query(getHistoryByMangaId())
.args(mangaId)
.observesTables(HistoryTable.TABLE)
.build()
.build(),
)
.prepare()
@ -55,7 +55,7 @@ interface HistoryQueries : DbProvider {
.query(getHistoryByChapterUrl())
.args(chapterUrl)
.observesTables(HistoryTable.TABLE)
.build()
.build(),
)
.prepare()
@ -83,7 +83,7 @@ interface HistoryQueries : DbProvider {
.byQuery(
DeleteQuery.builder()
.table(HistoryTable.TABLE)
.build()
.build(),
)
.prepare()
@ -93,7 +93,7 @@ interface HistoryQueries : DbProvider {
.table(HistoryTable.TABLE)
.where("${HistoryTable.COL_LAST_READ} = ?")
.whereArgs(0)
.build()
.build(),
)
.prepare()
}

View File

@ -20,7 +20,7 @@ interface MangaCategoryQueries : DbProvider {
.table(MangaCategoryTable.TABLE)
.where("${MangaCategoryTable.COL_MANGA_ID} IN (${Queries.placeholders(mangas.size)})")
.whereArgs(*mangas.map { it.id }.toTypedArray())
.build()
.build(),
)
.prepare()

View File

@ -1,5 +1,6 @@
package eu.kanade.tachiyomi.data.database.queries
import com.pushtorefresh.storio.Queries
import com.pushtorefresh.storio.sqlite.operations.get.PreparedGetListOfObjects
import com.pushtorefresh.storio.sqlite.queries.DeleteQuery
import com.pushtorefresh.storio.sqlite.queries.Query
@ -7,7 +8,14 @@ import com.pushtorefresh.storio.sqlite.queries.RawQuery
import eu.kanade.tachiyomi.data.database.DbProvider
import eu.kanade.tachiyomi.data.database.models.LibraryManga
import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.data.database.resolvers.*
import eu.kanade.tachiyomi.data.database.models.SourceIdMangaCount
import eu.kanade.tachiyomi.data.database.resolvers.LibraryMangaGetResolver
import eu.kanade.tachiyomi.data.database.resolvers.MangaCoverLastModifiedPutResolver
import eu.kanade.tachiyomi.data.database.resolvers.MangaFavoritePutResolver
import eu.kanade.tachiyomi.data.database.resolvers.MangaFlagsPutResolver
import eu.kanade.tachiyomi.data.database.resolvers.MangaLastUpdatedPutResolver
import eu.kanade.tachiyomi.data.database.resolvers.MangaTitlePutResolver
import eu.kanade.tachiyomi.data.database.resolvers.SourceIdMangaCountGetResolver
import eu.kanade.tachiyomi.data.database.tables.CategoryTable
import eu.kanade.tachiyomi.data.database.tables.ChapterTable
import eu.kanade.tachiyomi.data.database.tables.MangaCategoryTable
@ -21,11 +29,26 @@ interface MangaQueries : DbProvider {
RawQuery.builder()
.query(libraryQuery)
.observesTables(MangaTable.TABLE, ChapterTable.TABLE, MangaCategoryTable.TABLE, CategoryTable.TABLE)
.build()
.build(),
)
.withGetResolver(LibraryMangaGetResolver.INSTANCE)
.prepare()
fun getDuplicateLibraryManga(manga: Manga) = db.get()
.`object`(Manga::class.java)
.withQuery(
Query.builder()
.table(MangaTable.TABLE)
.where("${MangaTable.COL_FAVORITE} = 1 AND LOWER(${MangaTable.COL_TITLE}) = ? AND ${MangaTable.COL_SOURCE} != ?")
.whereArgs(
manga.title.lowercase(),
manga.source,
)
.limit(1)
.build(),
)
.prepare()
fun getFavoriteMangas(sortByTitle: Boolean = true): PreparedGetListOfObjects<Manga> {
var queryBuilder = Query.builder()
.table(MangaTable.TABLE)
@ -49,7 +72,7 @@ interface MangaQueries : DbProvider {
.table(MangaTable.TABLE)
.where("${MangaTable.COL_URL} = ? AND ${MangaTable.COL_SOURCE} = ?")
.whereArgs(url, sourceId)
.build()
.build(),
)
.prepare()
@ -60,10 +83,21 @@ interface MangaQueries : DbProvider {
.table(MangaTable.TABLE)
.where("${MangaTable.COL_ID} = ?")
.whereArgs(id)
.build()
.build(),
)
.prepare()
fun getSourceIdsWithNonLibraryManga() = db.get()
.listOfObjects(SourceIdMangaCount::class.java)
.withQuery(
RawQuery.builder()
.query(getSourceIdsWithNonLibraryMangaQuery())
.observesTables(MangaTable.TABLE)
.build(),
)
.withGetResolver(SourceIdMangaCountGetResolver.INSTANCE)
.prepare()
fun insertManga(manga: Manga) = db.put().`object`(manga).prepare()
fun insertMangas(mangas: List<Manga>) = db.put().objects(mangas).prepare()
@ -75,7 +109,7 @@ interface MangaQueries : DbProvider {
fun updateChapterFlags(manga: List<Manga>) = db.put()
.objects(manga)
.withPutResolver(MangaFlagsPutResolver(MangaTable.COL_CHAPTER_FLAGS, Manga::chapter_flags, true))
.withPutResolver(MangaFlagsPutResolver(MangaTable.COL_CHAPTER_FLAGS, Manga::chapter_flags))
.prepare()
fun updateViewerFlags(manga: Manga) = db.put()
@ -85,12 +119,7 @@ interface MangaQueries : DbProvider {
fun updateViewerFlags(manga: List<Manga>) = db.put()
.objects(manga)
.withPutResolver(MangaFlagsPutResolver(MangaTable.COL_VIEWER, Manga::viewer_flags, true))
.prepare()
fun updateNextUpdated(manga: Manga) = db.put()
.`object`(manga)
.withPutResolver(MangaNextUpdatedPutResolver())
.withPutResolver(MangaFlagsPutResolver(MangaTable.COL_VIEWER, Manga::viewer_flags))
.prepare()
fun updateLastUpdated(manga: Manga) = db.put()
@ -117,13 +146,13 @@ interface MangaQueries : DbProvider {
fun deleteMangas(mangas: List<Manga>) = db.delete().objects(mangas).prepare()
fun deleteMangasNotInLibrary() = db.delete()
fun deleteMangasNotInLibraryBySourceIds(sourceIds: List<Long>) = db.delete()
.byQuery(
DeleteQuery.builder()
.table(MangaTable.TABLE)
.where("${MangaTable.COL_FAVORITE} = ?")
.whereArgs(0)
.build()
.where("${MangaTable.COL_FAVORITE} = ? AND ${MangaTable.COL_SOURCE} IN (${Queries.placeholders(sourceIds.size)})")
.whereArgs(0, *sourceIds.toTypedArray())
.build(),
)
.prepare()
@ -131,7 +160,7 @@ interface MangaQueries : DbProvider {
.byQuery(
DeleteQuery.builder()
.table(MangaTable.TABLE)
.build()
.build(),
)
.prepare()
@ -141,7 +170,7 @@ interface MangaQueries : DbProvider {
RawQuery.builder()
.query(getLastReadMangaQuery())
.observesTables(MangaTable.TABLE)
.build()
.build(),
)
.prepare()
@ -151,7 +180,7 @@ interface MangaQueries : DbProvider {
RawQuery.builder()
.query(getTotalChapterMangaQuery())
.observesTables(MangaTable.TABLE)
.build()
.build(),
)
.prepare()
@ -161,7 +190,7 @@ interface MangaQueries : DbProvider {
RawQuery.builder()
.query(getLatestChapterMangaQuery())
.observesTables(MangaTable.TABLE)
.build()
.build(),
)
.prepare()
@ -171,7 +200,7 @@ interface MangaQueries : DbProvider {
RawQuery.builder()
.query(getChapterFetchDateMangaQuery())
.observesTables(MangaTable.TABLE)
.build()
.build(),
)
.prepare()
}

View File

@ -1,5 +1,6 @@
package eu.kanade.tachiyomi.data.database.queries
import eu.kanade.tachiyomi.data.database.resolvers.SourceIdMangaCountGetResolver
import eu.kanade.tachiyomi.data.database.tables.CategoryTable as Category
import eu.kanade.tachiyomi.data.database.tables.ChapterTable as Chapter
import eu.kanade.tachiyomi.data.database.tables.HistoryTable as History
@ -7,21 +8,28 @@ import eu.kanade.tachiyomi.data.database.tables.MangaCategoryTable as MangaCateg
import eu.kanade.tachiyomi.data.database.tables.MangaTable as Manga
/**
* Query to get the manga from the library, with their categories and unread count.
* Query to get the manga from the library, with their categories, read and unread count.
*/
val libraryQuery =
"""
SELECT M.*, COALESCE(MC.${MangaCategory.COL_CATEGORY_ID}, 0) AS ${Manga.COL_CATEGORY}
FROM (
SELECT ${Manga.TABLE}.*, COALESCE(C.unread, 0) AS ${Manga.COL_UNREAD}
SELECT ${Manga.TABLE}.*, COALESCE(C.unreadCount, 0) AS ${Manga.COMPUTED_COL_UNREAD_COUNT}, COALESCE(R.readCount, 0) AS ${Manga.COMPUTED_COL_READ_COUNT}
FROM ${Manga.TABLE}
LEFT JOIN (
SELECT ${Chapter.COL_MANGA_ID}, COUNT(*) AS unread
SELECT ${Chapter.COL_MANGA_ID}, COUNT(*) AS unreadCount
FROM ${Chapter.TABLE}
WHERE ${Chapter.COL_READ} = 0
GROUP BY ${Chapter.COL_MANGA_ID}
) AS C
ON ${Manga.COL_ID} = C.${Chapter.COL_MANGA_ID}
LEFT JOIN (
SELECT ${Chapter.COL_MANGA_ID}, COUNT(*) AS readCount
FROM ${Chapter.TABLE}
WHERE ${Chapter.COL_READ} = 1
GROUP BY ${Chapter.COL_MANGA_ID}
) AS R
ON ${Manga.COL_ID} = R.${Chapter.COL_MANGA_ID}
WHERE ${Manga.COL_FAVORITE} = 1
GROUP BY ${Manga.COL_ID}
ORDER BY ${Manga.COL_TITLE}
@ -142,3 +150,14 @@ fun getCategoriesForMangaQuery() =
${MangaCategory.TABLE}.${MangaCategory.COL_CATEGORY_ID}
WHERE ${MangaCategory.COL_MANGA_ID} = ?
"""
/** Query to get the list of sources in the database that have
* non-library manga, and how many
*/
fun getSourceIdsWithNonLibraryMangaQuery() =
"""
SELECT ${Manga.COL_SOURCE}, COUNT(*) as ${SourceIdMangaCountGetResolver.COL_COUNT}
FROM ${Manga.TABLE}
WHERE ${Manga.COL_FAVORITE} = 0
GROUP BY ${Manga.COL_SOURCE}
"""

View File

@ -15,7 +15,7 @@ interface TrackQueries : DbProvider {
.withQuery(
Query.builder()
.table(TrackTable.TABLE)
.build()
.build(),
)
.prepare()
@ -26,7 +26,7 @@ interface TrackQueries : DbProvider {
.table(TrackTable.TABLE)
.where("${TrackTable.COL_MANGA_ID} = ?")
.whereArgs(manga.id)
.build()
.build(),
)
.prepare()
@ -40,7 +40,7 @@ interface TrackQueries : DbProvider {
.table(TrackTable.TABLE)
.where("${TrackTable.COL_MANGA_ID} = ? AND ${TrackTable.COL_SYNC_ID} = ?")
.whereArgs(manga.id, sync.id)
.build()
.build(),
)
.prepare()
}

View File

@ -29,6 +29,6 @@ class ChapterBackupPutResolver : PutResolver<Chapter>() {
contentValuesOf(
ChapterTable.COL_READ to chapter.read,
ChapterTable.COL_BOOKMARK to chapter.bookmark,
ChapterTable.COL_LAST_PAGE_READ to chapter.last_page_read
ChapterTable.COL_LAST_PAGE_READ to chapter.last_page_read,
)
}

View File

@ -29,6 +29,6 @@ class ChapterKnownBackupPutResolver : PutResolver<Chapter>() {
contentValuesOf(
ChapterTable.COL_READ to chapter.read,
ChapterTable.COL_BOOKMARK to chapter.bookmark,
ChapterTable.COL_LAST_PAGE_READ to chapter.last_page_read
ChapterTable.COL_LAST_PAGE_READ to chapter.last_page_read,
)
}

View File

@ -29,6 +29,6 @@ class ChapterProgressPutResolver : PutResolver<Chapter>() {
contentValuesOf(
ChapterTable.COL_READ to chapter.read,
ChapterTable.COL_BOOKMARK to chapter.bookmark,
ChapterTable.COL_LAST_PAGE_READ to chapter.last_page_read
ChapterTable.COL_LAST_PAGE_READ to chapter.last_page_read,
)
}

View File

@ -27,6 +27,6 @@ class ChapterSourceOrderPutResolver : PutResolver<Chapter>() {
fun mapToContentValues(chapter: Chapter) =
contentValuesOf(
ChapterTable.COL_SOURCE_ORDER to chapter.source_order
ChapterTable.COL_SOURCE_ORDER to chapter.source_order,
)
}

View File

@ -24,12 +24,10 @@ class HistoryLastReadPutResolver : HistoryPutResolver() {
.table(updateQuery.table())
.where(updateQuery.where())
.whereArgs(updateQuery.whereArgs())
.build()
.build(),
)
val putResult: PutResult
putResult = cursor.use { putCursor ->
cursor.use { putCursor ->
if (putCursor.count == 0) {
val insertQuery = mapToInsertQuery(history)
val insertedId = db.lowLevel().insert(insertQuery, mapToContentValues(history))
@ -39,26 +37,16 @@ class HistoryLastReadPutResolver : HistoryPutResolver() {
PutResult.newUpdateResult(numberOfRowsUpdated, updateQuery.table())
}
}
putResult
}
/**
* Creates update query
* @param obj history object
*/
override fun mapToUpdateQuery(obj: History) = UpdateQuery.builder()
.table(HistoryTable.TABLE)
.where("${HistoryTable.COL_CHAPTER_ID} = ?")
.whereArgs(obj.chapter_id)
.build()
/**
* Create content query
* @param history object
*/
fun mapToUpdateContentValues(history: History) =
private fun mapToUpdateContentValues(history: History) =
contentValuesOf(
HistoryTable.COL_LAST_READ to history.last_read
HistoryTable.COL_LAST_READ to history.last_read,
)
}

View File

@ -16,8 +16,9 @@ class LibraryMangaGetResolver : DefaultGetResolver<LibraryManga>(), BaseMangaGet
val manga = LibraryManga()
mapBaseFromCursor(manga, cursor)
manga.unread = cursor.getInt(cursor.getColumnIndex(MangaTable.COL_UNREAD))
manga.category = cursor.getInt(cursor.getColumnIndex(MangaTable.COL_CATEGORY))
manga.unreadCount = cursor.getInt(cursor.getColumnIndexOrThrow(MangaTable.COMPUTED_COL_UNREAD_COUNT))
manga.category = cursor.getInt(cursor.getColumnIndexOrThrow(MangaTable.COL_CATEGORY))
manga.readCount = cursor.getInt(cursor.getColumnIndexOrThrow(MangaTable.COMPUTED_COL_READ_COUNT))
return manga
}

View File

@ -20,7 +20,7 @@ class MangaChapterGetResolver : DefaultGetResolver<MangaChapter>() {
val manga = mangaGetResolver.mapFromCursor(cursor)
val chapter = chapterGetResolver.mapFromCursor(cursor)
manga.id = chapter.manga_id
manga.url = cursor.getString(cursor.getColumnIndex("mangaUrl"))
manga.url = cursor.getString(cursor.getColumnIndexOrThrow("mangaUrl"))
return MangaChapter(manga, chapter)
}

View File

@ -42,7 +42,7 @@ class MangaChapterHistoryGetResolver : DefaultGetResolver<MangaChapterHistory>()
// Make certain column conflicts are dealt with
manga.id = chapter.manga_id
manga.url = cursor.getString(cursor.getColumnIndex("mangaUrl"))
manga.url = cursor.getString(cursor.getColumnIndexOrThrow("mangaUrl"))
chapter.id = history.chapter_id
// Return result

View File

@ -27,6 +27,6 @@ class MangaCoverLastModifiedPutResolver : PutResolver<Manga>() {
fun mapToContentValues(manga: Manga) =
contentValuesOf(
MangaTable.COL_COVER_LAST_MODIFIED to manga.cover_last_modified
MangaTable.COL_COVER_LAST_MODIFIED to manga.cover_last_modified,
)
}

View File

@ -27,6 +27,6 @@ class MangaFavoritePutResolver : PutResolver<Manga>() {
fun mapToContentValues(manga: Manga) =
contentValuesOf(
MangaTable.COL_FAVORITE to manga.favorite
MangaTable.COL_FAVORITE to manga.favorite,
)
}

View File

@ -10,7 +10,7 @@ import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.data.database.tables.MangaTable
import kotlin.reflect.KProperty1
class MangaFlagsPutResolver(private val colName: String, private val fieldGetter: KProperty1<Manga, Int>, private val updateAll: Boolean = false) : PutResolver<Manga>() {
class MangaFlagsPutResolver(private val colName: String, private val fieldGetter: KProperty1<Manga, Int>) : PutResolver<Manga>() {
override fun performPut(db: StorIOSQLite, manga: Manga) = db.inTransactionReturn {
val updateQuery = mapToUpdateQuery(manga)
@ -20,24 +20,14 @@ class MangaFlagsPutResolver(private val colName: String, private val fieldGetter
PutResult.newUpdateResult(numberOfRowsUpdated, updateQuery.table())
}
fun mapToUpdateQuery(manga: Manga): UpdateQuery {
val builder = UpdateQuery.builder()
return if (updateAll) {
builder
.table(MangaTable.TABLE)
.build()
} else {
builder
.table(MangaTable.TABLE)
.where("${MangaTable.COL_ID} = ?")
.whereArgs(manga.id)
.build()
}
}
fun mapToUpdateQuery(manga: Manga) = UpdateQuery.builder()
.table(MangaTable.TABLE)
.where("${MangaTable.COL_ID} = ?")
.whereArgs(manga.id)
.build()
fun mapToContentValues(manga: Manga) =
contentValuesOf(
colName to fieldGetter.get(manga)
colName to fieldGetter.get(manga),
)
}

View File

@ -27,6 +27,6 @@ class MangaLastUpdatedPutResolver : PutResolver<Manga>() {
fun mapToContentValues(manga: Manga) =
contentValuesOf(
MangaTable.COL_LAST_UPDATE to manga.last_update
MangaTable.COL_LAST_UPDATE to manga.last_update,
)
}

View File

@ -1,31 +0,0 @@
package eu.kanade.tachiyomi.data.database.resolvers
import android.content.ContentValues
import com.pushtorefresh.storio.sqlite.StorIOSQLite
import com.pushtorefresh.storio.sqlite.operations.put.PutResolver
import com.pushtorefresh.storio.sqlite.operations.put.PutResult
import com.pushtorefresh.storio.sqlite.queries.UpdateQuery
import eu.kanade.tachiyomi.data.database.inTransactionReturn
import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.data.database.tables.MangaTable
class MangaNextUpdatedPutResolver : PutResolver<Manga>() {
override fun performPut(db: StorIOSQLite, manga: Manga) = db.inTransactionReturn {
val updateQuery = mapToUpdateQuery(manga)
val contentValues = mapToContentValues(manga)
val numberOfRowsUpdated = db.lowLevel().update(updateQuery, contentValues)
PutResult.newUpdateResult(numberOfRowsUpdated, updateQuery.table())
}
fun mapToUpdateQuery(manga: Manga) = UpdateQuery.builder()
.table(MangaTable.TABLE)
.where("${MangaTable.COL_ID} = ?")
.whereArgs(manga.id)
.build()
fun mapToContentValues(manga: Manga) = ContentValues(1).apply {
put(MangaTable.COL_NEXT_UPDATE, manga.next_update)
}
}

View File

@ -27,6 +27,6 @@ class MangaTitlePutResolver : PutResolver<Manga>() {
fun mapToContentValues(manga: Manga) =
contentValuesOf(
MangaTable.COL_TITLE to manga.title
MangaTable.COL_TITLE to manga.title,
)
}

View File

@ -0,0 +1,23 @@
package eu.kanade.tachiyomi.data.database.resolvers
import android.annotation.SuppressLint
import android.database.Cursor
import com.pushtorefresh.storio.sqlite.operations.get.DefaultGetResolver
import eu.kanade.tachiyomi.data.database.models.SourceIdMangaCount
import eu.kanade.tachiyomi.data.database.tables.MangaTable
class SourceIdMangaCountGetResolver : DefaultGetResolver<SourceIdMangaCount>() {
companion object {
val INSTANCE = SourceIdMangaCountGetResolver()
const val COL_COUNT = "manga_count"
}
@SuppressLint("Range")
override fun mapFromCursor(cursor: Cursor): SourceIdMangaCount {
val sourceID = cursor.getLong(cursor.getColumnIndexOrThrow(MangaTable.COL_SOURCE))
val count = cursor.getInt(cursor.getColumnIndexOrThrow(COL_COUNT))
return SourceIdMangaCount(sourceID, count)
}
}

View File

@ -62,4 +62,7 @@ object ChapterTable {
val addScanlator: String
get() = "ALTER TABLE $TABLE ADD COLUMN $COL_SCANLATOR TEXT DEFAULT NULL"
val fixDateUploadIfNeeded: String
get() = "UPDATE $TABLE SET $COL_DATE_UPLOAD = $COL_DATE_FETCH WHERE $COL_DATE_UPLOAD = 0"
}

View File

@ -28,6 +28,7 @@ object MangaTable {
const val COL_LAST_UPDATE = "last_update"
// Not actually used anymore
const val COL_NEXT_UPDATE = "next_update"
const val COL_DATE_ADDED = "date_added"
@ -38,12 +39,15 @@ object MangaTable {
const val COL_CHAPTER_FLAGS = "chapter_flags"
const val COL_UNREAD = "unread"
const val COL_CATEGORY = "category"
const val COL_COVER_LAST_MODIFIED = "cover_last_modified"
// Not an actual value but computed when created
const val COMPUTED_COL_UNREAD_COUNT = "unread_count"
const val COMPUTED_COL_READ_COUNT = "read_count"
val createTableQuery: String
get() =
"""CREATE TABLE $TABLE(

View File

@ -39,7 +39,7 @@ object TrackTable {
$COL_MEDIA_ID INTEGER NOT NULL,
$COL_LIBRARY_ID INTEGER,
$COL_TITLE TEXT NOT NULL,
$COL_LAST_CHAPTER_READ INTEGER NOT NULL,
$COL_LAST_CHAPTER_READ REAL NOT NULL,
$COL_TOTAL_CHAPTERS INTEGER NOT NULL,
$COL_STATUS INTEGER NOT NULL,
$COL_SCORE FLOAT NOT NULL,
@ -62,4 +62,19 @@ object TrackTable {
val addFinishDate: String
get() = "ALTER TABLE $TABLE ADD COLUMN $COL_FINISH_DATE LONG NOT NULL DEFAULT 0"
val renameTableToTemp: String
get() =
"ALTER TABLE $TABLE RENAME TO ${TABLE}_tmp"
val insertFromTempTable: String
get() =
"""
|INSERT INTO $TABLE($COL_ID,$COL_MANGA_ID,$COL_SYNC_ID,$COL_MEDIA_ID,$COL_LIBRARY_ID,$COL_TITLE,$COL_LAST_CHAPTER_READ,$COL_TOTAL_CHAPTERS,$COL_STATUS,$COL_SCORE,$COL_TRACKING_URL,$COL_START_DATE,$COL_FINISH_DATE)
|SELECT $COL_ID,$COL_MANGA_ID,$COL_SYNC_ID,$COL_MEDIA_ID,$COL_LIBRARY_ID,$COL_TITLE,$COL_LAST_CHAPTER_READ,$COL_TOTAL_CHAPTERS,$COL_STATUS,$COL_SCORE,$COL_TRACKING_URL,$COL_START_DATE,$COL_FINISH_DATE
|FROM ${TABLE}_tmp
""".trimMargin()
val dropTempTable: String
get() = "DROP TABLE ${TABLE}_tmp"
}

View File

@ -27,7 +27,7 @@ class DownloadCache(
private val context: Context,
private val provider: DownloadProvider,
private val sourceManager: SourceManager,
private val preferences: PreferencesHelper = Injekt.get()
private val preferences: PreferencesHelper = Injekt.get(),
) {
/**
@ -143,7 +143,7 @@ class DownloadCache(
mangaDirs.values.forEach { mangaDir ->
val chapterDirs = mangaDir.dir.listFiles()
.orEmpty()
.mapNotNull { it.name }
.mapNotNull { it.name?.replace(".cbz", "") }
.toHashSet()
mangaDir.files = chapterDirs
@ -236,7 +236,7 @@ class DownloadCache(
*/
private class RootDirectory(
val dir: UniFile,
var files: Map<Long, SourceDirectory> = hashMapOf()
var files: Map<Long, SourceDirectory> = hashMapOf(),
)
/**
@ -244,7 +244,7 @@ class DownloadCache(
*/
private class SourceDirectory(
val dir: UniFile,
var files: Map<String, MangaDirectory> = hashMapOf()
var files: Map<String, MangaDirectory> = hashMapOf(),
)
/**
@ -252,7 +252,7 @@ class DownloadCache(
*/
private class MangaDirectory(
val dir: UniFile,
var files: Set<String> = hashSetOf()
var files: Set<String> = hashSetOf(),
)
/**

View File

@ -4,6 +4,7 @@ import android.content.Context
import com.hippo.unifile.UniFile
import com.jakewharton.rxrelay.BehaviorRelay
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.database.DatabaseHelper
import eu.kanade.tachiyomi.data.database.models.Chapter
import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.data.download.model.Download
@ -13,8 +14,11 @@ import eu.kanade.tachiyomi.source.Source
import eu.kanade.tachiyomi.source.SourceManager
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.util.lang.launchIO
import eu.kanade.tachiyomi.util.system.logcat
import logcat.LogPriority
import rx.Observable
import timber.log.Timber
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import uy.kohesive.injekt.injectLazy
/**
@ -24,7 +28,10 @@ import uy.kohesive.injekt.injectLazy
*
* @param context the application context.
*/
class DownloadManager(private val context: Context) {
class DownloadManager(
private val context: Context,
private val db: DatabaseHelper = Injekt.get(),
) {
private val sourceManager: SourceManager by injectLazy()
private val preferences: PreferencesHelper by injectLazy()
@ -32,7 +39,7 @@ class DownloadManager(private val context: Context) {
/**
* Downloads provider, used to retrieve the folders where the chapters are or should be stored.
*/
private val provider = DownloadProvider(context)
val provider = DownloadProvider(context)
/**
* Cache of downloaded chapters.
@ -217,7 +224,7 @@ class DownloadManager(private val context: Context) {
* @param download the download to cancel.
*/
fun deletePendingDownload(download: Download) {
deleteChapters(listOf(download.chapter), download.manga, download.source)
deleteChapters(listOf(download.chapter), download.manga, download.source, true)
}
fun deletePendingDownloads(vararg downloads: Download) {
@ -225,7 +232,7 @@ class DownloadManager(private val context: Context) {
downloadsByManga.map { entry ->
val manga = entry.value.first().manga
val source = entry.value.first().source
deleteChapters(entry.value.map { it.chapter }, manga, source)
deleteChapters(entry.value.map { it.chapter }, manga, source, true)
}
}
@ -235,9 +242,15 @@ class DownloadManager(private val context: Context) {
* @param chapters the list of chapters to delete.
* @param manga the manga of the chapters.
* @param source the source of the chapters.
* @param isCancelling true if it's simply cancelling a download
*/
fun deleteChapters(chapters: List<Chapter>, manga: Manga, source: Source): List<Chapter> {
val filteredChapters = getChaptersToDelete(chapters)
fun deleteChapters(chapters: List<Chapter>, manga: Manga, source: Source, isCancelling: Boolean = false): List<Chapter> {
val filteredChapters = if (isCancelling) {
chapters
} else {
getChaptersToDelete(chapters, manga)
}
launchIO {
removeFromDownloadQueue(filteredChapters)
@ -290,7 +303,7 @@ class DownloadManager(private val context: Context) {
* @param manga the manga of the chapters.
*/
fun enqueueDeleteChapters(chapters: List<Chapter>, manga: Manga) {
pendingDeleter.addChapters(getChaptersToDelete(chapters), manga)
pendingDeleter.addChapters(getChaptersToDelete(chapters, manga), manga)
}
/**
@ -314,24 +327,37 @@ class DownloadManager(private val context: Context) {
*/
fun renameChapter(source: Source, manga: Manga, oldChapter: Chapter, newChapter: Chapter) {
val oldNames = provider.getValidChapterDirNames(oldChapter)
val newName = provider.getChapterDirName(newChapter)
val mangaDir = provider.getMangaDir(manga, source)
// Assume there's only 1 version of the chapter name formats present
val oldFolder = oldNames.asSequence()
val oldDownload = oldNames.asSequence()
.mapNotNull { mangaDir.findFile(it) }
.firstOrNull()
.firstOrNull() ?: return
if (oldFolder?.renameTo(newName) == true) {
var newName = provider.getChapterDirName(newChapter)
if (oldDownload.isFile && oldDownload.name?.endsWith(".cbz") == true) {
newName += ".cbz"
}
if (oldDownload.renameTo(newName)) {
cache.removeChapter(oldChapter, manga)
cache.addChapter(newName, mangaDir, manga)
} else {
Timber.e("Could not rename downloaded chapter: %s.", oldNames.joinToString())
logcat(LogPriority.ERROR) { "Could not rename downloaded chapter: ${oldNames.joinToString()}." }
}
}
private fun getChaptersToDelete(chapters: List<Chapter>): List<Chapter> {
return if (!preferences.removeBookmarkedChapters()) {
private fun getChaptersToDelete(chapters: List<Chapter>, manga: Manga): List<Chapter> {
// Retrieve the categories that are set to exclude from being deleted on read
val categoriesToExclude = preferences.removeExcludeCategories().get().map(String::toInt)
val categoriesForManga = db.getCategoriesForManga(manga).executeAsBlocking()
.mapNotNull { it.id }
.takeUnless { it.isEmpty() }
?: listOf(0)
return if (categoriesForManga.intersect(categoriesToExclude).isNotEmpty()) {
chapters.filterNot { it.read }
} else if (!preferences.removeBookmarkedChapters()) {
chapters.filterNot { it.bookmark }
} else {
chapters

View File

@ -52,7 +52,7 @@ internal class DownloadNotifier(private val context: Context) {
/**
* Updated when error is thrown
*/
var errorThrown = false
private var errorThrown = false
/**
* Updated when paused
@ -93,18 +93,19 @@ internal class DownloadNotifier(private val context: Context) {
addAction(
R.drawable.ic_pause_24dp,
context.getString(R.string.action_pause),
NotificationReceiver.pauseDownloadsPendingBroadcast(context)
NotificationReceiver.pauseDownloadsPendingBroadcast(context),
)
}
val downloadingProgressText = context.getString(
R.string.chapter_downloading_progress,
download.downloadedImages,
download.pages!!.size
download.pages!!.size,
)
if (preferences.hideNotificationContent()) {
setContentTitle(downloadingProgressText)
setContentText(null)
} else {
val title = download.manga.title.chop(15)
val quotedTitle = Pattern.quote(title)
@ -137,13 +138,13 @@ internal class DownloadNotifier(private val context: Context) {
addAction(
R.drawable.ic_play_arrow_24dp,
context.getString(R.string.action_resume),
NotificationReceiver.resumeDownloadsPendingBroadcast(context)
NotificationReceiver.resumeDownloadsPendingBroadcast(context),
)
// Clear action
addAction(
R.drawable.ic_close_24dp,
context.getString(R.string.action_cancel_all),
NotificationReceiver.clearDownloadsPendingBroadcast(context)
NotificationReceiver.clearDownloadsPendingBroadcast(context),
)
show(Notifications.ID_DOWNLOAD_CHAPTER_PROGRESS)
@ -183,16 +184,19 @@ internal class DownloadNotifier(private val context: Context) {
* Called when the downloader receives a warning.
*
* @param reason the text to show.
* @param timeout duration after which to automatically dismiss the notification.
* Only works on Android 8+.
*/
fun onWarning(reason: String) {
fun onWarning(reason: String, timeout: Long? = null) {
with(errorNotificationBuilder) {
setContentTitle(context.getString(R.string.download_notifier_downloader_title))
setContentText(reason)
setSmallIcon(android.R.drawable.stat_sys_warning)
setSmallIcon(R.drawable.ic_warning_white_24dp)
setAutoCancel(true)
clearActions()
setContentIntent(NotificationHandler.openDownloadManagerPendingActivity(context))
setProgress(0, 0, false)
timeout?.let { setTimeoutAfter(it) }
show(Notifications.ID_DOWNLOAD_CHAPTER_ERROR)
}
@ -208,15 +212,14 @@ internal class DownloadNotifier(private val context: Context) {
* @param error string containing error information.
* @param chapter string containing chapter title.
*/
fun onError(error: String? = null, chapter: String? = null) {
fun onError(error: String? = null, chapter: String? = null, mangaTitle: String? = null) {
// Create notification
with(errorNotificationBuilder) {
setContentTitle(
chapter
?: context.getString(R.string.download_notifier_downloader_title)
mangaTitle?.plus(": $chapter") ?: context.getString(R.string.download_notifier_downloader_title),
)
setContentText(error ?: context.getString(R.string.download_notifier_unknown_error))
setSmallIcon(android.R.drawable.stat_sys_warning)
setSmallIcon(R.drawable.ic_warning_white_24dp)
clearActions()
setContentIntent(NotificationHandler.openDownloadManagerPendingActivity(context))
setProgress(0, 0, false)

Some files were not shown because too many files have changed in this diff Show More