Compare commits

...

1131 Commits

Author SHA1 Message Date
817418f7c9 Release v0.14.3 2023-01-07 12:09:27 -05:00
4eb2cd85b2 Update baseline profile 2023-01-07 12:03:17 -05:00
086eac5975 Translations update from Hosted Weblate (#8764)
Weblate translations

Co-authored-by: Abay Emes <abayemes@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Bujdosf <bujdos.f01@gmail.com>
Co-authored-by: Cloudburst <18114966+C10udburst@users.noreply.github.com>
Co-authored-by: Dan <denqwerta@gmail.com>
Co-authored-by: DarKCroX <DarKCroX@users.noreply.hosted.weblate.org>
Co-authored-by: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: FTDaily <farrell05june2005@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: InfinityDouki56 <ced.paltep10@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jace Orwell <jaceorwell@gmail.com>
Co-authored-by: Jendrej <ejjendrej@gmail.com>
Co-authored-by: K. Sz. Bence <tudi20@protonmail.com>
Co-authored-by: Kaenova Mahendra Auditama <kaenova@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: The Initiator <eithansten@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: ZiomaleQ <r.partyka30@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: ayaao <myrgdream@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: lisienskenderi <lisienskenderi@hotmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.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/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/kk/
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/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/sq/
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/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Abay Emes <abayemes@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Bujdosf <bujdos.f01@gmail.com>
Co-authored-by: Cloudburst <18114966+C10udburst@users.noreply.github.com>
Co-authored-by: Dan <denqwerta@gmail.com>
Co-authored-by: DarKCroX <DarKCroX@users.noreply.hosted.weblate.org>
Co-authored-by: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: FTDaily <farrell05june2005@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: InfinityDouki56 <ced.paltep10@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jace Orwell <jaceorwell@gmail.com>
Co-authored-by: Jendrej <ejjendrej@gmail.com>
Co-authored-by: K. Sz. Bence <tudi20@protonmail.com>
Co-authored-by: Kaenova Mahendra Auditama <kaenova@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: The Initiator <eithansten@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: ZiomaleQ <r.partyka30@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: ayaao <myrgdream@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: lisienskenderi <lisienskenderi@hotmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
2023-01-07 11:54:23 -05:00
addd6bffbd Bump default user agent string and minimum WebView version 2023-01-07 11:51:36 -05:00
1e65313fa7 Open entry when long pressing during migration in source search
This matches the behavior from 0.13.6

Fixes #8176
2023-01-07 11:51:00 -05:00
c4c6e41c46 Fix downloaded badges appearing when filtering by downloaded
Fixes #8850
2023-01-07 10:32:14 -05:00
920ca405a2 Use MainScope for coroutines in ui package classes (#8845) 2023-01-07 10:07:09 -05:00
6d3a3b3f39 Adjust bookmarked chapter styling
No longer tints the title and subtitle text depending on bookmarked state
in favor of only showing a tinted bookmark icon regardless of read state.

Closes #8839
2023-01-07 10:02:41 -05:00
50d46fe7f6 Prioritize "all" ("Multi") lang in extensions lists
Fixes #8811
Fixes #8812
2023-01-05 22:34:24 -05:00
91e282d7e5 Show warning about installing extensions on MIUI
Related to #8834
2023-01-05 22:12:14 -05:00
a0f10f868e Handle file names with multiple ".cbz" occurrences properly
Fixes #8838
2023-01-05 21:59:18 -05:00
6a423f0650 Update toolbar query on genre search (#8837) 2023-01-05 17:02:27 -05:00
5cc84403e1 Debounce reindexing banner
Helps avoid showing it for short-lived jobs
2023-01-02 21:58:48 -05:00
ab61a65b4a Add worker info screen (#8774)
Mainly for debug purpose, might help with support.
2023-01-02 21:58:11 -05:00
01ec26842d Unify layout for new update and crash screens 2022-12-30 23:14:29 -05:00
bbf5817805 Allow 2 lines for tracker status text
Fixes #8805
2022-12-30 22:31:35 -05:00
50981cb102 Handle 1000+ pages properly in the downloader (#8818) 2022-12-30 22:20:14 -05:00
611ec8103c Handle 1000+ pages properly in the downloader (#8818) 2022-12-30 22:20:06 -05:00
12c672667c filter mangaupdates search (#8813) 2022-12-30 22:11:40 -05:00
db3c98fe72 Update OkHttp 2022-12-25 00:24:53 -05:00
f401574f5a Increase max library column size back to 10
Fixes #8798
2022-12-24 10:09:38 -05:00
3251fb36c8 Properly fix #8720 (#8797)
* Partially revert "Move library page EmptyScreens into list/grids"

This partially reverts commit 376bbeb724.

* Properly fix issue 8720
2022-12-24 10:02:38 -05:00
94a410f50f TrackDateRemoverScreen: Fix pop behavior after confirming removal (#8792) 2022-12-23 09:29:01 -05:00
a14c01c1de Update baseline profile 2022-12-21 22:48:39 -05:00
ca3b948628 Update plugin kotlinter to v3.13.0 (#8783)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-21 22:38:24 -05:00
a8230ad574 Fix browse search query display and keyboard focus (#8781) 2022-12-21 22:14:04 -05:00
8e1b5b4803 Pager: Bring back previous snapping behavior (#8776)
New default LazyList snap behavior is optimized for non-pager use.
2022-12-20 09:16:43 -05:00
8552838bda Update WorkManager (#8772) 2022-12-18 12:14:06 -05:00
46417fe427 Pass listing query to BrowseSourceScreen (#8763)
* Pass listing query to BrowseSourceScreen

* Don't use referential equality
2022-12-17 17:28:25 -05:00
dac04f2929 Translations update from Hosted Weblate (#8663)
Weblate translations

Co-authored-by: Abay Emes <abayemes@gmail.com>
Co-authored-by: Abou <aboozar.gh.r@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alex Maryson Jr <akamar87@gmail.com>
Co-authored-by: Ali Aljishi <ahj696@hotmail.com>
Co-authored-by: Bujdosf <bujdos.f01@gmail.com>
Co-authored-by: Dan <denqwerta@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: Diego <gonzalediego1@gmail.com>
Co-authored-by: Edi <mizumymommy@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: GuN4iK <maksimpradko59@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: InfinityDouki56 <ced.paltep10@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nguyễn Trung Đức <vaicato16@gmail.com>
Co-authored-by: Othmane El Alami <othmane.elalami@nupsol.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: Sana Thanks <thankssana4@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: aşina orkan göksel aşina <examplehuman@outlook.com>
Co-authored-by: blindmodz <sebareyes.1994@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: lb-fes <2241373229@qq.com>
Co-authored-by: michalani <michal.anisimow@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ar/
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/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/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/kk/
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/pl/
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/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: Abay Emes <abayemes@gmail.com>
Co-authored-by: Abou <aboozar.gh.r@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Alex Maryson Jr <akamar87@gmail.com>
Co-authored-by: Ali Aljishi <ahj696@hotmail.com>
Co-authored-by: Bujdosf <bujdos.f01@gmail.com>
Co-authored-by: Dan <denqwerta@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: Diego <gonzalediego1@gmail.com>
Co-authored-by: Edi <mizumymommy@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: GuN4iK <maksimpradko59@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: InfinityDouki56 <ced.paltep10@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nguyễn Trung Đức <vaicato16@gmail.com>
Co-authored-by: Othmane El Alami <othmane.elalami@nupsol.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: Sana Thanks <thankssana4@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: aşina orkan göksel aşina <examplehuman@outlook.com>
Co-authored-by: blindmodz <sebareyes.1994@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: lb-fes <2241373229@qq.com>
Co-authored-by: michalani <michal.anisimow@gmail.com>
2022-12-17 14:53:39 -05:00
63da463e02 Clean up usages of listing UI models (#8762) 2022-12-17 14:51:03 -05:00
817e144ff6 BrowseSourceScreen: fix navigate up and filter sheet (#8761) 2022-12-17 13:21:12 -05:00
9d2d78ae5b AdaptiveSheet: Don't blindly consume back event (#8760) 2022-12-17 12:56:19 -05:00
c44db54d9f Fix snackbar blocking refreshing state in MangaScreen (#8759) 2022-12-17 12:06:49 -05:00
376bbeb724 Move library page EmptyScreens into list/grids
It does look awkward due to the lack of filled height within those list/grids though.

Fixes #8720
Fixes #8721
2022-12-17 12:06:02 -05:00
0e2bdb7863 Minor cleanup 2022-12-17 12:02:01 -05:00
235bc77457 Fix indexing notif not showing (#8758) 2022-12-17 10:32:49 -05:00
593172f891 Track Page progress with StateFlow (#8749)
* Update ReaderProgressIndicator documentation

ReaderProgressIndicator is not always determinate (cc554530, #5605).

* Track Page progress with StateFlow
2022-12-16 22:18:50 -05:00
e20c66b156 App state banner tweaks (#8746)
* Move download indexing notification to this banner group
* Animate state changes
2022-12-16 22:18:17 -05:00
5f4825465e Use actual indexes instead of existing order number when reordering categories
Fixes #8738
2022-12-15 23:06:05 -05:00
bc6a12a4f7 Sort global search source results properly
Fixes #8741
2022-12-14 23:20:51 -05:00
90db3acefd Don't start at last read page if chapter is completely marked as read
Fixes #8737
2022-12-14 23:04:30 -05:00
2f2f59279d Fix crash if tapping title when opening reader directly 2022-12-14 22:54:51 -05:00
4992f87cb1 Better handle status bar light/dark icons based on banner background color 2022-12-14 22:54:34 -05:00
7608cb0da3 Check ext lib version when checking for updates (#8740) 2022-12-14 13:49:10 -05:00
9dd9e741f3 Convert download cache/queue flows into SharedFlows
Fixes #8727
2022-12-12 22:37:37 -05:00
171db639ff Fix SetMangaViewerFlags (#8719)
Stop clearing old viewer flags when setting a flag
2022-12-11 16:12:41 -05:00
3ede42252c Remove unused resources 2022-12-11 10:22:14 -05:00
a94ca175e2 Update richtext to v0.16.0 (#8716)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-10 22:45:37 -05:00
3749cee28f Add Assistant content URLs
This is surfaced in recents on Pixel devices for example.
Docs: https://developer.android.com/guide/app-actions/assistant-sharing

Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
2022-12-10 12:08:39 -05:00
ca500da4d8 Adjust insets handling in tablet UI (#8711)
* Adds startBar slot in Scaffold to handle nav rail
* Consumes unneeded insets in settings
2022-12-10 10:02:13 -05:00
820ed6a468 Move system bar color set to the main composable (#8710)
This one doesn't check navbar location before adding a scrim, doesn't really
matter since now no body component is being drawn below the system bar.
2022-12-10 10:01:16 -05:00
7cbe18d325 Pull out settings sheet items as reusable composables 2022-12-09 22:23:26 -05:00
8937e22ce4 Add back option to hide Updates count (#8709)
Adds back the option to hide the updates count on the Updates tab
2022-12-09 17:25:06 -05:00
82a3a98a5a Adjust screen transitions (#8707)
* Fade transition between main navigation tabs
* Shared axis X between screen stacks

Activity transition is using a "close enough" shared axis X xml animation
2022-12-09 17:23:00 -05:00
d97eab0328 Move app state banner to the very top (#8706)
This moves the banners to the root composable and so eliminates the need to
track the app states in every screen.
2022-12-09 11:20:13 -05:00
a61e2799db Abstract ChapterSettingsDialog for reuse elsewhere 2022-12-08 23:15:50 -05:00
1009e15aa6 Reuse basic theme preview annotation 2022-12-08 22:45:17 -05:00
01c6e46a71 Show empty screen when a category is empty (#8690)
* Show empty screen when a category is empty

* Review changes

* Review changes #2

Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-12-08 09:15:10 -05:00
ed5e013874 Use proper category when getting random item
Fixes #8700
2022-12-08 09:01:37 -05:00
f8e4153dbf Disable Jetifier 2022-12-07 23:06:25 -05:00
f7a92cf6ac Replace reader's Presenter with ViewModel (#8698)
includes:
* Use coroutines in more places
* Use domain Manga data class and effectively changing the state system
* Replace deprecated onBackPress method

Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-12-07 23:00:01 -05:00
e748d91d4a Bump dependencies 2022-12-07 22:44:09 -05:00
2c4ddca38e Migrate Accompanist SwipeRefresh to Compose PullRefresh (#8106) 2022-12-07 22:40:57 -05:00
6ca32710be Cleanup Page status (#8696)
* Cleanup Page statusSubject and statusCallback

* Convert Page status from Int to enum
2022-12-07 18:28:38 -05:00
f05e251991 GlobalSearchScreen: Add unique key (#8693)
Avoids crash when an old screen is being replaced by a new one
2022-12-07 08:27:54 -05:00
a3f3f9d562 Avoid some crashes 2022-12-06 22:21:04 -05:00
410fcb73c5 Fix appbar back button in global search screen (#8689) 2022-12-06 22:20:57 -05:00
b6d6de6b9f Avoid crashing when clearing cookies for invalid source URLs
e.g. Komga sources with no URLs set
2022-12-05 22:18:19 -05:00
09cebf20f3 Handle intent after navigator is initialized
Fixes crash if opening from widget or notification when activity isn't already launched.
2022-12-05 17:16:16 -05:00
a8c732d67b Fix opening download notification only going to More tab 2022-12-05 16:09:55 -05:00
843c9c7e57 Fix migrate options dialog not being selected when tapping text 2022-12-05 15:12:16 -05:00
c88b79fa17 Minor cleanup 2022-12-05 14:14:50 -05:00
3f9820ac79 Always show library tabs and counts when searching
Closes #8680
2022-12-05 10:06:41 -05:00
c288e6b8fa Fix ANR when opening from notification/widget (#8683) 2022-12-05 09:00:30 -05:00
8945ef8880 Change source preference theming fix (#8679) 2022-12-05 00:10:11 -05:00
99a717f849 Hide webtoon reader scrollbars
Fixes #8676
2022-12-04 18:09:37 -05:00
4622b18c99 Fix local source detail JSON files not being read if .noxml was created
Fixes #8549
2022-12-04 14:00:23 -05:00
4f5270cb7d Fix unusable categories when content is filtered out
Fixes #8675
Effectively reverts #8633, which introduces weird edge cases
2022-12-04 13:39:53 -05:00
719d427956 Truncate long nav bar/rail items
Fixes #8670
2022-12-04 12:58:59 -05:00
d7a21771a5 Tweak manga cover dialog UI
Closes #8654, although it's just a workaround. The cover itself doesn't appear within the inset areas when zoomed.
2022-12-04 12:55:58 -05:00
be854b3e90 Fix appbar back button in Settings screen (#8674) 2022-12-04 10:27:14 -05:00
47f079891f Track sheet fixes (#8673)
* Fix Track sheet not being disposed properly

* Change insets handling
2022-12-04 10:27:02 -05:00
696dc59ea5 More domain model migrations 2022-12-03 22:54:18 -05:00
5f6666a438 Migrate Download to domain model (#8664) 2022-12-03 22:30:30 -05:00
f284a656d7 [skip ci] Update dessant/lock-threads action to v4 (#8666)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-03 22:16:56 -05:00
1c3d566f8d Translations update from Hosted Weblate (#8622)
Weblate translations

Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Cypral <cypral@hotmail.fr>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hatem Ghouthi <hatemghouthi@yahoo.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: Kaenova Mahendra Auditama <kaenova@gmail.com>
Co-authored-by: Kostiantyn Kopelets <kostyakopkop@gmail.com>
Co-authored-by: Luka Paun <croluxgame@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Nguyễn Trung Đức <vaicato16@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: SameDesu123 <jjunleegood@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: lb-fes <2241373229@qq.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/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/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/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/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/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: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Cypral <cypral@hotmail.fr>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hatem Ghouthi <hatemghouthi@yahoo.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: Kaenova Mahendra Auditama <kaenova@gmail.com>
Co-authored-by: Kostiantyn Kopelets <kostyakopkop@gmail.com>
Co-authored-by: Luka Paun <croluxgame@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Nguyễn Trung Đức <vaicato16@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: SameDesu123 <jjunleegood@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: lb-fes <2241373229@qq.com>
2022-12-03 14:48:32 -05:00
373463e995 Change Updates icon badge to show new updates count (#8659)
* Change Updates icon badge to show new updates count

* Fix reference

* review changes

* Lint
2022-12-03 14:44:30 -05:00
7be9b49143 Fix BrowseSourceScreen list/grid unnecessary reloads (#8661) 2022-12-03 14:43:52 -05:00
059a79debb [skip ci] Ignore WheelPickerCompose updates 2022-12-03 10:20:27 -05:00
1a70ebe7ea Fix crash when opening chapter from BrowseSourceScreen (#8657) 2022-12-03 00:26:11 -05:00
beda99bbe0 Replace RxJava in ReaderChapter and reader transitions 2022-12-02 23:36:33 -05:00
bb1e7816e1 Replace some usages of RxJava in reader 2022-12-02 23:11:42 -05:00
b0dc20e00c Remove some dead code 2022-12-02 22:48:08 -05:00
3d66eaea83 Merge Voyager screens (#8656)
* Merge Voyager screens

* cleanups
2022-12-02 22:35:30 -05:00
5313a5d5d2 Remove unnecessary base Nucleus classes
The reader still uses it, but we just move stuff to there.
2022-12-02 13:23:26 -05:00
5b189a909b Use Voyager on Source Preference screen (#8651) 2022-12-02 13:14:18 -05:00
75a687138d Migrate to Accompanist M3 theme adapter 2022-12-01 23:08:04 -05:00
ba91b483a0 Delayed Tracking Update related fix (#8642)
* Delayed Tracking Update related fix

* Lint
2022-12-01 23:01:24 -05:00
3a8b5e1b5e Fix default category name being shown with empty library 2022-12-01 23:00:34 -05:00
94d1b68598 Use Voyager on BrowseSource and SourceSearch screen (#8650)
Some navigation janks will be dealt with when the migration is complete
2022-11-30 23:05:11 -05:00
8eda4df71f Fix refreshing state for extensions tab
Fixes #8644
Also add an extra delay in case it's super fast.
2022-11-29 09:25:22 -05:00
8ad9337863 Fix Stub Source migration screen broken (#8643)
* Fix Stub Source migration screen broken

* Lint
2022-11-29 09:06:52 -05:00
cd13e187cf Use Voyager on Downloads screen (#8640) 2022-11-28 09:23:11 -05:00
bcc21e55bd Complete Settings migration to Voyager (#8639)
Now the Controller wrapper can be yeeted anytime
2022-11-28 09:21:18 -05:00
5fbecfd7b7 Don't remove queued downloads when deleting manga after chapter deletion 2022-11-27 17:12:45 -05:00
3480b45098 Minor cleanup 2022-11-27 17:12:45 -05:00
5076ab3049 Update dependency ch.acra:acra-http to v5.9.7 (#8636)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-27 16:25:42 -05:00
44366ac058 Minor global search UI tweaks 2022-11-27 15:16:08 -05:00
4f2a794fba Remove dead code 2022-11-27 15:09:37 -05:00
fe6aa4358f Show toolbarTitle depending of size (#8633) 2022-11-27 14:57:52 -05:00
f99b62a069 Use Compose on Global/Migrate Search screen (#8631)
* Use Compose on Global/Migrate Search screen

- Refactor to use Voyager and Compose
- Use sealed class for state
- Somethings are broken/missing due to screens using different navigation libraries

* Review changes
2022-11-27 14:56:21 -05:00
ac1bed38f9 Show empty library message properly
Fixes #8632
The `library` map still contains the default category even when "empty".
2022-11-27 10:43:38 -05:00
217b03a292 Fix library not loading when not logged in to any tracker (#8629) 2022-11-26 21:37:22 -05:00
28bceffc6f Update aboutlib_version to v10.5.2 (#8626)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-26 21:37:03 -05:00
09266a155c Update dependency gradle to v7.6 (#8630)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-26 21:36:46 -05:00
3d7591feca Implement simple stats screen (#8068)
* Implement simple stats screen

* Review Changes

* Some other changes

* Remove unused

* Small changes

* Review Changes 2 + Cleanup

* Review Changes 3

* Cleanup leftovers

* Optimize imports
2022-11-26 15:50:26 -05:00
e14909fff4 Use Voyager on Library tab (#8620) 2022-11-26 15:48:57 -05:00
fe579c4865 Translations update from Hosted Weblate (#8567)
Weblate translations

Co-authored-by: Abay Emes <abayemes@gmail.com>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: CherryMonster222 <eljubeily+github@pm.me>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.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: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nepx <anandabaskara@outlook.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: Te quiero <ilytequiero@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: alex <hdhdhfhfbbffhhfhfjfjf@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.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/ceb/
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/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/kk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ko/
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/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/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/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Abay Emes <abayemes@gmail.com>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: CherryMonster222 <eljubeily+github@pm.me>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.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: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Nepx <anandabaskara@outlook.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: Te quiero <ilytequiero@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: alex <hdhdhfhfbbffhhfhfjfjf@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
2022-11-26 14:56:11 -05:00
37118088d4 Remove usage of PublishRelay in DownloadQueue 2022-11-26 10:07:51 -05:00
5c9e9bd2c4 Use Voyager between more screens 2022-11-26 09:34:06 -05:00
db35ba53b1 Use Voyager between supported screens in Extension package (#8616)
- Minor state behavior changes
2022-11-26 09:14:11 -05:00
758d223776 Disable generating ComicInfo.xml on download (#8619)
* Disable generating ComicInfo.xml on download

* Remove unused import
2022-11-26 09:13:08 -05:00
21a9bf2463 Add "jitpack" maven repo to pluginMangment (#8617) 2022-11-26 08:11:15 -05:00
a54d9912d0 Fix Kavita interceptor crashing app + minor cleanup 2022-11-25 23:03:42 -05:00
7e74949d38 Explicitly add READ_APP_SPECIFIC_LOCALES permission
Some devices are throwing a SecurityException (calling getApplicationLocales) for some reason.
2022-11-25 23:03:42 -05:00
a8c5780963 Use Voyager on Migrate Manga screen (#8611) 2022-11-24 22:25:36 -05:00
f4ac754d02 Use Voyager on Browse tab (#8605) 2022-11-23 22:28:25 -05:00
0347d3970a Cleanup [Downloader.ensureSuccessfulDownload] (#8602) 2022-11-23 09:23:29 -05:00
acc2312384 Use Voyager on Updates tab (#8603)
* Use Voyager on Updates tab

* Fix back press

* Fix selection
2022-11-23 09:22:20 -05:00
7d34ff214c Change settings screen to object (#8604) 2022-11-23 09:14:55 -05:00
e2179a6669 Avoid concurrency issues when reordering categories
Maybe fixes #8372
2022-11-22 23:12:23 -05:00
5c37347cec Delete empty source folder when deleting all downloads for a manga
It previously only attempted this after deleting a list of chapters, so it wasn't applicable
when deleting from Library or after unfavoriting an entry.

Closes #8594
2022-11-22 09:25:00 -05:00
ef3a6c80a7 Implement copying of Manga URL to Clipboard (#8587)
feat: Implement copying of Manga URL to Clipboard
2022-11-21 23:09:23 -05:00
2a2c6cee5f Allow zooming in WebView
Note that this does not force-enable zooming on pages with set viewports (which typically implies proper mobile scaling).
Closes #8588
2022-11-21 18:39:16 -05:00
7dff3cc6cb Remove unused resources (#8578) 2022-11-20 15:29:08 -05:00
8c1171a722 Don't attempt to check chapter download status for local chapters
Fixes #8541
2022-11-20 15:28:51 -05:00
2c850d0e33 Fix invert tapping dropdown not updating checked state in reader
Fixes #8566
Should ideally just Compose-ify it all some day.
2022-11-20 15:12:51 -05:00
f1b85ff39d Use Voyager on Extension Details screen (#8576) 2022-11-20 14:36:03 -05:00
b7fa25777d Update dependency com.github.requery:sqlite-android to v3.39.2 2022-11-20 14:30:11 -05:00
2d86f69caa Add reindex downloads description
Closes #8546
Also disable sound for the notification and cancel running indexing job if invalidating.
2022-11-20 14:29:56 -05:00
e22896a956 Use current timezone when setting tracker dates
Fixes #8553
2022-11-19 22:40:17 -05:00
be5802e473 Add back track icon onClick and title onLongClick actions
Closes #8565
Closes #8536
2022-11-19 22:37:48 -05:00
434c90d378 Translations update from Hosted Weblate (#8515)
Weblate translations

Co-authored-by: Abay Emes <abayemes@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Claudio Angileri <cloud019998@gmail.com>
Co-authored-by: Cường Bá <cuongba956@gmail.com>
Co-authored-by: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: InfinityDouki56 <ced.paltep10@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Kapiten Levi <kapitenlevi1@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: MXC48 <mxcvan@protonmail.com>
Co-authored-by: Moonlight! <kapitenlevi1@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ronny Teixeira <ronnyteixeira15@hotmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.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/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/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/kk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ko/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/lt/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/nb_NO/
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/sq/
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: Abay Emes <abayemes@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Claudio Angileri <cloud019998@gmail.com>
Co-authored-by: Cường Bá <cuongba956@gmail.com>
Co-authored-by: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: InfinityDouki56 <ced.paltep10@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Kapiten Levi <kapitenlevi1@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: MXC48 <mxcvan@protonmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ronny Teixeira <ronnyteixeira15@hotmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
2022-11-19 10:00:28 -05:00
eb6ba96b57 Limit parallelism for Coil image loading
Reference: https://www.reddit.com/r/androiddev/comments/xbeizp/comment/io4ytdv/

Co-authored-by: ivaniskandar <ivaniskandar@users.noreply.github.com>
2022-11-18 22:57:54 -05:00
5325e590ec Fix url sharing
Maybe fixes #8539
Based on f52785cbbd

Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
2022-11-18 22:49:54 -05:00
6ad6dae191 Bump dependencies 2022-11-18 22:41:06 -05:00
3f34fa1f58 Tweak library selection (#8513)
* Tweak library selection

Also use the new `fast*` extensions functions in other places of library presenter

* Cleanup
2022-11-18 22:33:38 -05:00
d12ea86b55 Add shecan DoH provider
Closes #8557
2022-11-18 22:28:08 -05:00
a8e45beb51 Bump image-decoder dependency
Corresponds with https://github.com/tachiyomiorg/image-decoder/pull/6
2022-11-18 22:28:08 -05:00
ba2a528886 Fix related to cancelling queued chapters (#8528)
Tachi removes the downloaded chapter (if it exists) when you just cancelled a download from queue.

PR fixes that

Also removes redundant return
2022-11-18 22:27:39 -05:00
d60367768b Fix monochrome launcher icon not applied when non-round shape is used (#8552) 2022-11-17 12:23:48 -05:00
db6528d3fa Show toast when no next chapter found in library
Closes #8522
Will probably become a snackbar at some point.
2022-11-14 22:47:07 -05:00
f5873d70c6 Don't rely on cache when deleting empty manga folders
In case the cache hasn't actually been indexed yet. Maybe fixes #8438.
2022-11-14 22:42:36 -05:00
10e349f76e Retain previous selected state when updating list states
Fixes #8417
2022-11-13 22:35:52 -05:00
b1ccebf329 Minor cleanup
Mostly just addressing comments from #8452
2022-11-13 12:24:59 -05:00
3407eb84c5 Make padding names neutral (#8531) 2022-11-13 12:11:51 -05:00
6017229d1b Clean up ComicInfo stuff a bit more 2022-11-13 12:01:19 -05:00
4f00af3173 Change long press on downloaded chapter icon to open menu
Seems like silently deleting things is confusing to some people.
2022-11-13 11:55:34 -05:00
9da232dcd8 Adjust download cache to ignore irrelevant files
Fixes #8530
2022-11-13 11:52:11 -05:00
acd43005df SearchToolbar: Better physical keyboard support (#8529)
Make enter keys behave like search key of on-screen keyboard
2022-11-13 10:59:23 -05:00
c31cf2a03a Bump test dependencies 2022-11-13 10:56:02 -05:00
51c964de3a Fix download not working on sd card (#8527)
Also create comicinfo file inside chapter folder instead of manga folder since it also contains some chapter specific data
2022-11-13 10:40:33 -05:00
dad24e785b Update leakcanary to v2.10 (#8521)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-13 10:38:32 -05:00
a908283e86 Update actions/dependency-review-action action to v3 (#8523)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-13 10:38:15 -05:00
d8725c7b7f Translations update from Hosted Weblate (#8398)
Weblate translations

Co-authored-by: Abay Emes <abayemes@gmail.com>
Co-authored-by: Abou <aboozar.gh.r@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Arisu <sylphtics@gmail.com>
Co-authored-by: C201 <derasetad@gmail.com>
Co-authored-by: Christian Elbrianno <crse@protonmail.ch>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Howard Wu <wuhao_2000@outlook.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Komar <k99248169@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: Muhamed Zahiri <muhamedzahiri@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: SHAWKIK ISLAM JOHA <shawkikislam@gmail.com>
Co-authored-by: Sebastian <klein.sebastian@outlook.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: alex <hdhdhfhfbbffhhfhfjfjf@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: arkon <eugcheung94@gmail.com>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/
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/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/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/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/kk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ko/
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/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/sq/
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/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Abay Emes <abayemes@gmail.com>
Co-authored-by: Abou <aboozar.gh.r@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Arisu <sylphtics@gmail.com>
Co-authored-by: C201 <derasetad@gmail.com>
Co-authored-by: Christian Elbrianno <crse@protonmail.ch>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Howard Wu <wuhao_2000@outlook.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Komar <k99248169@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: Muhamed Zahiri <muhamedzahiri@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: SHAWKIK ISLAM JOHA <shawkikislam@gmail.com>
Co-authored-by: Sebastian <klein.sebastian@outlook.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: alex <hdhdhfhfbbffhhfhfjfjf@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: arkon <eugcheung94@gmail.com>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
2022-11-12 10:29:32 -05:00
262f8449b4 Resolve proper chapter URL for ComicInfo "Web" field
Requires extensions to be updated to lib 1.4 to have proper URLs for some of them, which will
happen soon in the future.
2022-11-12 09:54:32 -05:00
bdf035d60a Use Voyager on Source Filter screen (#8511) 2022-11-12 09:47:19 -05:00
0270878748 Use Voyager on Extension Filter screen (#8503)
- Use sealed class for state
- Minor changes
2022-11-11 16:57:31 -05:00
6ada3c90ff Clean up ComicInfo stuff a bit 2022-11-11 16:34:18 -05:00
4e628fe6de Create ComicInfo Metadata files on chapter download (#8033)
* generate ComicInfo files at the chapter root and inside CBZ archives on chapter download.

* Update app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt

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

* Improvements suggested by @ghostbear

* now creates ComicInfo files in normal chapter folders as well
use manga directly instead of converting it to SManga
truncate old files before overwriting them

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>

* remove empty line after resolving merge conflict

* fixes Serializer for class 'ComicInfo' is not found error

* some changes to comments and variable names

* Revert leftover changes to archiveChapter() function

* minor cleanup

* Changed Chapter to SChapter

Co-authored-by: Andreas <andreas.everos@gmail.com>
Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
2022-11-11 16:16:37 -05:00
a8eebd824a Remove duplicate pinned sources setting
I guess it's simpler to just have 1 entry in the list (other than the last used duplicate).
This helps ensure that the list is as short as it can be.
2022-11-11 15:35:10 -05:00
afa0a0a0e2 Reword more references to "manga" in strings 2022-11-11 15:25:43 -05:00
92b039fac7 Add Kavita tracker (#7488)
* Added kavita tracker

* Changed api endpoint since tachiyomi has it's own. Moved some processing to backend

* Bugfix. Parsing to int instead of float

* Ignore DOH, update migration and cleanup

* Fix Unexpected JSON token
	modified:   app/src/main/java/eu/kanade/tachiyomi/data/track/TrackManager.kt
	modified:   app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/KavitaApi.kt
	modified:   app/src/main/java/eu/kanade/tachiyomi/data/track/kavita/KavitaModels.kt

* Apply code format suggestions from code review

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

* Apply simplified code suggestions from code review

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

* Removed unused dtos

* Use setter instead of function to get apiurl

* Added Interceptor

* Handle not configured/not accesible sources

* Unused import

* Added kavita to new tracking settings screen

* Delete SettingsTrackingController.kt to solve conflict

* Review comments
* Removed break lines from log messages
* Fixed jwt typo

* Merged enhanced services compatibility warning message to be more generic.
* Updated Komga String res to use new formatted one
* Added Kavita String res to use formatted one

* Apply suggestions from code review - hardcoded strings to track name

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

Co-authored-by: Andreas <andreas.everos@gmail.com>
2022-11-11 15:19:41 -05:00
acc65529a0 Replace numberpicker with wheelpicker (#8501)
* Replace numberpicker with wheelpicker

* cleanups
2022-11-11 15:02:45 -05:00
3061f198e9 Temporally Fix #8287 (#8493) 2022-11-11 15:01:48 -05:00
6fc1f4fc21 Reword download cache/indexing strings for consistency 2022-11-11 15:01:06 -05:00
a0f49b16c5 Remove "Download complete" notification
It wasn't really consistent with other notifications considering there's no
action to be taken in this state.
2022-11-10 23:08:19 -05:00
c6c4c1c393 Migrate to more domain model usages 2022-11-10 22:42:44 -05:00
811931ccc0 Minor cleanup 2022-11-10 22:23:34 -05:00
08d5633d81 Add option to invalidate download cache (#8491)
* Add option to invalidate download cache

* Review changes + lint
2022-11-10 22:15:35 -05:00
c76d5dd30c Tweak library continue reading button 2022-11-10 22:08:23 -05:00
340357d158 Voyager on More tab (#8498) 2022-11-10 22:08:18 -05:00
11ed47397d Remove top bar workaround (#8497)
Fixed upstream and we currently using small top bar which doesn't affected
2022-11-10 21:26:56 -05:00
6ce54eb845 Fix clearing database freezes the app (#8492) 2022-11-10 07:59:31 -05:00
d0236aaecf Update dependency androidx.compose:compose-bom to v2022.11.00 (#8490)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-09 23:24:37 -05:00
00059848b4 Bump dependencies 2022-11-09 22:51:27 -05:00
e45f6d0c92 Use toShareIntent in WebViewActivity 2022-11-09 22:38:28 -05:00
18ccde082d Full Compose MangaController (#8452)
* Full Compose MangaController

* unique key

* Use StateScreenModel

* dismiss

* rebase fix

* toShareIntent
2022-11-09 22:31:56 -05:00
21bc0f1952 Don't use default Lenovo "browser" handler 2022-11-09 19:43:52 -05:00
a37be747e9 Update dependency com.bluelinelabs:conductor to v3.1.8 (#8487)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-09 09:44:20 -05:00
bc3bb82651 Voyager on History tab (#8481) 2022-11-09 09:26:29 -05:00
ba00d9e5d2 Add "Play" button on manga in library (#8218)
* resume manga button in libarary

* work on resume button

* Backup

* work on opening the last read chapter

* backup

* renaming

* fab instead of image

* done with logic

* cleanup

* cleanup

* import cleanup

* cleanup...

* refactoring

* fixing logic

* fixing scopes

* Reworking design

* adding ability to turn on/off the feature

* cleanup

* refactoring, fixing logic, adding filter logic (partial)

* backup

* backup

* logic done

* backup before merge fix

* merge conflict....

* merge conflict...

* reworking ui logic

* removing unnecessary file

* refactoring

* refactoring

* review changes + minor parameter position movement

* commiting suggestion

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

* fixing minor mistake

* moving ChapterFilter.kt

Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-11-07 22:32:23 -05:00
bf9edda04c Use Voyager on Category screen (#8472) 2022-11-07 22:13:14 -05:00
9c9357639a Update dependency com.github.junrar:junrar to v7.5.4 (#8461)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-05 22:42:28 -04:00
3733871d2f Don't show copied to clipboard toast on A13+ when copying backup restore error 2022-11-05 11:56:31 -04:00
54471a014f Get index of selected update list item based on chapterId
Fixes #8442
2022-11-05 11:56:08 -04:00
8749be518f Adjust read next history logic
Closes #8454
2022-11-05 10:37:32 -04:00
6d880c938a Retry the MAL request if the token is expired (#8437)
Retry the MAL request if the token expired.
2022-11-04 22:54:52 -04:00
34aa4eb291 Add back haptic feedback long tap to fav (#8418)
* Add back haptic feedback long tap to fav

- add back haptic when long tap on manga to add to library

* simplify

* Revert "simplify"

This reverts commit f4bd57315a3dbf35f5975233980304fa66807718.

* Revert "Add back haptic feedback long tap to fav"

This reverts commit 81486e30e9adf6a7e983b5e3f12bd5bc34083db1.

* cleanup
2022-11-04 22:52:28 -04:00
280b0f42db Toggle enabled source in bulk
Maybe fixes #8439
2022-11-04 09:39:23 -04:00
65387d0089 Bump default user agent string 2022-11-04 09:38:49 -04:00
d41c103a72 Increase visibility of selected item background in dark themes
Closes #8419
2022-11-04 09:38:38 -04:00
0b93b9e059 Add pseudolocales to dev builds 2022-11-03 09:47:27 -04:00
ea3f933e95 #8264: Enabled isPseudoLocalesEnabled for debug (#8367)
Enabled isPseudoLocalesEnabled for debug
2022-11-03 09:46:53 -04:00
b006fe3a22 Revert "Tweak how getChapterUrl works (#8392)" (#8427)
This reverts commit 1a25cea0d6.
2022-11-03 09:23:59 -04:00
37ff3b4920 Ignore gradle.properties.swp (#8425)
* gitignore

* e

* .

* suggestion changes
2022-11-03 09:23:43 -04:00
1e93d785e5 Remove redundant compiler args (#8405) 2022-11-01 20:13:30 -04:00
999bd4efee Center extension name in ExtensionDetailsScreen (#8407) 2022-11-01 12:03:31 -04:00
3222247969 Release v0.14.2 2022-10-31 17:38:56 -04:00
dd6c9ce2fe Avoid crashing if multiple entries exist for same URL/source
Related to #8331. We'll need to revisit some of the get/insert logic to make sure this doesn't actually happen,
but at least it'll stop crashing for now.
2022-10-31 17:38:56 -04:00
7446b28ff1 Translations update from Hosted Weblate (#8342)
Weblate translations

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: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hiroshi <borlonjhayron1119@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: Jhayron Borlon <borlonjhayron1119@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: SHA 2048 <ajrtcuev@gmail.com>
Co-authored-by: SHAWKIK ISLAM JOHA <shawkikislam@gmail.com>
Co-authored-by: Shyntia Tan <shyntia.tan@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Unai <uesandi@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
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/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/eu/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/he/
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/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/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/tr/
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: 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: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hiroshi <borlonjhayron1119@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: SHA 2048 <ajrtcuev@gmail.com>
Co-authored-by: SHAWKIK ISLAM JOHA <shawkikislam@gmail.com>
Co-authored-by: Shyntia Tan <shyntia.tan@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Unai <uesandi@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
2022-10-31 17:38:47 -04:00
38c6702b8f Perform haptic feedback where appropriate (#8378) 2022-10-31 17:23:00 -04:00
afcf4b2988 Fix resetting filter resets browse pager (#8394)
Fix resetinf filter resets browse pager
2022-10-31 17:22:53 -04:00
ebb96a6ff4 Use selectedBackground for other list items to match with others (#8379)
* Use `selectedBackground` for other list items to match with others

* Remove unused imports
2022-10-31 17:20:31 -04:00
8b0affe9bd Set softWrap to true again for Pill text (#8391) 2022-10-31 17:20:24 -04:00
1a25cea0d6 Tweak how getChapterUrl works (#8392) 2022-10-31 13:05:27 -04:00
2ecbcdf4bd Reword "title"/"titles -> "entry"/"entries" (#8390) 2022-10-31 11:24:47 -04:00
642b392d44 Fix crash in ReaderReadingModeSettings when reverse portrait orientation is set 2022-10-30 23:10:59 -04:00
8dce7b3e9e Disable ChapterHeader & ChapterDownloadIndicator click when in selection mode (#8350)
* Disable `ChapterHeader` click when in selection mode

* Disable `ChapterDownloadIndicator` click when in selection mode

* Review changes

* Merge remote-tracking branch 'origin/master' into patch-7

* Merge remote-tracking branch 'origin/master' into patch-7

* Revert back to old implementation
2022-10-30 22:57:56 -04:00
33e90d6449 Clean up library download chapters logic
We can probably clean up the same logic in the manga controller at some point too, but that stuff's messy.
Also fixes the spacing issue that the new icon introduced.
2022-10-30 22:56:07 -04:00
50b17d5d34 Add different download options within the Library (#8267)
* feat: add download options to library

* feat: use max instead of min

* feat: remove download all option

* feat: applied requested changes + rename some functions

* feat: merge downloadAllUnreadChapters and downloadUnreadChapters into one function

* Apply suggestions from code review

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

* feat: apply lint suggestions + fix code

feat: apply lint suggestions + fix code

* feat: revert onClickDownload back to onDownloadClicked

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2022-10-30 22:27:48 -04:00
7818885406 Use proper content color for filter icon in library toolbar 2022-10-30 22:19:02 -04:00
26af7ccc77 Use BOM for kotlinx.coroutines dependencies 2022-10-30 19:38:18 -04:00
5d1f79012e Fix some crashes
- Delay the initial emission of updates/sources/extensions lists instead of using a state flow. This hopefully avoids rapid initial recompositions that cause the LazyColumn key duplication crashes. (Closes #8371)
- Fix a NPE in BrowseSourcePresenter
2022-10-30 18:43:16 -04:00
cac80daa71 Set source properly when creating manga entries
Fixes #8333
2022-10-30 17:40:17 -04:00
fc184f1cfa Clean up download ahead logic
- Remove redundant chapter sorting logic when fetching next chapter(s)
- Remove redundant download queue checks (it'll handle already queued or downloaded items)
- Trigger download ahead when read >= 25% of chapter rather than 20%
- Rely on download cache when checking if next chapter is downloaded to avoid jank (fixes #8328)
2022-10-30 16:59:33 -04:00
725fcbba0e Add warning about F-Droid build support in More screen 2022-10-30 16:00:19 -04:00
bdeb209d43 Downgrade to org.jetbrains.kotlinx:kotlinx-serialization-json 1.4.0
Fixes data class casting issue seen when multiple sources have the same shadowed classes.
2022-10-30 15:29:51 -04:00
a078f1ab1b Refactor search toolbar and fix browse source (#8360) 2022-10-30 13:34:47 -04:00
86c3d8c064 Use Compose fast* functions in more places 2022-10-30 12:27:12 -04:00
156191af44 Tabs: Don't explicitly set text color in the text (#8365)
The container already provides color option for both states
2022-10-30 12:04:46 -04:00
57bba9e5ab Fix Layout Inspector's Compose tree for dev flavor (#8363) 2022-10-30 11:42:06 -04:00
dd1923fe88 Remove redundant preference composables 2022-10-30 11:37:02 -04:00
df773ee15c Refactor overflow menus into a composable 2022-10-30 11:06:41 -04:00
f5451a6881 Add ability to open random manga (#8232)
* Add ability to open random manga

* Use `getMangaForCategory` instead

* Put it in overflow menu instead of using EFAB

* Partial review changes

* Merge remote-tracking branch 'refs/remotes/origin/patch-6' into patch-6

# Conflicts:
#	app/src/main/java/eu/kanade/presentation/library/LibraryScreen.kt

* Merge remote-tracking branch 'refs/remotes/origin/patch-6' into patch-6

# Conflicts:
#	app/src/main/java/eu/kanade/presentation/library/LibraryScreen.kt

* Wording changes
2022-10-30 10:57:33 -04:00
fcec1581b7 Fix share menu item not appearing for entries not in library 2022-10-30 10:48:25 -04:00
11cc789e36 Center global search prompt properly in library list mode 2022-10-30 10:48:25 -04:00
16f9fb2f40 Rebase Scaffold fork (#8353)
This adds content window insets supports that will be passed to
all components used except top and bottom bar.
2022-10-30 09:59:50 -04:00
6bfaa85e84 MoreScreen: Add navbar padding (#8349) 2022-10-29 23:10:18 -04:00
8f43fb9530 Update voyager to v1.0.0-rc06 (#8346)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-29 23:05:51 -04:00
04d2a3399b Restore chapter description alpha (#8345)
Restore "Darken the description colors"

Restores #3858, with new values based on current standards (0.78f rather than 0.62f)

I wanted to accomplish this without having to call a const, but that felt like a logical solution as well

Of course, if you got cleaner methods do tell, thanks
2022-10-29 22:58:18 -04:00
054bf8ec5d MangaScreen: Apply bottom content padding to large screen info column (#8347) 2022-10-29 22:57:19 -04:00
8417f5a63c Add more context to obsolete extension warning 2022-10-29 16:35:32 -04:00
26b46cace0 Few UI changes (#8299)
Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-10-29 16:28:25 -04:00
0849111247 Use remember var delegates in more places 2022-10-29 16:14:49 -04:00
f9c25b350e New Pager implementation (#8323)
Minimal implementation using new Compose SnapFlingBehavior
2022-10-29 12:32:55 -04:00
5b12c144da Release v0.14.1 2022-10-29 11:51:25 -04:00
f38130d086 Translations update from Hosted Weblate (#8316)
Weblate translations

Co-authored-by: Abay Emes <abayemes@gmail.com>
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: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Karl Stenlund <hikolo.92@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: jinu147 <nesqea20@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/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/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/kk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ko/
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/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/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Abay Emes <abayemes@gmail.com>
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: Dexroneum <Rozhenkov69@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Karl Stenlund <hikolo.92@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: jinu147 <nesqea20@gmail.com>
2022-10-29 11:50:17 -04:00
4b60138d41 Clean up strings and icons (#8326)
* Clean up strings and icons

* fix incorrect usages of label_more

* restore strings and reduce usage of android.R

* removing icon desc of FABs anyway as app's not for visual impaired users
2022-10-29 11:43:51 -04:00
fde7bfa3d1 Show notification while download cache is renewing
Since users seem to be confused now that the library loads before download info is shown...
2022-10-29 11:39:04 -04:00
69635ee66a Make Compose DropdownMenu overlap the trigger
Closes #8329
2022-10-29 10:37:51 -04:00
224f29077d Sort library items alphabetically in secondary pass
Fixes #7461
2022-10-29 10:11:12 -04:00
e1ab1fdb65 Prompt Extension update if ext-lib is updated
Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-10-29 10:05:30 -04:00
3e86cb094b PreferenceModel: Add subtitle provider to ListPreference (#8322)
* PreferenceModel: Add subtitle provider to ListPreference

So that it's possible to avoid value formatting when needed

* cleanups
2022-10-29 09:44:12 -04:00
9fbd3fe33f build: Add param to generate Compose compiler metrics (#8330)
./gradlew assembledevPreview -Ptachiyomi.enableComposeCompilerMetrics=true
2022-10-29 09:37:48 -04:00
073e9f94ff Reorder parameters of JSON parsing method (#8321) 2022-10-28 22:44:31 -04:00
64c0d9506d Update dependency androidx.paging:paging-compose to v1.0.0-alpha17 (#8319)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-28 22:09:13 -04:00
f638092ab9 Update voyager to v1.0.0-rc05 (#8320)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-28 22:09:04 -04:00
d0c4463ab3 Avoid concurrency crashes in SourceManager 2022-10-28 21:29:38 -04:00
ad107860b9 Consider downloaded only mode when getting download counts in library
Fixes #8318
2022-10-28 21:29:25 -04:00
5efb31bd71 Fix some crashes 2022-10-28 21:10:03 -04:00
e4a2f35907 Fix library download counts not being loaded if downloaded filter is in exclusion state 2022-10-28 19:05:55 -04:00
e49781de7a Reword "manga" to more generic "entry"/"entries"
Closes #8306
2022-10-28 18:49:46 -04:00
37cb4ec0c2 Don't filter out partially read chapters when marking as unread
Fixes #8313
2022-10-28 18:29:00 -04:00
401134fa8e Use MaterialTheme.shapes in more places 2022-10-28 16:18:05 -04:00
87391832ba Touch up manga grid/list items (#8307)
* Touch up library item touch indicator

Now the touch indicator has the same coverage as the selection indicator.
Experimental Modifier.Node API is used to draw the selection indicator

* Unify library and browse source list item layouts
2022-10-28 11:46:10 -04:00
e36d31bf0f Cleanup Library presenter (#8284)
* yeet observable + minor cleanup

* move [getTracksFlow] to domain

* Lint

* Review changes

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

* Review Changes 2

* Stuff

* Rename + Rebase

* Lint

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
2022-10-28 11:44:05 -04:00
37b7efbc87 WebView for chapter link (#8281)
* backup

* doing logic

* cleanup

* applying suggestion

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

* requested changes

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2022-10-28 11:41:51 -04:00
6e4a30e593 Fix "Download split" not working while using SD card (#8305)
* Fix "Download split" not working while using SD card

* Update app/src/main/java/eu/kanade/tachiyomi/util/system/ImageUtil.kt

Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-10-28 11:40:43 -04:00
ebddb96373 Release v0.14.0 2022-10-28 11:36:26 -04:00
0288abb66e Update baseline profile 2022-10-28 11:15:06 -04:00
d869a13ef9 Translations update from Hosted Weblate (#8278)
Weblate translations

Co-authored-by: Abay Emes <abayemes@gmail.com>
Co-authored-by: Ahmadlolbit <ahmadyassin714@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: B4LiN7 <balint.k.furedi@gmail.com>
Co-authored-by: Cường Bá <cuongba956@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <hamburger1024@mailbox.org>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: alex <hdhdhfhfbbffhhfhfjfjf@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.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/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/fr/
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/kk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ko/
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/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/sdh/
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: Abay Emes <abayemes@gmail.com>
Co-authored-by: Ahmadlolbit <ahmadyassin714@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: B4LiN7 <balint.k.furedi@gmail.com>
Co-authored-by: Cường Bá <cuongba956@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <hamburger1024@mailbox.org>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: alex <hdhdhfhfbbffhhfhfjfjf@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-10-28 10:32:03 -04:00
ccdfc37c97 Update dependency androidx.activity:activity-compose to v1.6.1 (#8301)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-28 10:28:54 -04:00
37c55abc2a Center the Text inside Pill (#8304) 2022-10-28 10:28:46 -04:00
c50b1a5c66 Alternate method of avoiding LazyColumn key conflict crashes
Co-authored-by: ivaniskandar <ivaniskandar@users.noreply.github.com>
2022-10-27 23:26:34 -04:00
187e9f94aa Set source id when inserting to db (#8300) 2022-10-27 22:34:21 -04:00
1704dc062d Show file URI when invalid backup file is selected 2022-10-27 18:04:43 -04:00
0657a52924 Cleanup history repository (#8297)
* Cleanup history repository

* Lint
2022-10-27 18:03:52 -04:00
ccc4144f3c Remove side nav icon alignment preference
Simplifying it to just always be centered, which is what most Google apps seem to be doing anyway.
2022-10-27 17:30:12 -04:00
d5b4bb49b1 Refactor network to local manga logic
Maybe fixes #8289
2022-10-26 23:01:21 -04:00
5b3f9e082e Use new Compose BOM 2022.10.00 (#8295) 2022-10-26 18:12:32 -04:00
ca06516900 Avoid some crashes 2022-10-26 18:12:11 -04:00
3fb42b6ce9 Use Syer's Voyager fork (#8288)
with fixes needed for further migration
also revert back jvm target to 1.8
2022-10-26 09:22:38 -04:00
2cbe946e7e Rework library selection (#8290) 2022-10-26 09:22:12 -04:00
3b5b9a1ae5 Use Channel in Download cache (#8292)
* Use `Channel` in Download cache

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

* Use Unlimited capacity

Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>
2022-10-26 09:21:35 -04:00
a834ff3a44 Show LibraryScreen toolbar early to match other main screens (#8285) 2022-10-25 09:40:45 -04:00
82b552ac9a MangaPresenter: Filter unsupported track service from available service list (#8286) 2022-10-25 09:34:05 -04:00
15f7e53e4f Don't export CrashActivity 2022-10-23 22:07:06 -04:00
9792a6cb78 Fetch download counts if library is filtered by downloaded
Fixes #8277
2022-10-23 10:15:05 -04:00
f30150c0f0 Fixed "0 mins ago" in "Library last updated" string (#8279)
* Fixed "0 mins ago" in "Library last updated" string

* Recommended fixes
2022-10-22 19:59:07 -04:00
5c868d7846 Use kotlin.time extensions in some more places 2022-10-22 19:57:55 -04:00
39e41510d0 Explicitly remove com.google.android.gms.permission.AD_ID permission 2022-10-22 19:53:59 -04:00
78b76a186c Avoid NPE in browse source screen
It logically should never be null, yet I see crash logs about it.
2022-10-22 16:04:12 -04:00
6e04822f5e Only enable ACRA crash logging in preview and stable release builds 2022-10-22 15:47:09 -04:00
4ff5c1148e Cleanup LibraryUpdateService (#8237) 2022-10-22 15:16:44 -04:00
bd285920cd Translations update from Hosted Weblate (#8256)
Weblate translations

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: Eric <hamburger1024@mailbox.org>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.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/id/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/it/
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/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/th/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
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: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eric <hamburger1024@mailbox.org>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: jinu147 <nesqea20@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-10-22 15:11:09 -04:00
fb04401460 Remove unnecessary swap file 2022-10-22 15:10:39 -04:00
42bf91779d Category name letter casing change not allowed when renaming (#8274)
* adding the feature

* minor reordering

* Changes from review

* including gradle.properites.swp

* Update app/src/main/java/eu/kanade/domain/category/model/Category.kt

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

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2022-10-22 15:09:38 -04:00
2ab744c525 Fix app lock and make delay not survive app being killed (#8272)
* Fix app lock

* Always require unlock if app is killed
2022-10-22 15:07:44 -04:00
4a244a598b Cleanup UpdatesPresenter deleteChapters (#8273) 2022-10-22 12:58:14 -04:00
d0bff298b7 Remove fake chapter deletion state updates
Now that the updates and manga screen listen to download cache changes, it'll reflect the real states once deleted.
2022-10-22 12:24:59 -04:00
152eb5b951 Handle async cache in updates and manga screens
- Also fix concurrent accesses to main cache map
- Also debounce sources and updates list updates to maybe avoid crashing due to dupe LazyColumn keys
2022-10-22 10:50:44 -04:00
d558f9e1d6 Tweak tablet UI mode setting (#8262) 2022-10-22 10:15:12 -04:00
b3557e844c Fix "Add manga to library" snackbar not showing with ChapterDownloadAction.START_NOW (#8271) 2022-10-22 10:12:06 -04:00
9c8ccb8e0e Disable Firebase advertising ID collection
https://firebase.google.com/docs/analytics/configure-data-collection?platform=android#disable_advertising_id_collection
2022-10-21 23:06:34 -04:00
4138a17e29 Maybe avoid extensions list rendering crashes 2022-10-21 22:50:33 -04:00
fbda243c0d Avoid crashing during eager WebView init 2022-10-21 16:57:13 -04:00
eb742b29f8 Avoid some IndexOutOfBoundsExceptions 2022-10-21 16:45:26 -04:00
d2e62ffb19 Prevent invalid user agent header values from being set 2022-10-21 16:27:59 -04:00
2921be620a Use fade transition in Voyager screens to mimic existing Conductor change handler 2022-10-21 15:29:17 -04:00
c61a51438d Disable autocomplete on tracker login password field 2022-10-21 15:12:12 -04:00
7e40680af0 Perform download cache renewal async
Don't block on cache renewals, but notify library on updates so that the badges show up when ready.

We skip the cache when checking if a chapter is downloaded for the reader assuming that it's a
relatively low cost to check for a single chapter.

(Probably) fixes #8254 / fixes #7847
2022-10-21 15:00:41 -04:00
93925a7286 Remove redundancy in ExtensionManager 2022-10-21 14:42:21 -04:00
b04807e53a Proper DI instantiation for some more download related classes 2022-10-21 14:29:44 -04:00
01e13e59e5 Remove ben-manes.version plugin
Since we use Renovate on GitHub anyway.
2022-10-21 14:28:10 -04:00
2cf1009f70 Allow disabling automatic backups for whatever reason 2022-10-20 23:20:38 -04:00
93827aba34 Defer library download counts if not needed 2022-10-20 23:20:32 -04:00
3318314c4a Translations update from Hosted Weblate (#8219)
Weblate translations

Co-authored-by: Abay Emes <abayemes@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Cường Bá <cuongba956@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eric <hamburger1024@mailbox.org>
Co-authored-by: FateXBlood <zecrofelix@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Matey Krastev <matey_krastev2@abv.bg>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: SHAWKIK ISLAM JOHA <shawkikislam@gmail.com>
Co-authored-by: Samuel Carvalho de Araújo <samuelnegro12345@gmail.com>
Co-authored-by: Shippo <shiposhouyou@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Trollerr <thanhdado480@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: jn1106 <nesqea20@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.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/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/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/kk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ko/
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/ne/
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/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: Abay Emes <abayemes@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Cường Bá <cuongba956@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eric <hamburger1024@mailbox.org>
Co-authored-by: FateXBlood <zecrofelix@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Matey Krastev <matey_krastev2@abv.bg>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: SHAWKIK ISLAM JOHA <shawkikislam@gmail.com>
Co-authored-by: Samuel Carvalho de Araújo <samuelnegro12345@gmail.com>
Co-authored-by: Shippo <shiposhouyou@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Trollerr <thanhdado480@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: jn1106 <nesqea20@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-10-20 22:47:23 -04:00
44cabf2f0b Hide reader "Split tall images" option in release build (#8235) 2022-10-20 22:41:42 -04:00
a8ca7b690f Avoid crashing if invalid download and backup location is set
Fixes #8252
2022-10-20 22:34:27 -04:00
824d5e22bc Clean up strings and resources (#8253)
* Clean up strings and resources

* fix pringle's typo

* restore catching file pick errors

* add back file chooser title

* revert #7740 and remove try-catch of chooser-wrapped intent

* swap xmlns lines

* swap xml tools lines
2022-10-20 17:48:13 -04:00
7a360779b3 Update dependency com.google.android.material:material to v1.7.0 (#8251)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-20 09:16:00 -04:00
4b5f965cea AppThemePreference: Filter dynamic theme if it's not available (#8250) 2022-10-19 22:43:41 -04:00
d03cbbe0cd Fix language/theme settings dialog and remove delay (#8244)
* Fix language/theme settings dialog and remove delay

* inline UI preferences

* use `by remember`

* remove unused variable

* remove unused import
2022-10-19 12:57:05 -04:00
84bcd8d1d2 Fix crash when saving a page from certain chapters (#8242) 2022-10-19 07:59:05 -04:00
6756bfab75 Fix download cache not updating on location change 2022-10-18 17:35:38 -04:00
8d97b980e3 Tweak library view (#8240)
- Move category join to improve performance
- Move bookmark calculation into query
- Move unread calculation into domain
2022-10-18 16:33:26 -04:00
2d19729869 Clean up OkHttp methods and parse from Okio directly (#8238) 2022-10-18 12:09:23 -04:00
f5bde3726a More settings stuff (#8226)
* title size

* move about screen to settings

keeping shortcut inside more screen

* more

* shrink texts

* scrollable create backup dialog choices

* search back button

* cleanups

* delay changes that require activity recreate

* lessen horizontal padding
2022-10-18 09:35:10 -04:00
ea092fa175 Fix selection in library (#8233) 2022-10-18 09:32:34 -04:00
9c4051a5ba Update serialization_version to v1.4.1 (#8208)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-17 20:38:23 -04:00
fed914827a Tweak Crash activity (#8229)
- Scroll entire content body
- Edge2Edge
2022-10-17 20:38:05 -04:00
ea33f8dba5 Move "Share" to end of DropDownMenu (#8225) 2022-10-17 09:42:47 -04:00
4f91d80765 Update Baseline Profiles (#8220) 2022-10-16 22:36:25 -04:00
4178f945c9 Add Crash activity (#8216)
* Add Crash activity

When the application crashes this sends them to a different activity with the cause message and an option to dump the crash logs

* Review changes
2022-10-16 16:35:20 -04:00
558aad1a71 Always renew download cache if no sources have been loaded yet
Fixes #7705. Somewhat janky solution to handle when loading the sources on app start is slower than
the initial download cache priming.
2022-10-16 16:30:51 -04:00
d6cbff2837 Tweak library query (#8214)
* Tweak library query

Co-Authored-By: Quang Kieu <kieuq@wit.edu>

* Update app/src/main/sqldelight/migrations/21.sqm

* Update app/src/main/java/eu/kanade/domain/library/model/LibraryManga.kt

* Update app/src/main/sqldelight/view/libraryView.sq

* Update app/src/main/java/eu/kanade/data/manga/MangaMapper.kt

* Update app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt

* Update app/src/main/java/eu/kanade/data/manga/MangaMapper.kt

* Bump version

Co-authored-by: Quang Kieu <kieuq@wit.edu>
2022-10-16 15:33:12 -04:00
aea0cadbfb Settings: Tint icon with primary color and separate info item layout (#8217) 2022-10-16 15:32:48 -04:00
e4292719d3 CreateBackupDialog: Select all options by default (#8215) 2022-10-16 12:52:34 -04:00
69cdba71eb Remove dead code
Mostly from settings rewrite, but some other things too.
2022-10-16 12:48:43 -04:00
5c5468f9af Settings: M3 and two pane ui (#8211)
* Settings: M3 and two pane ui

* TrackingLoginDialog: Move close button

* Use small top bar

* Revert "Update voyager to v1.0.0-rc02"

This reverts commit 570fec6ea6.

https://github.com/adrielcafe/voyager/issues/62
2022-10-16 12:15:01 -04:00
6635dd2990 Control library badge visibility with props instead
Fixes #8174
2022-10-16 11:30:54 -04:00
27e5256305 Center EmptyScreen message
Fixes #8212
2022-10-16 10:36:10 -04:00
b6dbf63633 Update aboutlib_version to v10.5.1 (#8207)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-16 10:33:22 -04:00
551e6a8b62 Translations update from Hosted Weblate (#8213)
Weblate translations

Co-authored-by: Abay Emes <abayemes@gmail.com>
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: Florin Voicu <florin.bkk@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jen Kung-chih <Kaitul@outlook.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marcel Brode <m.brode@shopware.com>
Co-authored-by: M͜͡edRAM <mohammad7ram@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: SHAWKIK ISLAM JOHA <shawkikislam@gmail.com>
Co-authored-by: Silvia Scaglione <sissisoad@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Topi <topi@harjunpaa.fi>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: hoi oii <mtsnellecas@gmail.com>
Co-authored-by: jn1106 <nesqea20@gmail.com>
Co-authored-by: samhy147 <samhy144@gmail.com>
Co-authored-by: saurus <sokphanun@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/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/fi/
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/kk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/km/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ko/
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/nl/
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/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Abay Emes <abayemes@gmail.com>
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: Florin Voicu <florin.bkk@gmail.com>
Co-authored-by: Gediminas Murauskas <muziejusinfo@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jen Kung-chih <Kaitul@outlook.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marcel Brode <m.brode@shopware.com>
Co-authored-by: M͜͡edRAM <mohammad7ram@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: SHAWKIK ISLAM JOHA <shawkikislam@gmail.com>
Co-authored-by: Silvia Scaglione <sissisoad@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Topi <topi@harjunpaa.fi>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: hoi oii <mtsnellecas@gmail.com>
Co-authored-by: jn1106 <nesqea20@gmail.com>
Co-authored-by: samhy147 <samhy144@gmail.com>
Co-authored-by: saurus <sokphanun@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-10-16 10:32:52 -04:00
570fec6ea6 Update voyager to v1.0.0-rc02 2022-10-16 10:28:44 -04:00
7da32750b2 Update dependency com.google.firebase:firebase-analytics-ktx to v21.2.0 (#8210)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-16 10:25:43 -04:00
a2b21e5ad6 Retain bookmark of readded chapters (#8205)
* Retain bookmark of readded chapters

* Fix typo
2022-10-15 14:22:58 -04:00
dbd93cf5d1 Tweak source view type menu radio icon to match stable 2022-10-15 12:05:52 -04:00
c2eaf1c86b Minor settings cleanup
- Fix dark mode setting title
- Enforce usages of translated strings for screen titles
- Use LocalUriHandler where applicable instead of Android context
2022-10-15 11:58:24 -04:00
890f1a3c7b Full Compose settings (#8201)
* Uses Voyager for navigation.
* Replaces every screen inside settings except category editor screen since it's
called from several places.
2022-10-15 11:38:01 -04:00
3fdcd636d7 Add bookmark filter (#8198)
* feat: add bookmark filter

* feat: add getBookmarkChaptersByMangaId query + interactor to be used for filtering
2022-10-15 11:33:09 -04:00
3d7e44726d BrowseSourceToolbar: Match display mode dropdown to stable and change toolbar icon based on display mode (#8200)
* BrowseSourceToolbar: Match display mode dropdown to stable and change toolbar icon based on display mode

* Review changes

* Review changes 2
2022-10-15 11:16:01 -04:00
147455f99c Add padding to track search dialog error message
Fixes #8142
2022-10-14 16:37:43 -04:00
b25ca7617d Move manga screen filter sheet to toolbar
Closes #6927
This makes it more consistent with the library. Tapping the chapters heading still opens the sheet for convenience.
2022-10-14 16:30:14 -04:00
bc1fbfac9d Minor cleanup 2022-10-14 16:13:50 -04:00
7e92921f84 Attempt to avoid duplicate update rows
Related to #7713
2022-10-14 15:43:27 -04:00
e1adb89ff8 Range selection in library (#8186)
* logic and a bit of cleanup

* cleanup done

* grammar fix

* fixing format

* Auto stash before checking out "HEAD"

* Revert "Auto stash before checking out "HEAD""

This reverts commit 202374a36ff444b7da3fcdb2a9859ca71a7c046e.

* Update app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt

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

* cleanup

Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-10-14 15:30:19 -04:00
4e544005fe Fix empty screen font style (#8197) 2022-10-14 12:27:52 -04:00
31bc2c4420 Update to AGP 7.3.1 2022-10-14 12:16:22 -04:00
02b3718aa1 Use Compose's existing method to get plural string (#8194) 2022-10-13 22:21:19 -04:00
26a42ba9c0 Upgrade to Kotlin 1.7.20
Also run formatter and address some deprecation warnings.
2022-10-11 22:40:08 -04:00
b1e104319f Fix download progress indicator (#8188) 2022-10-11 22:17:45 -04:00
a3afb35539 Overwrite saved images instead of creating new ones (#8162)
* Implementing overwrite instead of saving duplicated images

* Using filename instead of hardcoding image type

* Refactoring method to accept lambda for default value

* Removing extra parenthesis
2022-10-11 08:20:30 -04:00
fba244423f Fix Scrollbar when the list contains sticky header (#8181)
* Fix Scrollbar when the list contains sticky header

* Fix VerticalFastScroller when the list contains sticky header

* exposé
2022-10-10 11:59:01 -04:00
8500add09f EmptyScreen: Compose-ify and apply content padding (#8177)
* Apply content padding to empty screen

except the empty screens in browse

* compose-ify EmptyScreen

* center face when action show

* fix padding

* apply content padding to browse tabs

* fix duplicate bottom insets
2022-10-09 15:52:56 -04:00
23bfa1f18f Minor UI fixes
- Remove M3 styling from search toolbar
- Use secondary alpha for subtitles for Sources and Migrate items
- Update some content descriptions
2022-10-09 15:49:32 -04:00
b4f2da12ea Bring back overscroll in SwipeRefresh for A12+
It's more consistent with the rest of the overscroll behaviour in the app. We'll wait for the upstream fix.
2022-10-09 15:37:48 -04:00
b84a31ba92 Don't wrap tab pills
It may sometimes overlap the text a bit, but it's less awkward than wrapped pills
2022-10-09 11:51:32 -04:00
d0950cb026 Document copied M3 component customizations 2022-10-09 11:48:46 -04:00
404f53b16b Refactor SwipeRefresh and fix some issues (#8169) 2022-10-09 11:20:43 -04:00
737d0fb8f3 RemoveMangaDialog: Show manga title in dialog message (#8163) 2022-10-09 10:56:31 -04:00
b95a30e424 Fix linting error 2022-10-09 10:54:54 -04:00
0d9c1e6e9c Bump Compose Material3 dependencies 2022-10-09 10:47:41 -04:00
3bfbd58402 Clean up download state logic in MorePresenter 2022-10-09 10:37:44 -04:00
bd9a08c73d Update shizuku_version to v12.2.0 (#8171)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-09 10:37:36 -04:00
41dc41f285 Update dependency androidx.sqlite:sqlite-ktx to v2.3.0-beta01 (#8165)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-08 22:25:33 -04:00
50f959e5f4 Hiding the keyboard (#8160)
* Hiding the keyboard (#8157)

* Cleanup

* Adding log

* cleanup

* moving code to ViewExtensions.kt

* TrackDialog keyboard fix?

* moving  code to ContextExtensions.kt

* MoreScreen: Remove title (#8158)

* MoreScreen: Remove title

Also removes the state banners as it's redundant

* Add back banners

* Allow manual selection of manga description instead of copying to clipboard

Closes #6548

Notably missing some "standard" options like "Select all" or "Share": https://issuetracker.google.com/issues/226648919

* Allow marking partially read chapters as unread

Closes #3777

* Tablet UI edge-to-edge tweaks (#8159)

* LibraryScreen: Tweak content padding application to draw under nav bar

* BrowseScreen: Tweak content padding application to draw under nav bar

Side note the tab content doesn't actually use its
scaffold (bottom) contentPadding so it's definitely will
be a headache in the future.

* Don't hardcode bottom nav padding

* removed unnecessary import

* refactoring code

* rewriting code

* cleanup?

* cleanup

Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
Co-authored-by: arkon <eugcheung94@gmail.com>
2022-10-08 17:12:09 -04:00
4b4be58d0d Tablet UI edge-to-edge tweaks (#8159)
* LibraryScreen: Tweak content padding application to draw under nav bar

* BrowseScreen: Tweak content padding application to draw under nav bar

Side note the tab content doesn't actually use its
scaffold (bottom) contentPadding so it's definitely will
be a headache in the future.

* Don't hardcode bottom nav padding
2022-10-08 13:28:09 -04:00
4bba7a8bab Allow marking partially read chapters as unread
Closes #3777
2022-10-08 13:26:25 -04:00
60bcebe4d1 Allow manual selection of manga description instead of copying to clipboard
Closes #6548

Notably missing some "standard" options like "Select all" or "Share": https://issuetracker.google.com/issues/226648919
2022-10-08 12:57:55 -04:00
cf6407c4d4 MoreScreen: Remove title (#8158)
* MoreScreen: Remove title

Also removes the state banners as it's redundant

* Add back banners
2022-10-08 10:24:50 -04:00
5f8252447f Translations update from Hosted Weblate (#8140)
Weblate translations

Co-authored-by: Abay Emes <abayemes@gmail.com>
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: Eric <hamburger1024@mailbox.org>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Marcel Brode <m.brode@shopware.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: borgar <vodrigorenegas@gmail.com>
Co-authored-by: fanylouise <gandra.fany@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.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/es/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/es_419/
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/kk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
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/th/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Abay Emes <abayemes@gmail.com>
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: Eric <hamburger1024@mailbox.org>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Marcel Brode <m.brode@shopware.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: borgar <vodrigorenegas@gmail.com>
Co-authored-by: fanylouise <gandra.fany@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-10-08 09:51:35 -04:00
dcd5541e96 Fix filter search not triggering when clicking genre from Manga details (#8156) 2022-10-08 09:48:19 -04:00
7be6863910 Add JavaScriptEngine abstraction to extensions-lib (#8155)
This allows us to swap out the implementation in the future and on different platforms
without major changes to the extensions themselves.
2022-10-08 09:45:06 -04:00
caf9219d99 Reword some reader settings 2022-10-05 09:26:42 -04:00
3b62396442 Setup Baseline Profile (#8135)
* Setup Baseline Profile

Adds Baseline Profile generator and startup time test.
Readme included in macrobenchmark module to run the generator.

* changes
2022-10-04 09:22:55 -04:00
bbe1608006 Show correct language string in browse screens (#8136) 2022-10-03 23:05:37 -04:00
b8fa326c21 Fix sort by date in LibraryPresenter (#8137) (#8145)
Co-authored-by: Alessandro Tedesco <alessandro.tedesco@zehus.it>
2022-10-03 23:03:43 -04:00
1cf1b34e7f Fix regular scrollbar (#8139)
At some point the scrollbar stops responding to
scroll changes. Not too confident with this fix
but it works.
2022-10-03 23:03:33 -04:00
ff4fb83bff LocaleHelper: use argument for a when expression (#8131) 2022-10-02 10:08:12 -04:00
e24501da09 Update coil_version to v2.2.2 2022-10-01 23:55:02 -04:00
0ca14c61c2 Explicitly reword some locale names
Avoiding some country names in favour of more generic terminology where appropriate.
2022-10-01 23:54:54 -04:00
6be9cccc7a Revert min extension-lib change
Some extensions haven't been bumped yet. We should probably try to bump everything at some point.
Also includes some minor cleanup.
2022-10-01 13:24:38 -04:00
a5a70defc8 Update aboutlib_version to v10.5.0 (#8127)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-01 13:24:24 -04:00
db3cbac310 Stop loading extension-lib <= 1.2 2022-10-01 11:34:46 -04:00
de23226591 Add methods to get manga and chapter url (#8114)
* Add methods to get manga and chapter url

Some fork supports directly opening chapters with webview hence `getChapterUrl`

* Review Changes

* Add since to javadoc
2022-10-01 11:31:07 -04:00
ea8383978b Move LibraryManga to domain layer (#8126) 2022-10-01 11:30:51 -04:00
b04d1e5f50 Reduce some usages of toDbManga (#8116)
Co-Authored-By: stevenyomi <95685115+stevenyomi@users.noreply.github.com>

Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>
2022-10-01 11:01:25 -04:00
98c459a6b6 Downloader: Don't trust index provided by source (#8122) 2022-10-01 11:01:05 -04:00
00f442b77e Don't download completely read chapter if it was in queue (#8113) 2022-10-01 10:58:13 -04:00
42b0e3e438 HistoryScreen: Remove paging (#8125)
* HistoryScreen: Remove paging

Per my testing performance-wise there's virtually no
difference in loading time.

* cleanups

* add key and contentType
2022-10-01 10:50:25 -04:00
8d1f99a480 Update Proguard rules to handle serializers in all modules
Fixes #8112
2022-10-01 10:47:45 -04:00
bef8342aa5 Remove obscure/barely translated locales 2022-10-01 10:43:20 -04:00
2131294b22 Translations update from Hosted Weblate (#8070)
Weblate translations

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: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eric <hamburger1024@mailbox.org>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@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: Milo Ivir <mail@milotype.de>
Co-authored-by: Momade98 <bemomoh@hotmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: luimen88 <kenjihimuravzla@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.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/es_419/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
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/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/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/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: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eric <hamburger1024@mailbox.org>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: ID-86 <id86dev@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: Milo Ivir <mail@milotype.de>
Co-authored-by: Momade98 <bemomoh@hotmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: altinat <altinat@duck.com>
Co-authored-by: luimen88 <kenjihimuravzla@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-10-01 10:37:34 -04:00
5c22cbf28e Remove mangaChapterMapper (#8124)
Was used by updates screen previously
2022-10-01 10:33:03 -04:00
488276d498 Tweak library search to allow for searching with source language suffix (#8123) 2022-10-01 10:32:52 -04:00
6ac17363ed Tweak behavior on Browse screen (#8121)
* Tweak behavior on Browse screen

- Fix system back popping controller
- Add behavior to system back to cancel search toolbar before clearing current search or popping controller

* Review changes
2022-10-01 10:32:41 -04:00
58c47c4c50 ExtensionScreen: Adjust item visual (#8120)
* ExtensionScreen: Adjust item visual

* Move install status view and add progress indicator
* Add secondary item modifier to info texts
* Wrap info texts with FlowRow in case of unavailable space
* Remove language text in non-installed items

Extra content:
* Change the list key to be more consistent
* General cleanups

* typo
2022-10-01 10:32:08 -04:00
80b2ebc45b Fix ComicInfo.xml not being read if .noxml file exists too (#8111)
* gives ComicInfo.xml files priority over noxml files if both are at the chapter root.

* delete the noxml file if both a noXml file and a ComicInfo file exist
2022-09-30 23:41:40 -04:00
ef2c9460b5 Fix total item count in library app bar (#8117) 2022-09-30 23:36:23 -04:00
ad84a8c3e9 Improve DelayedTrackerStore (#8109)
* Improve DelayedTrackerStore

* Review changes
2022-09-29 09:20:07 -04:00
8b9a06e298 Requests: add GET(HttpUrl) overload (#8107)
Requests: add GET(HttpUrl) overload
2022-09-28 17:35:58 -04:00
6b1d597d34 MangaScreen: Adjust insets (#8097)
I should have done this when Scaffold was rebased
2022-09-27 22:20:10 -04:00
5a37f2398a Improve search toolbar UX a little bit (#8102)
* Improve search toolbar UX a little.

* Fix wrong stringResource import.

* Revert `FocusRequester` change in favour of #8093.
2022-09-27 18:05:10 -04:00
98a4f6cccb manga-refresh-state (#8090) 2022-09-27 17:49:21 -04:00
633bd6eb46 UpdatesScreen: Fix selection state after deleting download (#8100) 2022-09-27 17:44:41 -04:00
f19c288bec Fix missing focus when single TextField shown (#8098) 2022-09-27 17:44:06 -04:00
e2ce3f68bf Increase timeout duration of WebViewInterceptors (#8099) 2022-09-27 17:43:46 -04:00
56722140c9 Add a proguard rule for XMLUtil
Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
2022-09-26 17:28:22 -04:00
e90b39b29d Use more unique item keys
Should make stacktraces more distinguishable.
2022-09-26 17:23:08 -04:00
f4c684b4b8 Remove cache control on already cacheless image request (#8085) 2022-09-26 17:13:03 -04:00
869396b1a4 Rephrase empty placeholder in clear database (#8082)
Co-authored-by: nicki <72807749+curche@users.noreply.github.com>

Co-authored-by: nicki <72807749+curche@users.noreply.github.com>
2022-09-26 09:11:13 -04:00
7f9222f7b7 Update xml_serialization_version to v0.84.3 (#8079)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-25 15:42:05 -04:00
a35f947892 Cleanup webview interceptors (#8067)
* Cleanup webview interceptors

* Review changes + Improvement

* Review Changes 2
2022-09-25 13:09:40 -04:00
ec272f6c4e Fix date added when adding from browse source
Fixes #8059
2022-09-25 13:09:25 -04:00
f0af3858e8 Bump minimum WebView version and default user agent string 2022-09-25 10:55:10 -04:00
db91d04e82 Temporarily replace library category tabs divider with our own
Fixes #7789
2022-09-25 10:50:02 -04:00
9859b38f32 Ellipsize long titles
Fixes #8075
2022-09-25 10:18:50 -04:00
0190c36d20 BrowseSourceScreen: Adjust browse mode chips placement (#8076)
The chips row is now scrollable too and filter fab is removed
2022-09-25 10:15:01 -04:00
ba533f30ce Add support to update strategy on global update (#7902)
* Add support to update strategy.

* Add JavaDoc and bump the LIB_VERSION_MAX constant.

* Fix a word typo.

* Store update strategy enum as integer in the DB.
2022-09-25 10:12:36 -04:00
29fa93e829 Split the rest of the preferences in PreferencesHelper (#8074)
* Split the reset of the preferences in PreferencesHelper

* Capitalize ThemeMode
2022-09-25 10:07:06 -04:00
0fabe4bd01 GlobalSearchController: Auto focus search view when initial query is empty (#8073) 2022-09-25 08:53:34 -04:00
f98b4f4e39 DownloadController: Fix first active download status not updating (#8069) 2022-09-24 11:59:11 -04:00
b8c1257645 Enable Gradle parallel mode 2022-09-24 11:57:27 -04:00
467ceacb17 SecureActivityDelegate: Fix cold-start only lock behavior (#8066) 2022-09-24 10:46:35 -04:00
2d22baba62 Bump dependencies 2022-09-24 10:34:49 -04:00
750f90614d Remove Tagalog translations
Filipino should be used instead. Hopefully Weblate stops adding this back??
2022-09-24 10:31:45 -04:00
d28ded4525 Weblate translations (#8023)
Co-authored-by: Amjad Ali <playeroid96@gmail.com>
Co-authored-by: Andrii Yefremov <ka1tzyu@gmail.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: moon <moononclouds@proton.me>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ar/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/fil/
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/uk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/vi/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Amjad Ali <playeroid96@gmail.com>
Co-authored-by: Andrii Yefremov <ka1tzyu@gmail.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: moon <moononclouds@proton.me>
2022-09-24 10:30:51 -04:00
4b4a138eee Improve chapter recognition (#8050) 2022-09-24 10:29:55 -04:00
b5dca2eb09 Move chapter preferences from PreferencesHelper to LibraryPrefrences (#8061) 2022-09-24 10:14:16 -04:00
747cbd24cb Adjust source-api R8 rules (#8064) 2022-09-24 10:13:58 -04:00
d3520419d4 Clear search query before popping controller when navigating up (#8055) 2022-09-22 22:30:28 -04:00
acb8ab15b2 Recreate reader settings when opening sheet (#8054) 2022-09-22 22:29:15 -04:00
5cdcc1679f Split backup preferences from PreferencesHelper (#8051) 2022-09-22 08:57:42 -04:00
b37b3767f3 Minor cleanup
Also add POST_NOTIFICATIONS permissions to make Android Studio stop complaining about it.
2022-09-21 22:39:32 -04:00
2d56ad1ad9 Replace deprecated SmallTopAppBar 2022-09-21 22:30:06 -04:00
5d3bc7245e Bump dependencies 2022-09-21 22:19:00 -04:00
e82963c9ef Split download preferences from PreferencesHelper (#8048) 2022-09-21 17:45:07 -04:00
ec34977a64 Update BrowseSourcePresenter.kt (#8040)
Set filters to default when reset is pressed.
2022-09-21 14:27:38 -04:00
2ced56e490 Fix error when updating manga details with uninitialized title (#8045) 2022-09-21 09:19:45 -04:00
e568951396 Split track preferences from PreferencesHelper (#8046) 2022-09-21 09:18:53 -04:00
e275897bf9 Split reader preferences from PreferencesHelper (#8042) 2022-09-20 08:36:57 -04:00
2b089648a3 Remove redundant preference keys 2022-09-20 00:13:33 -04:00
c2a831dded Cleanup logic in UpdatesPresenter (#8035) 2022-09-19 23:56:28 -04:00
c740558327 Split library preferences from PreferencesHelper (#8036) 2022-09-19 23:55:07 -04:00
0e3176a77c Clean up UpdatesController
- Move loading state into scaffold (closes #7704)
- Move logic into presenter
- Make some composables private
2022-09-18 22:38:44 -04:00
f85cbb1582 Replace clear database FAB with button
Also remove a bunch of unnecessary inset paddings since Scaffold handles it
2022-09-18 18:38:22 -04:00
20bbda78e6 Fix library search not being reflected (fixes #8031) 2022-09-18 18:09:26 -04:00
0225711f6f Clean up base classes
Should be able to throw away some of the search controller stuff after Global Search is migrated
2022-09-18 17:22:54 -04:00
7ec822503a Catch error properly when app update check fails (fixes #8019) 2022-09-18 16:24:26 -04:00
83871fc013 Minor cleanup/fixes
- Add FAB collapsing in clear database screen (fixes #7935)
- Don't allow multiline category names to be entered
- Consolidate Downloaded Only / Incognito Mode banner components
- Fix see-through migrate screen sticky header
2022-09-18 16:08:58 -04:00
b668364afb Split security preferences from PrefrencesHelper (#8030) 2022-09-18 13:07:48 -04:00
877ae041a4 Avoid invalid locales in language picker (fixes #7950)
We should probably prune the translations though.
2022-09-18 11:07:10 -04:00
1395343f11 Read metadata from ComicInfo.xml files in Local source (#8025)
Co-authored-by: Shamicen <84282253+Shamicen@users.noreply.github.com>
Co-authored-by: Andreas <andreas.everos@gmail.com>
Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
2022-09-18 10:55:30 -04:00
30b3b2d3ff Split source preferences from PreferencesHelper (#8029) 2022-09-18 10:36:41 -04:00
f3cecd3cde Update dependency com.google.gms:google-services to v4.3.14 (#8027)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-17 22:36:39 -04:00
0086743a53 Use 1.x preference abstraction (#8020)
* Use 1.x preference abstraction

- Uses SharedPreferences compared to 1.x impl which uses DataStore but it breaks all settings screens currently
- Move PreferencesHelper to new PreferenceStore
  - PreferencesHelper should be split into smaller preference stores and be in core or domain
- Remove flow preferences as new PreferenceStore handles changes for us

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

* Fix PreferenceMutableState not updating

* Fix changes not emitting on first subscription

Co-authored-by: inorichi <3521738+inorichi@users.noreply.github.com>
2022-09-17 11:48:24 -04:00
bc8c45832e Translations update from Hosted Weblate (#7978)
* Weblate translations

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: Eric <hamburger1024@mailbox.org>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Maday <royalcoolness7898@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Tarık Yıldız <tariky113@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Vigge Beckmann <viggebeckmann@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
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/az/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/da/
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/id/
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/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/th/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
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

* Deleted translation using Weblate (Tagalog)

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: Eric <hamburger1024@mailbox.org>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Maday <royalcoolness7898@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Tarık Yıldız <tariky113@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Vigge Beckmann <viggebeckmann@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: arkon <eugcheung94@gmail.com>
2022-09-17 10:26:54 -04:00
4a3070265a Upgrade AGP 7.3.0 (#8016) 2022-09-17 10:26:02 -04:00
f54adb49a1 ExtensionsPresenter: Use StateFlow for extensions list (#8017) 2022-09-16 08:35:15 -04:00
ec30026333 Fix always-on app lock on cold start (#8018) 2022-09-16 08:34:46 -04:00
4ea512f6c2 Fix manga being reinitialized in browse
Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
2022-09-15 22:55:20 -04:00
829aadd0bd Always attempt automatic backup creation
- Defaults to every 12 hours
- Minimum number of backups is now 2, just to offer some level of redundancy in case something happens
- If it's missing storage permissions, it'll fail but that's the user's loss if they somehow haven't granted that permission yet
2022-09-15 22:53:46 -04:00
9d28def387 Remove some dead code 2022-09-15 22:51:01 -04:00
86fe850794 Extract source api from app module (#8014)
* Extract source api from app module

* Extract source online api from app module
2022-09-15 18:12:27 -04:00
30ac94181b Fix stacking of Settings menu in the reader on multiple taps (#8002)
* fix : conditional check added to avoid stacking of dialog

In onClickListener, bottom sheet is being opened depending on status of dialog sheet, if it's showing or not.

* chore : refactored conditional logic

* Update ReaderActivity.kt
2022-09-15 17:41:54 -04:00
48d3d454c0 Fix missing condition on getLibrary sql query (#8006) 2022-09-14 11:36:23 -04:00
6865c21c75 Fix derivedStateOf errors (#8008) 2022-09-14 11:36:13 -04:00
82cd316493 Revert compose-theme-adapter
Since it brings in material3 beta02. See https://issuetracker.google.com/issues/245626686
2022-09-13 09:22:46 -04:00
7270c48f26 LibraryItem: Fix equality check (#7999)
Proper equality check is needed by compose for state changes.
2022-09-12 12:29:28 -04:00
9e5d79aec3 Fix lint error (#8000) 2022-09-12 11:59:15 -04:00
c51e83c048 Flatten available extensions with its source (#7956)
* Flatten available extensions with it's source

We should also do something similar for installed extensions

Supersedes #7200

* Dedupe sources
2022-09-11 18:05:46 -04:00
52fa28c16a Prevent okhttp from caching covers and chapter images (#7967) 2022-09-11 18:00:07 -04:00
935c8e7d82 Change logic in BitmapFactory.Options.splitData (#7989) 2022-09-11 17:59:57 -04:00
19be0d68b6 Add some padding to tab indicators 2022-09-11 17:59:08 -04:00
f9bbbce466 Check the actual folder when deleting source folder in case of stale cache 2022-09-11 17:58:59 -04:00
eb5ef72747 Revert "Update Compose Material3"
This partially reverts commit 3dea10bcb9.

See https://issuetracker.google.com/issues/245626686
2022-09-11 17:49:10 -04:00
0215b66098 Count the downloads under each header instead of count the number of headers (#7990) 2022-09-11 13:11:50 -04:00
3dea10bcb9 Update Compose Material3 2022-09-11 11:52:29 -04:00
cd3cb72b65 Bump dependencies + linting 2022-09-10 23:57:03 -04:00
5b474e96b7 Update coil_version to v2.2.1 (#7981)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-10 21:33:47 -04:00
9ce1d71a45 Revert moving arrays to i18n (#7977) 2022-09-10 12:21:51 -04:00
b8cdf7fbff [skip ci] avoid PR builds for translations 2022-09-10 10:30:53 -04:00
28594bba2c Remove unused resources 2022-09-10 10:19:38 -04:00
d5c207d8a3 Extract translation from app module (#7975)
* Extract translation from app module

- Prep for further extraction to modules in the nearish future

* Subproject .gitignore
2022-09-10 09:58:45 -04:00
56826fb477 Cleanup logic of onStripSplit in WebtoonPageHolder 2 (#7976) 2022-09-10 09:34:27 -04:00
171d7f2b8c Weblate translations (#7953)
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ismail Mhmary <ismailmhmary@gmail.com>
Co-authored-by: Jujutsu <jujutsu2319728282@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: MES-mitutti <nakanakamituhasi3284@gmail.com>
Co-authored-by: Madddog1997 <madddog1997@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: ZiomaleQ <r.partyka30@gmail.com>
Co-authored-by: f0roots <f0rootss@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ar/
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/hr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/pl/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ro/
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/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Ismail Mhmary <ismailmhmary@gmail.com>
Co-authored-by: Jujutsu <jujutsu2319728282@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: MES-mitutti <nakanakamituhasi3284@gmail.com>
Co-authored-by: Madddog1997 <madddog1997@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: ZiomaleQ <r.partyka30@gmail.com>
Co-authored-by: f0roots <f0rootss@gmail.com>
2022-09-10 09:30:36 -04:00
5ec5829e77 Revert removing Fullscreen theme (#7974)
- Is still used by TachiyomiFullscreenDialog
2022-09-10 09:17:06 -04:00
448978ac8a Remove unused resources 2022-09-09 22:37:29 -04:00
fb9791f597 DownloadController: Partial Compose conversion (#7969)
Item list is not changed as currently there is no fitting Compose component to
replace the drag-drop behavior.
2022-09-09 22:29:40 -04:00
07d1b9f3ba Fix download ahead missing out 1 chapter (#7927)
* Fix download ahead missing out 1 chapter

* Move toLong() function

* Add check whether the next chapter is queued
2022-09-09 22:29:24 -04:00
6b91f65457 Cleanup logic of onStripSplit in WebtoonPageHolder (#7955)
* Cleanup logic of `onStripSplit` in WebtoonPageHolder

* Update app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonPageHolder.kt

Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-09-07 17:11:44 -04:00
0c7b1bda7f LocalSource: Create cover file if it doesn't exist (#7954) 2022-09-07 17:02:06 -04:00
032b377de7 WebViewScreen: Use Scaffold (#7958) 2022-09-07 16:59:44 -04:00
26d8e47bb9 Bump default user agent string 2022-09-04 18:01:02 -04:00
970ff7841e Translations update from Hosted Weblate (#7949)
* Weblate translations

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translation: Tachiyomi/Tachiyomi 0.x

* Deleted translation using Weblate (Tagalog)

Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: arkon <eugcheung94@gmail.com>
2022-09-04 17:40:19 -04:00
3f62837260 Translations update from Hosted Weblate (#7919)
* Weblate translations

Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: António Ramos <ubercraft06@gmail.com>
Co-authored-by: Christian Elbrianno <crse@protonmail.ch>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eric <hamburger1024@firemail.cc>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Peter Henriksen <f8xct2@gmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ricardo Briones <rbrionesu@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: deadlevel13 <dodoanmanhdung@gmail.com>
Co-authored-by: nzoba <enzobatista2@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.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/da/
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/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/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/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

* Deleted translation using Weblate (Tagalog)

Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: António Ramos <ubercraft06@gmail.com>
Co-authored-by: Christian Elbrianno <crse@protonmail.ch>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eric <hamburger1024@firemail.cc>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Peter Henriksen <f8xct2@gmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ricardo Briones <rbrionesu@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: deadlevel13 <dodoanmanhdung@gmail.com>
Co-authored-by: nzoba <enzobatista2@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: arkon <eugcheung94@gmail.com>
2022-09-04 11:18:54 -04:00
d55c854ebf Webtoon Split: Improve performance (#7947) 2022-09-04 11:16:20 -04:00
6b2b21edfa Fix Filter not being applied in Browse Source (#7945) 2022-09-04 11:15:13 -04:00
99270e370e Fix missing downloaded only/incognito banners in Browse Source (#7936) 2022-09-04 11:14:37 -04:00
c7d09d098a Update dependency com.google.firebase:firebase-analytics-ktx to v21.1.1 (#7934)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-04 11:14:22 -04:00
21804bfc45 Reimplement extensions search
Not sure if I should abstract this out to per-tab though. Maybe when we need it...
2022-09-03 10:47:48 -04:00
38950f7bc8 Address some OkHttp nullability changes 2022-09-03 10:38:56 -04:00
bbf5c86b46 Fix missing downloaded only/incognito banners in Browse 2022-09-03 10:33:31 -04:00
3fa68ed217 Rebase Scaffold fork (#7929)
This changes content insets handling
2022-09-03 10:33:22 -04:00
cc6aef693e Merge Latest and Browse into one screen (#7921)
* Merge Latest and Browse into one

* Add back Latest button

* Change context to IO instead of launching a job

* Use loading screen when loading initial page
2022-09-03 10:16:30 -04:00
5a320d87e8 Remove download source folder when empty (#7928) 2022-09-03 09:18:19 -04:00
da95ecb686 Lessen the use of GlobalScope launchIO (#7916)
* Lessen the use of GlobalScope `launchIO`

* Wrap some calls with `NonCancellable` context
2022-09-02 11:50:44 -04:00
774a87a42a Adjust app lock mechanism (#7924)
Now uses enum to also handle timed lock
2022-09-02 11:48:48 -04:00
ff4a217730 Cleanup chapter name when syncing chapter with source (#7910) 2022-09-02 10:07:50 -04:00
a43754e1a6 Fix tmp cbzs are counted towards manga download count (#7909)
* Fix tmp cbzs are counted towards manga download count

* Review Changes

* Review Changes 2
2022-09-02 10:03:37 -04:00
8ef200861c Fix webtoon viewer pages not loading
Partial revert of fddca15182
2022-09-02 10:02:04 -04:00
ddd180e56a Weblate translations (#7914)
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alex Crecan <alex_crecan@yahoo.com>
Co-authored-by: DIAN SABSAB <philiptenibas@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: HuynhDuc <minhduck3359@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: ZiomaleQ <r.partyka30@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/
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/ja/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ko/
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/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/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: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alex Crecan <alex_crecan@yahoo.com>
Co-authored-by: DIAN SABSAB <philiptenibas@gmail.com>
Co-authored-by: HuynhDuc <minhduck3359@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: ZiomaleQ <r.partyka30@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-09-01 10:05:30 -04:00
30b86e530b Bump OkHttp and re-enable fast fallback
It wasn't very stable last time, but we'll see how it goes in preview builds.
2022-08-31 16:51:33 -04:00
2f26982e34 Resolve review comments for BrowseSourceScreens (#7912) 2022-08-31 16:47:07 -04:00
504844a892 Make top app bar lift behavior more consistent 2022-08-31 16:31:08 -04:00
4c1da1bd1d Maybe fix extensions list crash
Also fix weird animation of last updated text in Updates
2022-08-31 15:56:08 -04:00
dc62d0ea8b Clean up interceptors a bit 2022-08-31 15:39:59 -04:00
fddca15182 Don't update page progress and allow preload when on StencilPage (#7899)
Also cleanup a little in WebtoonPageHolder
2022-08-31 15:09:21 -04:00
81f49f34ef Manually handle HTTP 103 through WebView (#7907)
* Manually handle HTTP 103 through WebView

* Review Changes
2022-08-31 14:48:25 -04:00
c39a1b7867 Minor cleanup 2022-08-31 14:43:58 -04:00
d4b764fa31 Use Compose on BrowseSourceScreens (#7901) 2022-08-31 14:41:35 -04:00
bb54a81ef0 Update dependency com.google.android.material:material to v1.7.0-rc01 (#7911)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-31 14:07:48 -04:00
d85af2fec6 Add "Njalla" dns provider (#7908)
* Add "Njalla" dns provider

Details ~~Tho there is none~~: https://dns.njal.la/

* Lint
2022-08-31 11:23:02 -04:00
90c08303fa Implement nicer UI for migrate list sorting 2022-08-30 16:31:28 -04:00
92e83f702c Initial conversion of browse tabs to full Compose
TODO:
- Global search should launch a controller with the search textfield focused. This is pending a Compose rewrite of that screen.
- Better migrate sort UI
- Extensions search
2022-08-30 16:05:35 -04:00
084e6a964e Enable sub-languages on app first run (#7127)
* Enable sub-languages on app first run.

* Fix wrong language code string parsing.

* Fix some build issues due to rebase.

* Use PreferenceHelper and remove an extra preference.

* Remove a constant.
2022-08-30 15:37:15 -04:00
532f662b05 Rewrite RateLimitInterceptor (#7889) 2022-08-30 13:17:37 -04:00
53f5ea7fe9 Rename source download folder on source rename (#7898)
* Rename source download folder on source rename

* Review Changes

* Review Changes 2
2022-08-30 13:15:34 -04:00
fc6946ed61 Reword "All" source/ext lang to "Multi" (#7895)
* Add "multi" as a recognized source/ext lang

* Review Changes
2022-08-30 12:43:50 -04:00
f5c7aa1142 Convert settings main and search views to full Compose 2022-08-29 16:39:35 -04:00
761635b572 Convert extension details to full Compose 2022-08-29 16:10:55 -04:00
488d8ab8cf Update chapter progress upon registering tracker (closes #7209)
Co-authored-by: Saud-97 <Saud-97@users.noreply.github.com>
2022-08-29 15:36:56 -04:00
8efb20439a Remove some usages of global scope 2022-08-29 15:15:18 -04:00
43c195e14a Add last update time to Updates Tab (closes #5466)
Co-authored-by: datreesezcup <datreesezcup@users.noreply.github.com>
2022-08-29 14:57:25 -04:00
8a3a7418d0 Show number of unique library items (closes #6522)
- Filters do affect this
- Won't be shown if tabs aren't visible and there's more than 1 category (so it'd always show the per-category count), but a separate stats page should show that info instead
2022-08-29 14:34:11 -04:00
32190b6cac Fix choosing regionalized locales 2022-08-29 13:54:02 -04:00
880407442c Tweak flag classes for Library (#7829)
* Tweak flag classes for Library

- Add interface for Flag and Mask
- Merge Sort Type and Direction into one class
- Use custom serializers for preferences
  - Mainly to not break the old

* Review changes
2022-08-29 13:10:30 -04:00
3b34a878a7 Update dependency org.jsoup:jsoup to v1.15.3 2022-08-29 13:08:42 -04:00
b79340989f Fix IndexOutOfBoundsException when using Split tall images (#7892)
Also little cleanup
2022-08-29 13:02:34 -04:00
0e526c36be Long strip split fixes 2.0 (#7882)
options was having issues in returning width for some reason

Fixes #7880
Fixes #7881
2022-08-28 09:46:42 -04:00
a83d29f058 Add APK output for x86_64 CPU architecture (#7885)
* Add APK output for x86_64 CPU architecture

* Review changes

* Fix formatting

Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>

* Use underscore instead of hyphen

Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>
2022-08-28 09:45:33 -04:00
be7108a2ee Fix overflow in ChangeCategoryDialog (#7883) 2022-08-28 09:43:01 -04:00
8e9b1124cd Update dependency com.google.android.material:compose-theme-adapter-3 to v1.0.17 (#7877)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-28 00:02:33 -04:00
1948d55d5d Long strip split fixes (#7875)
* Fix image width in `splitStrip`

* Fix reader switch isn't in md3
2022-08-27 18:10:16 -04:00
9c49a5ed22 Fix issue with removing categories from manga for ChangeCategoryDialog (#7874) 2022-08-27 18:02:19 -04:00
0bb20a92af Fix issue with input for DownloadCustomChaptersDialog (#7873) 2022-08-27 17:50:00 -04:00
cd82c88b9a Fix checkbox selection when tapping text in Compose dialogs 2022-08-27 12:48:04 -04:00
8d40e20b7d Prevent unofficial exts from getting marked as obsolete or updateable (#7871)
* Prevent unofficial exts from getting marked as obsolete

* Prevent unofficial ext `hasUpdate` getting marked as true
2022-08-27 12:12:59 -04:00
31b62b2779 Minor cleanup 2022-08-27 11:50:51 -04:00
88b56121a3 Long Strip Split for Webtoon (#5759)
* Long Strip Split for Webtoon

* Review Changes

* Review Changes 2 + Rebase
2022-08-27 11:41:18 -04:00
d6c0a5ef8b Weblate translations (#7744)
Co-authored-by: Abhijeet Sonar <abhijeet.nkt@gmail.com>
Co-authored-by: Abubakar Abdullahi Gwabare <gwabstech@gmail.com>
Co-authored-by: Ahmed Saleh <sniperasa8@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Cường Bá <cuongba956@gmail.com>
Co-authored-by: DIAN SABSAB <philiptenibas@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Deleted User <noreply+48029@weblate.org>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: EpicLemon99 <epiclemon99@protonmail.com>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: FrostedFox <i6b4kl5lm@duck.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Himori <felchan2005@gmail.com>
Co-authored-by: Hin Weisner <translatu.godwit@aleeas.com>
Co-authored-by: Hiroshi <borlonjhayron1119@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jen Kung-chih <Kaitul@outlook.com>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: KokaKiwi <kokakiwi+git@kokakiwi.net>
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: Megat Al Zhahir Daniel <megatalzhahir@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: MrChuw <jgabrielmonteiro@hotmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Ronny Wegener <wegener.ronny@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: Sapphire <sapphireinc@protonmail.ch>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Zero O <godarms2010@live.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: f0roots <f0rootss@gmail.com>
Co-authored-by: ice <omarmaayouf1234@gmail.com>
Co-authored-by: moon <jamiejakie@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/ca/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ceb/
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/ha/
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/mr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
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/ta/
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: Abhijeet Sonar <abhijeet.nkt@gmail.com>
Co-authored-by: Abubakar Abdullahi Gwabare <gwabstech@gmail.com>
Co-authored-by: Ahmed Saleh <sniperasa8@gmail.com>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Cường Bá <cuongba956@gmail.com>
Co-authored-by: DIAN SABSAB <philiptenibas@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Deleted User <noreply+48029@weblate.org>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: EpicLemon99 <epiclemon99@protonmail.com>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: FrostedFox <i6b4kl5lm@duck.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Himori <felchan2005@gmail.com>
Co-authored-by: Hin Weisner <translatu.godwit@aleeas.com>
Co-authored-by: Hiroshi <borlonjhayron1119@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Jen Kung-chih <Kaitul@outlook.com>
Co-authored-by: Jetspectre <jetspectre1@gmail.com>
Co-authored-by: KokaKiwi <kokakiwi+git@kokakiwi.net>
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: Megat Al Zhahir Daniel <megatalzhahir@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: MrChuw <jgabrielmonteiro@hotmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Ronny Wegener <wegener.ronny@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: Sapphire <sapphireinc@protonmail.ch>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Zero O <godarms2010@live.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: f0roots <f0rootss@gmail.com>
Co-authored-by: ice <omarmaayouf1234@gmail.com>
Co-authored-by: moon <jamiejakie@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-08-27 09:44:53 -04:00
5732fc61e8 Bump dependencies 2022-08-26 09:21:30 -04:00
655fa25b51 Bump Compose M3 to 1.0.0-beta01 (#7867) 2022-08-26 09:19:47 -04:00
aab5f083db Trim newlines from user agent (#7858)
* trim newlines from user agent

* fix indents

* fix indents for real

* actually fix indents
2022-08-26 09:18:09 -04:00
03b9950fa1 Minor tweaks to download custom dialog
- Allow large decrements (just goes to 0)
- Use Material3 text field for proper theming
- Move dialog composable to presentation package
2022-08-26 09:16:26 -04:00
2453d1a886 Move a few Dialogs to Compose (#7861)
* Move a few Dialogs to Compose

- Separating dialogs that are not needed in the PR for the move to Compose on the Browse Source screen
- ChangeMangaCategoriesDialog and AddDuplicateMangaDialog will be removed in the Browse Source screen PR

* Review changes
2022-08-26 08:57:28 -04:00
4b9a6541d1 Fix chapter download with empty scanlator (#7844) 2022-08-24 17:19:01 -04:00
a70b848646 Fix stucked downloads when service not started (#7846)
* Fix stucked downloads when service not started

* Fix chapter download restart even if should be deleted
2022-08-24 17:18:22 -04:00
ce44c0615b Add DelicateCoroutinesApi to GlobalScope extension functions (#7848) 2022-08-23 10:16:52 -04:00
f207e87722 Download ahead (#7226) 2022-08-22 17:37:54 -04:00
2e81e1b7d8 Reorder themes 2022-08-21 11:27:02 -04:00
605c3de150 Update serialization_version to v1.4.0 (#7833)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-21 11:25:22 -04:00
7aa073ddca Update coil_version to v2.2.0 (#7832)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-21 11:24:57 -04:00
4b0f549666 New Theme Tidal Wave (#7825)
* New Theme Tidal Wave

Added a new strong blue theme appearance to Tachiyomi titled Tidal Wave.

* Better Tertiary Color: Seafoam Green

Updated the tertiary color to be lighter and match the blue more. Also changed the active button color to contrast better.
2022-08-20 13:23:32 -04:00
40749dc767 DownloadProvider: Remove duplicate in valid chapter dir name list (#7826) 2022-08-20 13:19:15 -04:00
3599d53c61 Disable explicit nulls for JSON serializer (#7824)
* Disable explicit nulls for JSON serializer

* format to multiple lines
2022-08-20 11:48:50 -04:00
2156844b87 NetworkHelper: log real requests and responses (#7820) 2022-08-20 10:16:45 -04:00
763288ab13 LibrarySettingsSheet: Fix race condition when applying sort mode (#7805)
Also fix sort direction can't be changed for default category
2022-08-20 10:15:53 -04:00
58e6479438 Fix crash when opening library sheet with empty category list (#7822) 2022-08-19 16:02:37 -04:00
6d6c38ecaf Fix nav bar appearing when going from Library's action mode (#7821)
fixes #7788
2022-08-19 16:02:12 -04:00
3760b310df Don't allow setting blank user agent string 2022-08-19 08:24:03 -04:00
47b56644de Fix emoji going crazy and fix tabs being visible when library is empty (#7811)
fixes #7792
fixes #7791
2022-08-19 07:22:46 -04:00
301cae13f0 Simplify split tall images preference wording 2022-08-18 18:55:15 -04:00
1fe9b7bda7 Update default user agent string 2022-08-18 18:54:55 -04:00
324ae3fcfb Remove Duktape
Now that none of the official extensions are using it.
2022-08-18 18:01:57 -04:00
e36e9d9d5c Remove 1.x source models (#7781) 2022-08-18 14:07:13 -04:00
4228bbb88e Set initial flag on new categories (#7800)
- Use the same flag as other categories
- Per-category uses the flag the user used before starting to use per-category
2022-08-18 14:06:52 -04:00
09abfc7843 Lint changes (#7802)
- Fixes current lint issues
- Changes lint task to lintKotlin on PRs
2022-08-18 14:06:32 -04:00
1f34f5277c Fix notification and add visual cues when triggering a second update (#7783) 2022-08-18 09:01:10 -04:00
80b4b7bee6 Add Mullvad and Control D as DoH providers (#7785) 2022-08-18 08:59:40 -04:00
1f9f9662bc Fix download chapter dir when scanlator is empty or changed (#7780) 2022-08-16 17:26:08 -04:00
97656935a2 Added tickers in the reader page slider (#7760)
* Added tickers in the reader page slider

Default setting is off, under the reader page

* Revert "Added tickers in the reader page slider"

This reverts commit 51910dc65ae965b92d2cfe6a4d28df4ad27288a2.

* Added reader page slider tickers via xml
2022-08-15 15:41:13 -04:00
2d690a09b3 Reinstate in-app language picker (#7493)
Also add required config for android 13 system picker
2022-08-14 11:52:46 -04:00
29348677b8 Merge branch 'patch' 2022-08-14 11:51:29 -04:00
1f79444a53 Fix sources not loading 2022-08-14 11:49:19 -04:00
daaa23e8e0 Add ref to push workflow concurrency group
To help distinguish from tag builds
2022-08-14 11:31:05 -04:00
1d6aa9a277 Merge branch 'patch'
# Conflicts:
#	app/build.gradle.kts
#	app/src/main/java/eu/kanade/tachiyomi/data/database/DbOpenCallback.kt
#	app/src/main/java/eu/kanade/tachiyomi/data/database/models/Manga.kt
#	app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt
#	app/src/main/java/eu/kanade/tachiyomi/data/saver/ImageSaver.kt
#	app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionInstallReceiver.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/base/controller/SearchableNucleusController.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/MigrationFlags.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchPresenter.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/manga/AddDuplicateMangaDialog.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ChapterLoader.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderPageImageView.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/ReaderTransitionView.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt
#	app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSorter.kt
#	app/src/main/res/layout/pref_settings.xml
#	app/src/test/java/eu/kanade/tachiyomi/util/chapter/ChapterRecognitionTest.kt
#	gradle/androidx.versions.toml
#	gradle/libs.versions.toml
2022-08-14 11:28:28 -04:00
7497e02979 Update checkbox icons to match latest Material lib 2022-08-14 11:05:53 -04:00
f34dc3be90 Update com.google.android.material (#7750)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-14 10:55:57 -04:00
65261356eb Update dependency androidx.sqlite:sqlite-ktx to v2.3.0-alpha04 (#7752)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-14 10:52:38 -04:00
4291cc8eb1 Add task to generate locales_config.xml (#7754) 2022-08-14 10:43:28 -04:00
8811d951d0 Release v0.13.6 2022-08-14 10:32:04 -04:00
9dbc1aa7a3 UpdatesScreen: use custom LazyColumn with animation fix (#7758) 2022-08-14 10:12:31 -04:00
b0520df1dd Use application context to create toast (#7756) 2022-08-14 08:44:24 -04:00
a89651810d Don't allow swiping away app update install notification
Based on 85ef40d0ff
2022-08-13 15:15:14 -04:00
431c04e54f Detect identical mangas when long pressing to add to library (#7095)
* Detect identical mangas when long pressing to add to library

* Use extracted duplicate manga dialog to avoid duplication

* Partially revert previous commit

* Review changes

* Review changes part 2

(cherry picked from commit f1afeac0bc)
2022-08-13 15:15:01 -04:00
f461c71625 Fix Links to Changelog/Readme/Commits for multisrc (#7252)
* Fix Links to Changelog/Readme/Commits for `multisrc`

working basic fix. Needs to be refactored into `createUrl()`

* Refactor back into `createUrl`

hopefully the logic is understandable
there's three cases:
 - when multisrc, if `path` isn't mentioned, then we're trying to open
   commmit history
 - when multisrc, if `path` is mentioned, then its either a changelog or
   a readme to a multisrc extension, the files are stored in the
   `overrides` subfolder
 - when not multisrc, we're looking at a single source where the links
   are constructed in the same way regardless of it being
   changelog/readme/commit history

(cherry picked from commit e7695aef78)
2022-08-13 15:05:50 -04:00
b635789740 Actually compare chapter numbers as numbers when sorting (fixes #7247)
(cherry picked from commit da8669c826)
2022-08-13 15:05:23 -04:00
f00e03e5ea New: Migrating titles maintains custom covers (#7196)
* New: Migrating titles maintains custom covers #7189

* Added Custom Covers to MigrationFlags.kt, strings.xml

* Reworded covers --> cover

* Updated logic to show/hide Migration flags titles depending on manga.

(cherry picked from commit 5ea03fad87)
2022-08-13 15:03:21 -04:00
6db2becd30 Add auto split tall images setting
Also includes some fixes for bad merges in earlier commits

Co-authored-by: Saud-97 <Saud-97@users.noreply.github.com>
Co-authored-by: AntsyLich <AntsyLich@users.noreply.github.com>
2022-08-13 14:56:08 -04:00
5f378e28b6 UpdatesPresenter: Prevent unnecessary screen recompose (#7742) 2022-08-13 14:34:51 -04:00
4ebceac07f UpdatesScreen: Fix inset related issue (#7741) 2022-08-13 14:27:07 -04:00
aab5a56892 MangaFullCoverDialog: Use the new image picker when available (#7740) 2022-08-13 13:25:48 -04:00
e58945a209 Log extension loading errors directly (#7716)
(cherry picked from commit 7892cc1519)
2022-08-13 13:17:41 -04:00
03e4eb1061 Add missing Authorization header on MAL refresh token request (#7686)
* Add missing Authorization header on MAL refresh token request.

* Make sure to also close the response when it have failed.

(cherry picked from commit 5315467908)
2022-08-13 13:16:55 -04:00
09a3509d79 Filter out empty genres before saving manga to database (#7655)
(cherry picked from commit 4efb736e56)
2022-08-13 13:16:00 -04:00
b3a11eca0f Remove deprecated LibrarySort (#7659)
* Remove deprecated LibrarySort

* Apply suggestions from code review

(cherry picked from commit 58acf0a8aa)
2022-08-13 13:15:50 -04:00
650c2dc6e7 Fix logic for searchWithGenre (#7559)
(cherry picked from commit b563e85c3b)
2022-08-13 13:15:36 -04:00
d4adb664cc Avoid catastrophic failure when cover can't be created in local source (fixes #7577)
(cherry picked from commit d6977e5676)
2022-08-13 13:14:33 -04:00
5194bdb229 Show better error when trying to open RARv5 file
(cherry picked from commit a843054388)
2022-08-13 13:14:23 -04:00
87ec71142b Add downloaded icon in TransitionView when chapter is downloaded (#7575)
* Add downloaded icon in TransitionView

* Change icon

(cherry picked from commit e8b7743826)
2022-08-13 13:13:23 -04:00
85f2996ae9 Fix logic of app unlock (#7569)
(cherry picked from commit 8ea05e852e)
2022-08-13 13:11:12 -04:00
e296d56e09 Fix image MIME issues that cause download errors (#7562)
* Downloader: ignore non-image MIME to prevent .bin extensions

* ProgressResponseBody: allow null content type

Co-authored-by: anenasa <84259093+anenasa@users.noreply.github.com>

Co-authored-by: anenasa <84259093+anenasa@users.noreply.github.com>
(cherry picked from commit 3547d0142f)
2022-08-13 13:11:03 -04:00
dd676b6d14 fix concurrent download (#7552)
* Fix concurrent download

* lower Concurrency

* artist Update app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt

Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>

Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
(cherry picked from commit b635f02d93)
2022-08-13 13:10:53 -04:00
7c7bd72c8e Make default user agent string configurable
(cherry picked from commit 4ee1d72b6f)
2022-08-13 13:09:55 -04:00
c7e44aa22f Replace deprecated ACTION_MEDIA_SCANNER_SCAN_FILE intent
(cherry picked from commit 0b4f3f5532)
2022-08-13 13:09:19 -04:00
ac4f98e152 Configure SQLite
- Turn on `foreign_keys` to cascade on delete properly
- Turn on `journal_mode` and set `synchronous` to NORMAL which may help performance for larger libraries

Based on d977b89af1

Co-authored-by: ghostbear <andreas.everos@gmail.com>
2022-08-13 13:08:16 -04:00
e0d23cd688 Use Material3 switches in XML layouts
(cherry picked from commit da7a64b40d)
2022-08-13 13:05:36 -04:00
3966a917ee Bump dependencies + compile SDK to 33 + linting 2022-08-13 12:52:18 -04:00
be33a57d43 Update .editorconfig 2022-08-13 12:37:13 -04:00
4a71022a60 Update chapter recognition and related tests
Includes 3e07100dc2

Co-authored-by: Saud-97 <Saud-97@users.noreply.github.com>
2022-08-13 12:37:02 -04:00
83129385e2 Weblate translations (#7695)
Co-authored-by: Hiroshi <borlonjhayron1119@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: HouseDrVenus <aurimasjurevic@gmail.com>
Co-authored-by: Igor <zerrxs@gmail.com>
Co-authored-by: Kreby <dlusinskij@gmail.com>
Co-authored-by: moon <jamiejakie@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/be/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ceb/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ko/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/lt/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/uk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Hiroshi <borlonjhayron1119@gmail.com>
Co-authored-by: HouseDrVenus <aurimasjurevic@gmail.com>
Co-authored-by: Igor <zerrxs@gmail.com>
Co-authored-by: Kreby <dlusinskij@gmail.com>
Co-authored-by: moon <jamiejakie@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
2022-08-13 12:09:16 -04:00
34ac39e7e5 Update AGP/Gradle 2022-08-13 10:13:37 -04:00
1474c8ffb3 Some tweaks on Updates screen (#7729)
Based on #7708, #7709 and #7717

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

Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
2022-08-12 12:21:05 -04:00
441e7bf8b1 MainActivity: Fix crash on back pressed (#7731) 2022-08-12 12:20:39 -04:00
71fc5d6d35 Add back reset action to the Library and History Search toolbars (#7722)
* Add back reset action to the Library and History Search toolbars

* Localize the descriptions
2022-08-11 09:23:56 -04:00
ff996d282a Change usage of name to visualName when Default category can be shown (#7725) 2022-08-11 09:07:20 -04:00
11f640cfee Change return value of SyncChaptersWithSource.await() (#7715)
* Change return value of `SyncChaptersWithSource.await()`

`updatedToAdd.subtract(reAdded).toList()` never worked as at this point `updatedToAdd` contained ids from db where `reAdded` had default one. Was the same case before the rewrite.

Removed `toDelete` from return value as it was not being used anywhere

* Add doc string

* Use HashSet

Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>

Co-authored-by: stevenyomi <95685115+stevenyomi@users.noreply.github.com>
2022-08-11 09:06:46 -04:00
1cbe225a94 Revert Glance to 1.0.0-alpha03 (#7726)
New release has issue with its ProGuard rules
https://issuetracker.google.com/issues/239549285
2022-08-11 07:58:07 -04:00
d6f1534ee8 Address misc. build warnings 2022-08-10 23:26:34 -04:00
24e64f52e2 Bump dependencies 2022-08-10 22:54:19 -04:00
b0da0753d9 Use concurrency to cancel duplicate workflow runs
Docs: https://docs.github.com/en/actions/using-jobs/using-concurrency
2022-08-10 22:51:01 -04:00
e511f24979 Fix crash when setting cover errors (closes #7714) 2022-08-10 16:11:12 -04:00
22e83f408b Tweak Library screen (#7718)
* Allow to refresh when there is white space

fixes #7701

* Don't use key on library screen as it retains scroll position on first item

fixes #7631
2022-08-10 15:56:52 -04:00
ec96a81735 Fake library loading (#7717) 2022-08-10 15:54:26 -04:00
7892cc1519 Log extension loading errors directly (#7716) 2022-08-10 15:53:47 -04:00
f7b11f2ce9 MangaPresenter: Fix incorrect range selection (#7709) 2022-08-09 09:11:12 -04:00
b4e15263db Fix issues related to Manga screen slow load (#7708)
* Fix back handling when manga is still loading

* MangaPresenter: Show what we have earlier to reduce percepted slowness
2022-08-09 09:10:48 -04:00
96c3116af6 Update .editorconfig (#7711)
- Set editor to use single name imports
2022-08-09 09:10:33 -04:00
7845f9430e Set readStartTime when switching chapters in a single reader session (#7702) 2022-08-08 09:22:37 -04:00
16abfeeff0 Glance widget fixes (#7706)
* Fix glance failing when there's too much children

* Adjust cover error placeholder
2022-08-08 09:20:45 -04:00
3bc6b1e202 Fix default category showing up in edit manga categories list
Also remove some usages of runBlocking
2022-08-07 11:00:51 -04:00
3c2e237d63 Fix appbar action content descriptions 2022-08-07 10:16:08 -04:00
7701672d7a Update dependency gradle to v7.5.1 (#7696)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-06 20:41:20 -04:00
2993e3f0f2 Update aboutlib_version to v10.4.0 (#7697)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-06 20:41:14 -04:00
688cc64dff Minor fixes
- Fix categories modal showing when adding from source with no categories
- Use old categories icon in library bottom action menu
2022-08-06 16:23:13 -04:00
9f0052eceb More backup/restore code cleanup 2022-08-06 15:40:50 -04:00
19eb4aaac9 Weblate translations (#7658)
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: 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: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hello and Bye <gfox5518@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: K. Sz. Bence <tudi20@protonmail.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: Oğuz Ersen <oguz@ersen.moe>
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: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: yarin yaari <yariny101y@gmail.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/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/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: 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: 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: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hello and Bye <gfox5518@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: K. Sz. Bence <tudi20@protonmail.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: Oğuz Ersen <oguz@ersen.moe>
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: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: yarin yaari <yariny101y@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-08-06 15:03:46 -04:00
a2bb81b7db Start cleaning up backup/restore code
The abstraction was useful for handling 2 systems, but it's no longer needed. Cleaning it up will make migrating to domain models easier down the line.
2022-08-05 23:11:06 -04:00
5e68fe4fe9 Make screen loading indicators more consistent 2022-08-05 22:33:52 -04:00
914831d51f Move default category into database (#7676) 2022-08-05 09:32:10 -04:00
5315467908 Add missing Authorization header on MAL refresh token request (#7686)
* Add missing Authorization header on MAL refresh token request.

* Make sure to also close the response when it have failed.
2022-08-04 22:17:43 -04:00
807987f0d3 Bump AGP and Compose compiler dependencies 2022-08-04 17:43:41 -04:00
b3426f37e7 ExtensionPresenter: Fix crash on first launch (#7685)
* Revert "Use SharedFlow for available extensions to always emit the value (#7609)"

This reverts commit 73901f50c0.

* ExtensionPresenter: Explicitly set refreshing status

* Scope coroutines job to presenter

* cleanup

* fix toast
2022-08-04 15:44:37 -04:00
afceac15c8 Add scroll overlay to LibraryToolbar (#7669)
Works when category tab is not shown
2022-08-03 17:41:15 -04:00
3d4e56948d Save read duration to backup (#7672)
* Save read duration to backup

* Add default value

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

Co-authored-by: Andreas <andreas.everos@gmail.com>
2022-08-03 17:40:13 -04:00
737cf9898d Reimplement appbar color overlay on scroll (#7663)
only on updates and history screen for now, but the required changes on app bar
is there.

also fix missing incognito-downloaded mode indicator on history screen
2022-07-31 22:24:19 -04:00
322f3a07e8 Remove some unneeded TODOs 2022-07-31 17:52:17 -04:00
6c7b3d7811 Fix null pointer exception on Extension Detail screen (#7666) 2022-07-31 17:17:36 -04:00
bfd22f8f2d Minor gradle cleanup 2022-07-31 11:55:53 -04:00
2ca62c4eda Remove unused viewstatepageradapter dependency 2022-07-31 11:55:07 -04:00
a2d53c439e Update conductor_version to v3.1.7 (#7653)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-31 11:43:46 -04:00
29e1976b90 Glance widget for Updates (#7581)
* glance

* glance2
2022-07-31 11:31:40 -04:00
4efb736e56 Filter out empty genres before saving manga to database (#7655) 2022-07-31 11:18:12 -04:00
58acf0a8aa Remove deprecated LibrarySort (#7659)
* Remove deprecated LibrarySort

* Apply suggestions from code review
2022-07-31 11:17:43 -04:00
9f5f101858 Dismiss clear database confirm dialog on success (#7657) 2022-07-31 10:59:55 -04:00
2a875fe9b8 SyncChaptersWithSource: Fix early exit condition for readded chapters (#7661) 2022-07-31 10:58:55 -04:00
bb5a5ea25f Update dependency ch.acra:acra-http to v5.9.6 (#7654)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-31 10:20:43 -04:00
039fe4a618 Fix Clear Database item trying to display language when empty (#7651) 2022-07-30 13:55:07 -04:00
0c9c4c0347 Mimic M3 rounded tab indicators 2022-07-30 12:27:32 -04:00
819577a15d Weblate translations (#7589)
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Andreas E <andreas.everos@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hiroshi <borlonjhayron1119@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: Jendrej <ejjendrej@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: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Shahab Safari <shahab.safari.72@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Sándor Karácsony <kar.sanyika2002@gmail.com>
Co-authored-by: THE_LEGEND <the.legend9285+weblate@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Tomas <tsutavicius@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: phk-r <phkr@bh2.eu>
Co-authored-by: Äljan Sayat <form7040@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: الكبرياء <adamadam5006a@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ceb/
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/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/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/kk/
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/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/th/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
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: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Andreas E <andreas.everos@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hiroshi <borlonjhayron1119@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.com>
Co-authored-by: Jendrej <ejjendrej@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: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Ric <rikku.debec@gmail.com>
Co-authored-by: Shahab Safari <shahab.safari.72@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Sándor Karácsony <kar.sanyika2002@gmail.com>
Co-authored-by: THE_LEGEND <the.legend9285+weblate@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Tomas <tsutavicius@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: phk-r <phkr@bh2.eu>
Co-authored-by: Äljan Sayat <form7040@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: الكبرياء <adamadam5006a@gmail.com>
2022-07-30 12:03:40 -04:00
b563e85c3b Fix logic for searchWithGenre (#7559) 2022-07-30 11:53:25 -04:00
99ac30e59f Use Compose on Clear Database screen (#7639) 2022-07-30 11:51:47 -04:00
4774deb1ef Use Stable interface for Updates screen + Cleanup (#7627)
* Use Stable interface for Updates screen + Cleanup

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

* Disable swipe refresh in selection mode

* Review Changes

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

* Review Changes 2

Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
2022-07-30 11:50:00 -04:00
d49ec41f3a Library category page performance fixes (#7650)
* Don't compose category page unnecessarily

* Remove unnecessary library pager recompose

Defer and remember the "currentPage" state read since it's only needed when the
pager is composed for the first time.

* Badge opts

* Sync text style with previous impl

Also avoid reallocating by using copy
2022-07-30 11:47:27 -04:00
f90e1b935c Bump dependencies 2022-07-29 23:13:40 -04:00
db93d1da76 Fix library bugs (#7648)
- Fix mixup in Action Menu
- Fix back action not clearing search
2022-07-29 22:42:18 -04:00
7d74b174e0 Merge GetExtensions and GetExtensionUpdates (#7646) 2022-07-29 15:09:49 -04:00
e513487caa Fix number of items not updating when Show category tabs is off (#7644) 2022-07-29 10:17:31 -04:00
483b204fb5 MangaPresenter: Add distinctUntilChanged to db flow (#7629)
* MangaScreen: Disable swipe refresh on action mode

* MangaPresenter: Add distinctUntilChanged to db flow

Now will only emit update when the related entry is changed
2022-07-29 07:47:09 -04:00
56028aff55 Fix category exclude not working in DownloadManager (#7641) 2022-07-29 07:46:09 -04:00
7336714306 Bump dependencies and remove some unneeded opt-in compiler flags 2022-07-27 09:26:40 -04:00
8bde35298f Add fast scroller to Library screen (#7600)
Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>

Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
2022-07-27 09:13:43 -04:00
3fe5e53b25 MangaScreen large UI tweaks (#7625)
* MangaScreen: Fix large UI column sizing behavior

* MangaInfoHeader: Adjust large UI cover sizing behavior

* BottomActionMenu: Change bg shape
2022-07-27 09:12:01 -04:00
dcafdac036 Retain backstack views by default (#7621) 2022-07-27 09:00:18 -04:00
f8d8cf9f6a Wait for library to load before creating Pager (#7623) 2022-07-27 09:00:09 -04:00
5bb1133f0f Use non nullable parameters in the MangaCover invoke function (#7624)
Issue cause the non nullables to become nullable has been fixed since 1.2.0-rc01
2022-07-27 08:59:41 -04:00
2b96709799 Make Selection toolbar take precedence over search toolbar (#7611) 2022-07-26 09:05:08 -04:00
1c8da5fa97 BrowseSourceController: Fix broken page after opening manga (#7608)
Probably related to 788583e66f
2022-07-25 08:32:11 -04:00
73901f50c0 Use SharedFlow for available extensions to always emit the value (#7609)
- Fixes Extension screen being stuck refreshing due to StateFlow not emitting due to the value being the same
2022-07-25 08:31:41 -04:00
76057b84b2 Fix wrong query being used when opening Global Search (#7604) 2022-07-24 15:06:18 -04:00
164de67a56 Fix infinite loading when user library is empty (#7602)
- If no manga in library add default category this to remove loading state
2022-07-24 12:43:33 -04:00
aeffb5eeb8 ChapterDownloadIndicator: Optimize further and reimplement error state (#7599)
In the context of a weaker device--remembering objects inside a list item
is expensive. So only do it when we really need to.

This also flattens the download button by drawing a single icon instead of using
separate icon and progress indicator.
2022-07-24 10:27:00 -04:00
6f94777530 Fix toolbar having bottom padding in portrait (#7601) 2022-07-24 09:56:03 -04:00
2e15be59af Fix unnecessary recompose when calling LazyListState.isScrolledToEnd (#7598) 2022-07-24 08:49:28 -04:00
bc1f6ba517 Tweaks on Library screen (#7597)
- Toolbar not having padding in landscape
- Fix library always refreshing everything even though user is refreshing category
- Tab text using primary color
- Fix Grid having to big of a top padding
- Fix Pager crashing when initial page is greater than the number of categories
2022-07-24 08:48:54 -04:00
59f8c1a288 MangaPresenter: Don't update fav state when changing categories (#7594) 2022-07-23 22:18:40 -04:00
cd9487f94c Set splash screen ready state for history and updates pages 2022-07-23 19:37:26 -04:00
978489fade Fix crash in Extension Detail and set ready to true on Library screen (#7591) 2022-07-23 19:27:40 -04:00
07c9af4901 Fix padding in history screen 2022-07-23 11:25:45 -04:00
d6977e5676 Avoid catastrophic failure when cover can't be created in local source (fixes #7577) 2022-07-23 11:14:34 -04:00
a843054388 Show better error when trying to open RARv5 file 2022-07-23 11:13:52 -04:00
098a7d1deb Bump to Kotlin 1.7.10 2022-07-23 10:03:43 -04:00
9ef0af0069 Weblate translations (#7553)
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: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <id86dev@gmail.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: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Pranav Kale <pranavkale021998@gmail.com>
Co-authored-by: Sanket Datta <sdsanketdatta1997@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheBluuDot <strangeworrior@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: f0roots <f0rootss@gmail.com>
Co-authored-by: kiyoko-otomo <kareempakree20@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/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/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/jv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
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/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/ur/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/vi/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

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: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: ID-86 <id86dev@gmail.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: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Milo Ivir <mail@milotype.de>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Pranav Kale <pranavkale021998@gmail.com>
Co-authored-by: Sanket Datta <sdsanketdatta1997@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheBluuDot <strangeworrior@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: f0roots <f0rootss@gmail.com>
Co-authored-by: kiyoko-otomo <kareempakree20@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-07-23 10:03:17 -04:00
c751851941 Use Stable interface for History screen (#7586)
- Adds Stable interface
- Move last Dialog into Compose
- Make History screen be full Compose screen
2022-07-23 10:01:51 -04:00
9f2ddaadde Cleanup Library after Compose changes (#7584) 2022-07-23 09:58:05 -04:00
fc328e141c Remove unused dependencies (#7585) 2022-07-23 08:54:08 -04:00
0e19c245e9 Remove unused menus and drawables 2022-07-22 22:58:53 -04:00
27bac4fffb Remove unused legacy ActionModeWithToolbar 2022-07-22 22:46:53 -04:00
4bf4b167a5 Remove bottom nav behavior and add bottom padding to root controller contents 2022-07-22 22:44:05 -04:00
2b8d1bcc02 Use Compose for Library screen (#7557)
- Move Pager to Compose
- Move AppBar to Compose
- Use Stable interface for state
- Use pills for no. of manga in category instead of (x)
2022-07-22 19:05:50 -04:00
e8b7743826 Add downloaded icon in TransitionView when chapter is downloaded (#7575)
* Add downloaded icon in TransitionView

* Change icon
2022-07-22 18:55:31 -04:00
8ea05e852e Fix logic of app unlock (#7569) 2022-07-21 22:23:59 -04:00
3547d0142f Fix image MIME issues that cause download errors (#7562)
* Downloader: ignore non-image MIME to prevent .bin extensions

* ProgressResponseBody: allow null content type

Co-authored-by: anenasa <84259093+anenasa@users.noreply.github.com>

Co-authored-by: anenasa <84259093+anenasa@users.noreply.github.com>
2022-07-20 09:10:41 -04:00
4d9d587366 Migrate More screen to full Compose 2022-07-18 18:51:36 -04:00
e2510c144a Misc cleanup
- Migrate sources filter screen to full compose
- Use standard "OK"/"Cancel" actions for delete category dialog
- Abstract some AppBar logic
- Remove some dead code
- Group related strings
2022-07-18 18:32:25 -04:00
00519e3b93 MangaScreen: Save selection state (#7560) 2022-07-18 16:42:46 -04:00
473dc688f0 Fix download status not updated properly after starting batch download (#7561) 2022-07-18 16:22:49 -04:00
b635f02d93 fix concurrent download (#7552)
* Fix concurrent download

* lower Concurrency

* artist Update app/src/main/java/eu/kanade/tachiyomi/data/download/Downloader.kt

Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>

Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
2022-07-18 13:22:09 -04:00
d8fb6b893f Migrate Updates screen to compose (#7534)
* Migrate Updates screen to compose

* Review Changes + Cleanup

Remove more unused stuff and show confirmation dialog when mass deleting chapters

* Review Changes 2 + Rebase
2022-07-17 22:17:40 -04:00
bdc5d557d1 Update dependency gradle to v7.5 (#7550)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-16 22:15:14 -04:00
cbfe9c30bb Migrate more screens to full Compose 2022-07-16 21:00:01 -04:00
459b369feb Avoid crashes due to SQLite support in older Android versions for debug builds 2022-07-16 20:54:27 -04:00
3192d47837 Fix tablet manga screen column ratios
Matches previous stable design. Related to #7401
2022-07-16 20:41:13 -04:00
f6f5b6aeab Fix library column setting jumping in 2022-07-16 18:26:30 -04:00
1b2c12385f Migrate licenses screen to full Compose 2022-07-16 18:12:09 -04:00
80c7a45328 Remove top app bar scroll behavior
This lets us make it more consistent with the Compose screens for now. Maybe it'll return in the future.

This also includes making the AboutController a full Compose controller with a new abstracted TopAppBar composable.
2022-07-16 17:58:43 -04:00
2096df301d Consolidate badge components 2022-07-16 17:40:40 -04:00
0b78028cf6 Tweak categories view
- Remove Compose top app bar behaviour since it's kind of jank -- we'll probably just remove the scrolling behaviour everywhere
- Tap title to rename
- Focus in textfield when opening dialogs
2022-07-16 17:28:50 -04:00
46ac9fe970 Consolidate Compose content/theme setting 2022-07-16 17:28:50 -04:00
b034f503f8 MangaPresenter: Incognito and downloaded only label related tweaks (#7535)
When manga screen takes time to load incognito and downloaded only label doesn't show up. It's fixed in the pr.
2022-07-16 16:45:05 -04:00
9ebeff04e6 Fix Library List not using correct text color (#7548) 2022-07-16 16:40:51 -04:00
fa73e2403b Minor library view cleanup
- Clean up unused code
- Add text shadow in compact mode
- Tweak some paddings to better match stable
2022-07-16 15:36:38 -04:00
35ec593658 Use Flow in ExtensionManager and SourceManager (#7547)
- Replace ExtensionManager relay and observable with Flow
- Inverse SourceManager dependency
    - SourceManager observers ExtensionManager flow
- Separate SourceData from SourceRepository as it created a circular dependency
2022-07-16 15:08:15 -04:00
905c96922b Use Compose for Library list and grid (#7520) 2022-07-16 15:06:24 -04:00
018ca71336 Use Stable interface for Browse screens (#7544) 2022-07-16 14:44:37 -04:00
383f7089c4 Weblate translations (#7490)
Co-authored-by: ANNOSSE MAXENCE <m-annosse@protonmail.ch>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Anupam Malhotra <anpm.malhotra@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Excalidoom <doctorasulatomic@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: KOEN FOO YONG PING <qoenntrell@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: Nepx <anandabaskara@outlook.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Sztalker Ket <stalkercat888@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Víctor J <vjhc980831@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: awe <weblate@mixt.anonaddy.com>
Co-authored-by: moon <jamiejakie@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
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/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/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/ko/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
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/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/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: ANNOSSE MAXENCE <m-annosse@protonmail.ch>
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Anupam Malhotra <anpm.malhotra@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Excalidoom <doctorasulatomic@gmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: KOEN FOO YONG PING <qoenntrell@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: Nepx <anandabaskara@outlook.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Sztalker Ket <stalkercat888@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: Víctor J <vjhc980831@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: awe <weblate@mixt.anonaddy.com>
Co-authored-by: moon <jamiejakie@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-07-16 14:41:25 -04:00
a21aa8125e Add Stable interface for Category state (#7539) 2022-07-15 17:35:19 -04:00
83e193f1ab Fix extension setting isn't accesiable when it has update (#7537)
Closes #7516
2022-07-15 14:44:59 -04:00
bdbe1c4d0f Use MangaImpl defaults in Manga.create() (#7538) 2022-07-15 14:44:45 -04:00
e5eadb0261 Bump dependencies 2022-07-14 23:01:50 -04:00
4ee1d72b6f Make default user agent string configurable 2022-07-14 23:01:50 -04:00
902bb35ba7 Little cleanup for stub source (#7519)
* Little cleanup for stub source

Fixes instances where name shows up blank for stub sources

* Review Changes

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

Co-authored-by: Andreas <andreas.everos@gmail.com>
2022-07-14 17:17:31 -04:00
4684797dfb Fix crash with chapterFlags in Manga.create() (#7530) 2022-07-14 17:16:45 -04:00
386b8945c8 Use Material Icons for untrusted extension's icon (#7518) 2022-07-13 09:18:50 -04:00
86a018ebad Fix bug in default category downloading logic (#7525) 2022-07-13 09:18:17 -04:00
ba93060e59 Fix scroll animation when system animation is disabled (#7509) 2022-07-11 22:21:00 -04:00
788583e66f Replace some usages of RxJava 2022-07-10 19:48:07 -04:00
cbcab5a545 Fix MangaScreen app bar title and nav icon action (#7506) 2022-07-10 14:29:58 -04:00
634ee86bbd MangaPresenter: Always fetch chapter from source if current chapter is empty (#7507) 2022-07-10 14:29:52 -04:00
64f60c36e6 ExtensionManger: Fix unofficial extension has update (#7503) 2022-07-10 10:00:48 -04:00
0b4f3f5532 Replace deprecated ACTION_MEDIA_SCANNER_SCAN_FILE intent 2022-07-09 17:51:58 -04:00
d977b89af1 Configure SQLite (#7495)
- Turn on `foreign_keys` to cascade on delete properly
- Turn on `journal_mode` and set `synchronous` to NORMAL which may help performance for larger libraries
2022-07-09 17:35:49 -04:00
487ce37d91 Set content descriptions for bottom nav badges
Doesn't seem to produce #6708, but at least it'll be used by screen readers?
2022-07-09 16:40:16 -04:00
1551891c15 MangaScreen: Improve chapter list scrolling performance (#7491)
* MangaScreen: Improve chapter list scrolling performance

Process chapter title, date and read progress string ahead of time

* Use enum for contentType and add key
2022-07-09 16:20:40 -04:00
b15073fd61 Bump to compile SDK 33
Fixes #7390, at least according to ivaniskandar
2022-07-09 12:53:40 -04:00
e56f6c1017 ChapterDownloadIndicator: Fixes and improvements (#7485)
* Increased touch target
* Fix downloaded icon smaller than other states
* Deferred state reads to minimize recompose works
* Move things around to eliminate unnecessary elements
2022-07-09 12:38:33 -04:00
34906a7425 MangaScreen: Ditch the expanded app bar (#7470)
Animating the content padding that's used for the lazy list is heavy. A simple
fix to *just* offset the list is blocked by a Compose fling issue (b/179417109).

So I decided to go with the previous layout of this screen by putting everything
in the list. MangaInfoHeader is split into separate composables to avoid jank
when the item is being inflated.
2022-07-09 12:37:49 -04:00
86bacbe586 Use Compose for Category screen (#7454)
* Use Compose for Category screen

* Use correct string for CategoryRenameDialog title

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

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2022-07-09 12:31:14 -04:00
14a08f0668 Weblate translations (#7437)
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Daniel Grzelak <newhikari@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Druvvaldis <druvvaldisr@gmail.com>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <ultralehky@gmail.com>
Co-authored-by: Lilian Cahuzac <cahuzac.lilian@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: THE_LEGEND <the.legend9285+weblate@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Therence Pagsisihan <therence.plays@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: ZiomaleQ <r.partyka30@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: moon <jamiejakie@gmail.com>
Co-authored-by: poog <poogchamp@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.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/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/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/ko/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/lv/
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/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/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Daniel Grzelak <newhikari@gmail.com>
Co-authored-by: DarKCroX <darkcrox.2020@outlook.com>
Co-authored-by: Druvvaldis <druvvaldisr@gmail.com>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: ID-86 <ultralehky@gmail.com>
Co-authored-by: Lilian Cahuzac <cahuzac.lilian@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: THE_LEGEND <the.legend9285+weblate@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Therence Pagsisihan <therence.plays@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: ZiomaleQ <r.partyka30@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: moon <jamiejakie@gmail.com>
Co-authored-by: poog <poogchamp@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-07-09 10:39:00 -04:00
9385b86ecb VerticalFastScroller: Fix scroller consuming touch when it's invisible (#7484) 2022-07-09 09:20:47 -04:00
da7a64b40d Use Material3 switches in XML layouts 2022-07-09 00:00:18 -04:00
ab1a44e108 Merge branch 'patch' 2022-07-08 16:09:19 -04:00
26ddc6e3aa Release v0.13.5 2022-07-08 15:52:48 -04:00
1dc4a52f61 Bump dependencies 2022-07-08 09:11:36 -04:00
473a4fec70 Fix cherry pick errors 2022-07-08 09:11:28 -04:00
1919c2d925 Update default user agent string
(cherry picked from commit 7d3fe0ed43)
2022-07-08 08:58:55 -04:00
71e31e6c03 Add MIME type mapping for image/jxl (fixes #7117)
(cherry picked from commit 591df8abcc)
2022-07-08 08:58:46 -04:00
c01df7f0a1 Increase height of transition view in webtoon viewers (fixes #7242)
(cherry picked from commit 46734c525f)
2022-07-08 08:57:45 -04:00
6024f6175b Extension API: change fallback source and logic (#7400)
* Extension API: change fallback source and logic

* remove ghproxy

(cherry picked from commit 284445c364)
2022-07-08 08:56:51 -04:00
33500e5b69 RateLimitInterceptor: ignore canceled calls (#7389)
* RateLimitInterceptor: ignore canceled calls

* SpecificHostRateLimit: ignore canceled calls

(cherry picked from commit 5b8cd68cf3)
2022-07-08 08:56:29 -04:00
17899a6d6d Add new "Lavender" theme (#7343)
* Add new "Lavender" theme

* Add light theme values for Lavender theme

* Fix order of enums

* Fix accented UI elements in set categories sheet being different colors

Co-authored-by: CrepeTF <trungnguyen02@outlookcom>
(cherry picked from commit ad106bd884)
2022-07-08 08:56:15 -04:00
4c3eb68d3a Use primary color for excluded tristate filter icon (fixes #7360)
(cherry picked from commit 3ca1ce4636)
2022-07-08 08:55:59 -04:00
29ced9642d Fix downloader crash related to UnmeteredSource (#7365)
Fix crash when starting a download with chaqpters from a UnmeteredSource

(cherry picked from commit 470a576441)
2022-07-08 08:55:52 -04:00
af82591d85 Fix accented UI elements in library sheet being different colors
(cherry picked from commit cd5bcc3673)
2022-07-08 08:55:38 -04:00
5bc4a446ec Fix wrapped long page numbers in reader (closes #7300)
(cherry picked from commit 6bc484617e)
2022-07-08 08:55:01 -04:00
83e93b254e Don't show clipboard copy confirmation toast on Android 13 or above
(cherry picked from commit 40f5d26945)
2022-07-08 08:53:46 -04:00
49c7dd0cac Add more DoH providers (#7256)
* Add more DoH providers

* Fix IPs

(cherry picked from commit 18ea6c4f65)
2022-07-08 08:53:41 -04:00
96d2fb62e4 ChapterSourceSync: set default timestamp to max timestamp (#7197)
(cherry picked from commit dd5da56695)
2022-07-08 08:53:19 -04:00
c76a136d3f Fix global update ignoring network constraint (#7188)
* update library update network constraint logic

* add explicit 'only on unmetered network' update constraint

(cherry picked from commit 63238b388d)
2022-07-08 08:52:49 -04:00
940409a4c3 Local Source - qol, cleanup and cover related fixes (#7166)
* Local Source - qol, cleanup and cover related fixes

* Review Changes

(cherry picked from commit ad17eb1386)
2022-07-08 08:52:26 -04:00
071dd88ef8 Add ability to show manga when clicking item in migration search process (#7134)
(cherry picked from commit bbb69482e1)
2022-07-08 08:51:26 -04:00
a58a4634e2 Fix reader menu appearing then disappearing in webtoon viewer when there is no next chapter (#7115)
(cherry picked from commit 6580f5771f)
2022-07-08 08:51:13 -04:00
5979e72662 Fix webtoon viewer showing transition view when going to next/prev chapter using next/prev button (#7133)
(cherry picked from commit b21bcc2d45)
2022-07-08 08:51:04 -04:00
010436e797 Change jsDelivr CDN URL to Fastly (#7156)
(cherry picked from commit 7b242bf118)
2022-07-08 08:50:54 -04:00
980709cccb Use jsDelivr as fallback when GitHub can't be reached for extensions (closes #5517)
Re-implementation of 24bb2f02dc

(cherry picked from commit d61bfd7caf)
2022-07-08 08:50:35 -04:00
fe80356756 Save reader progress when activity is paused (#7121)
(cherry picked from commit f1ab34e27c)
2022-07-08 08:50:06 -04:00
cecf532ffd Fix category tabs incorrect scroll position (#7120)
(cherry picked from commit 6d655ff757)
2022-07-08 08:49:57 -04:00
6cb255e60a Add switch to DownloadPageLoader when chapter is downloaded (#7119)
(cherry picked from commit 63627c81eb)
2022-07-08 08:49:48 -04:00
b46fb7d1e1 Fix "Move to top" showing at the most top item in download queue (#7109)
(cherry picked from commit b26daf8824)
2022-07-08 08:49:21 -04:00
8874193927 Update build workflow actions
(cherry picked from commit 8bee5accb7)
2022-07-08 08:49:04 -04:00
a4515ad251 Check for app updates by comparing semver (#7100)
Instead of just checking whether the current app version *matches* with
latest app version in GitHub Releases, compare the semver from the tag
names to check whether the latter is greater and the app needs an update

Reference: semver spec #11 https://semver.org/#spec-item-11

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
(cherry picked from commit e7ed130f2a)
2022-07-08 08:48:39 -04:00
55b0b57699 Use theme primary color for slider track (#7102)
(cherry picked from commit bc053580ad)
2022-07-08 08:48:00 -04:00
aab7795b4c Don't save categories in backup if not selected (#7101)
Currently, manually created backups contain list of categories even if
Categories option is not selected during Backup Prompt. This leads to
empty categories being created when restoring such backup files

This commit adds a check before saving categories list info to the
backup file. The check is the same check which is used while backing up
category info of manga in library

Tested and worked successfully on app installed on Android 12

(cherry picked from commit 11c01235ac)
2022-07-08 08:47:51 -04:00
196a8e6829 Rename "navigation layout" to "tap zones"
(cherry picked from commit c49d862fc5)
2022-07-08 08:47:43 -04:00
972cd98d7b Fix removing manga from library reverts during global update (#7063)
* Fix removing manga from library reverts during global update

* Review Changes

* Review changes 2

(cherry picked from commit c4088bad12)
2022-07-08 08:47:12 -04:00
a16b5d241b Add -r flag to ShizukuInstaller createCommand (#7080)
(cherry picked from commit 49d3ddb830)
2022-07-08 08:46:49 -04:00
bfa918140f Fix Android 13 icon sizing
(cherry picked from commit 9fdc803c14)
2022-07-08 08:46:27 -04:00
0721de5b81 Add links to website FAQ for library update and download warning notifications
(cherry picked from commit 70698e6494)
2022-07-08 08:45:48 -04:00
a409fde519 Download new chapters when only excluded categories is selected (#6984)
(cherry picked from commit 06bec0ad54)
2022-07-08 08:45:29 -04:00
8e34a30dce Fix skipped library entries and size warning notifications using same ID
(cherry picked from commit 91ed3a4a5f)
2022-07-08 08:43:55 -04:00
ba43462041 Fix update warning notifications being cut off (fixes #6983)
(cherry picked from commit 20145f7a12)
2022-07-08 08:43:47 -04:00
c8ae936ce9 Default to downloading as CBZ (closes #6942)
Generally seems fine. People with weak devices may experience some issues, but they can toggle it off/extract the archives separately if needed.

(cherry picked from commit 883945e3e8)
2022-07-08 08:43:39 -04:00
853f949140 Add battery not low restriction for global updates (closes #6980)
(cherry picked from commit 3feea71146)
2022-07-08 08:43:31 -04:00
615b01a006 Fix chapter transition setting for one page chapters (#6998)
(cherry picked from commit 5e32b8e49f)
2022-07-08 08:43:14 -04:00
0eb5a3176b Delete entire app_webview folder when clearing WebView data
(cherry picked from commit 6e95fde4ec)
2022-07-08 08:43:01 -04:00
867a5a3ea0 Move clear webview data action to network group
(cherry picked from commit bf0bb5aa88)
2022-07-08 08:42:45 -04:00
5159eabc5d Reset lastPageRead when chapter is marked unread (#7475)
* Reset lastPageRead when chapter is marked unread

* Remove a bit of repetition in SetReadStatus
2022-07-07 22:34:58 -04:00
9357af2bcf Fix default category name (#7477) 2022-07-07 11:56:58 -04:00
038532897b Fix auto downloader for "Default" category (#7476) 2022-07-07 08:01:15 -04:00
325a5e37aa Fix broken downloaded chapter (#7460) 2022-07-06 22:13:49 -04:00
7d3fe0ed43 Update default user agent string 2022-07-06 22:13:20 -04:00
eef95cef33 ChapterDownloadIndicator: Ensure uniform hit area (#7453) 2022-07-04 22:36:59 -04:00
591df8abcc Add MIME type mapping for image/jxl (fixes #7117) 2022-07-03 22:33:15 -04:00
46734c525f Increase height of transition view in webtoon viewers (fixes #7242) 2022-07-03 17:39:11 -04:00
a3378e6080 More domain model usage 2022-07-03 16:51:11 -04:00
3791d82540 More domain model usage 2022-07-03 16:34:58 -04:00
a3ab8746bf More domain model usage 2022-07-03 16:12:31 -04:00
069bd90c0f Cleanup data layer (#7450) 2022-07-03 15:48:13 -04:00
68697e59d7 More domain model usage 2022-07-03 13:46:09 -04:00
b3dd8b7355 More domain model usage 2022-07-03 13:21:48 -04:00
eb2a904b61 Remove SQLiteOpenHelper as database is migrated to SQLDelight (#7448) 2022-07-03 11:48:59 -04:00
17951cfd68 Use SQLDelight for all Manga related queries (#7447) 2022-07-03 10:17:41 -04:00
6d6237e370 Update dependency com.google.gms:google-services to v4.3.13 (#7444)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-02 22:53:25 -04:00
851a5ab7e4 Update dependency com.squareup.okio:okio to v3.2.0 (#7445)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-02 22:53:19 -04:00
d3ce46a367 Update styfle/cancel-workflow-action action to v0.10.0 (#7446)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-02 22:53:03 -04:00
74c5b29484 Update dependency ch.acra:acra-http to v5.9.5 (#7442)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-02 22:27:26 -04:00
20453dc08f Update dependency com.google.android.material:compose-theme-adapter-3 to v1.0.14 (#7443)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-02 22:27:17 -04:00
9e3b454b1b Use SQLDelight for all MangaCategory related queries (#7441) 2022-07-02 19:05:38 -04:00
29633b64aa Use SQLDelight for all Chapter related queries (#7440) 2022-07-02 18:51:33 -04:00
76c0ead1db Migrate to more use of domain models 2022-07-02 17:14:19 -04:00
2674570792 Use SQLDelight for a Category related queries (#7438) 2022-07-02 16:12:06 -04:00
21771e62aa More SQLDelight migrations 2022-07-02 15:19:52 -04:00
5d77ee37d2 Replace package with namespace (#7436) 2022-07-02 13:08:22 -04:00
2dfbfd0958 Remove more unused StorIO code 2022-07-02 13:08:08 -04:00
05085fe57f Use SQLDelight on Library screen (#7432)
- Uses the new `asObservable` function to change the database calls to use SQLDelight, which should make the impact minimal when it comes to bugs.
- Use interactors where they already exist
- The todos are for the Compose rewrite
- Removed unused StorIO methods/queries
- Tested loading library, move manga to new category, unfavorite multiple manga, move multiple manga from one category to another, change filter, sort and display settings (with and without per category settings), (un)mark chapters, start/delete downloads

Thank Syer for asObservable

Co-authored-by: jobobby04 <17078382+jobobby04@users.noreply.github.com>

Co-authored-by: jobobby04 <17078382+jobobby04@users.noreply.github.com>
2022-07-02 12:55:34 -04:00
ff32ab09fb Downloader: Optimize split tall image (#7435) 2022-07-02 12:49:50 -04:00
deaded5af2 Reimplement chapter download indicator longpress (#7412) 2022-07-02 12:43:18 -04:00
f3c50ee9a3 Weblate translations
Manually resolved merge conflicts from https://hosted.weblate.org/git/tachiyomi/strings/
2022-07-02 10:09:55 -04:00
3072296919 MangaScreen: Hide scroller when appbar is expanded (#7426) 2022-07-01 10:37:58 -04:00
1f10b79ee8 Use SQLDelight on Updates screen (#7423) 2022-06-30 22:18:12 -04:00
b9e108eb4d Revert some KTX extension changes
These weren't exactly 1:1 replacements. Might be related to #7391.
2022-06-30 22:13:31 -04:00
f26cfa58e4 Downgrade to Compose 1.2.0-rc03 2022-06-30 09:25:26 -04:00
e1525a5125 DownloadProvider: Only provide necessary info and not whole chapter/manga class (#7411) 2022-06-30 09:20:55 -04:00
388dc2f103 MangaScreen: Reuse components between two layouts (#7397) 2022-06-30 09:20:16 -04:00
7e4c45858f Bump dependencies 2022-06-29 22:45:22 -04:00
d476431707 Fix unit test class to match package 2022-06-29 22:45:22 -04:00
284445c364 Extension API: change fallback source and logic (#7400)
* Extension API: change fallback source and logic

* remove ghproxy
2022-06-29 18:34:25 -04:00
08d1ecfba7 Fix chapter item incorrect colors (#7403)
* Fix chapter item incorrect colors

* Make it like stable
2022-06-29 18:34:11 -04:00
0969226fd3 Fix crash when adding if there are more then 1 dupe (#7405) 2022-06-28 08:14:08 -04:00
0c856438fa MangaInfoHeader: Add description placeholder (#7398)
To always show summary view for expanding tags
2022-06-28 08:12:15 -04:00
e44bb30996 Improve history screen scrolling perf (#7399) 2022-06-27 18:33:57 -04:00
7440086ef1 Fix Mark previous as read (#7396) 2022-06-27 09:37:30 -04:00
ef3acb8c43 Sort Manga by title in MigrationMangaScreeen (#7392) 2022-06-27 08:04:14 -04:00
ee38671400 Fix trackers not migrating (#7393) 2022-06-27 08:03:54 -04:00
5b8cd68cf3 RateLimitInterceptor: ignore canceled calls (#7389)
* RateLimitInterceptor: ignore canceled calls

* SpecificHostRateLimit: ignore canceled calls
2022-06-26 21:35:35 -04:00
53decfd47b Migrate usages of SyncChaptersWithTrackServiceTwoWay 2022-06-26 21:34:54 -04:00
65264e3ef5 Migrate more track DB calls to SQLDelight 2022-06-26 19:46:41 -04:00
4ca0fc7a4d Fix app update install notification disappearing 2022-06-26 19:11:34 -04:00
7b294478e4 [skip ci] Update issue templates 2022-06-26 16:42:58 -04:00
04f0ca7846 Use sqldelight for direct db calls in MangaPresenter (#7366) 2022-06-26 15:54:34 -04:00
61a44101a2 Fix clicking cover opening random manga (#7387) 2022-06-26 15:49:52 -04:00
924dfa19cf MangaScreen: Fix action mode download button not working (#7385) 2022-06-26 13:37:41 -04:00
9ff6ae81bd VerticalFastScroller: Fix incorrect touch target (#7384) 2022-06-26 12:58:31 -04:00
c33e5c8a17 Fix chapter number display style (#7383) 2022-06-26 12:58:14 -04:00
6129bbc9ab MangaInfoHeader tweaks (#7382)
* Changed cover alignment when title is longer
* Hide artist text if it's equal to author
* Set single line to status and source name
2022-06-26 12:48:29 -04:00
b34b10c6b8 [skip ci] Disable automatic translation merges 2022-06-26 10:12:27 -04:00
ad106bd884 Add new "Lavender" theme (#7343)
* Add new "Lavender" theme

* Add light theme values for Lavender theme

* Fix order of enums

* Fix accented UI elements in set categories sheet being different colors

Co-authored-by: CrepeTF <trungnguyen02@outlookcom>
2022-06-26 10:01:31 -04:00
37fe25ac06 Fix manga info header using wrong text color (fixes #7368) 2022-06-26 10:01:11 -04:00
0e0c1dcdc5 MangaPresenter: Fix state updates when opening a new manga entry (#7379) 2022-06-26 09:45:06 -04:00
c9770eea2f Update com.google.android.material (#7377)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-25 22:53:57 -04:00
80d2d9d258 Avoid overflow in extension screen items (fixes #6972) 2022-06-25 22:41:22 -04:00
3ca1ce4636 Use primary color for excluded tristate filter icon (fixes #7360) 2022-06-25 22:34:48 -04:00
8ec91cddab Minor cleanup
- Use outlined icons where appropriate to match previous UI
- Allow tapping entire ChapterHeader to bring up sheet
2022-06-25 11:20:34 -04:00
470a576441 Fix downloader crash related to UnmeteredSource (#7365)
Fix crash when starting a download with chaqpters from a UnmeteredSource
2022-06-25 11:09:41 -04:00
33a778873a MangaController overhaul (#7244) 2022-06-25 11:03:48 -04:00
cf7ca5bd28 Weblate translations (#7327)
Co-authored-by: Abay Emes <abayemes@gmail.com>
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: Druvvaldis <druvvaldisr@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Maor Arnon <maorerror@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Shippo <shiposhouyou@gmail.com>
Co-authored-by: SurrenderDorothy <shinigamiizmajnkrafta@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: komeil Parseh <ahmdparsh129@gmail.com>
Co-authored-by: moon <jamiejakie@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/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/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/he/
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/kk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ko/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/lv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
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/th/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hans/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Abay Emes <abayemes@gmail.com>
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: Druvvaldis <druvvaldisr@gmail.com>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Maor Arnon <maorerror@gmail.com>
Co-authored-by: Marco Santos <enum.scima@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Shippo <shiposhouyou@gmail.com>
Co-authored-by: SurrenderDorothy <shinigamiizmajnkrafta@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: komeil Parseh <ahmdparsh129@gmail.com>
Co-authored-by: moon <jamiejakie@gmail.com>
Co-authored-by: stevenlele <stevenlele@outlook.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-06-25 00:01:03 +00:00
a77bce7b37 ChapterDownloadView: Convert to compose (#7354) 2022-06-24 15:42:30 -04:00
8e985eb0db Bump dependencies 2022-06-24 12:11:11 -04:00
915e38f636 Fix crashes from KTX extension changes 2022-06-24 12:06:43 -04:00
e3b1053c03 Use sqldelight in migration (#7331)
* Use sqldelight in migration

* Some more changes

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

* Review Changes

* Review changes 2

* Review Changes 3

* Review Changes 4

Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
2022-06-21 17:27:55 -04:00
c2520bff12 Utilize more KTX extensions (#7348) 2022-06-20 22:54:42 -04:00
cd5bcc3673 Fix accented UI elements in library sheet being different colors 2022-06-20 22:51:34 -04:00
254f021903 Minor cleanup 2022-06-20 22:51:04 -04:00
8fedd2d5f1 Convert cover dialog view to compose (#7346) 2022-06-20 22:31:36 -04:00
cb1830d747 More minor refactorings
Extracted from #7244

Co-authored-by: ivaniskandar <ivaniskandar@users.noreply.github.com>
2022-06-19 17:32:31 -04:00
68c47a3238 Minor composable updates
Extracted from #7244

Co-authored-by: ivaniskandar <ivaniskandar@users.noreply.github.com>
2022-06-19 17:17:48 -04:00
e644772731 Add string for future app language toggle preference
Feature won't be added until A13 and/or the Jetpack library is stabler, but adding the string first so translations flow in.
2022-06-19 17:03:07 -04:00
11f1482818 Add Composable preview for preferences
...except Android Studio refuses to actually render them.
2022-06-19 16:50:52 -04:00
a7decdb62d Migrate some categories SQL calls to SQLDelight 2022-06-19 16:38:42 -04:00
005b9b595c ChaptersSettingsSheet: Single source of truth and use new manga class (#7342)
Currently breaks initial settings state until the source of truth is
properly updated.
2022-06-19 12:29:49 -04:00
e6a9d0b090 Add fast scroller to extensions screen (#7340) 2022-06-19 10:33:25 -04:00
82879a129e Make stub source icon part of SourceIcon (#7337)
* Make stub source icon part of `SourceIcon`

* Review Changes
2022-06-19 10:16:55 -04:00
9f66c85281 Migrate duplicate manga check to SQLDelight
Extracted from #7244

Co-authored-by: ivaniskandar <ivaniskandar@users.noreply.github.com>
2022-06-19 10:15:24 -04:00
0f5731360b Update actions/dependency-review-action action to v2 (#7334)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-18 21:56:33 -04:00
3fd9e021fa Use custom QueryPagingSource (#7321)
* Use custom QueryPagingSource

- Adds placeholder to make the list jump around less
- Fixes issue where SQLDelight QueryPagingSource would throw IndexOutOfBounds

* Review Changes
2022-06-18 14:55:58 -04:00
4c3af7bf36 MainActivity: Top bar status indicator adjustments (#7329)
* Move to inside app bar for tablet ui layout so it can be hidden
with the app bar at once
* Remove the redundant parent view
* Add text appearance style
2022-06-18 12:12:22 -04:00
28e7009b49 Convert edit cover function to suspend function (#7330) 2022-06-18 10:01:03 -04:00
dd983c803b Delete unused database queries/resolvers 2022-06-17 22:35:21 -04:00
1b804e61cb Fix cover fetching in compose views (#7315)
Make sure it passed thru the custom fetcher
2022-06-17 22:21:29 -04:00
02eb3cb6b5 Weblate translations (#7284)
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Bmswad1 <Bmswad1@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: Eugene <e.shlyapkin99@gmail.com>
Co-authored-by: Fyodor Danilov <danilovfa@protonmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hiroshi <borlonjhayron1119@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Mehdi <mix3d.r@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: Samuel Leonardo <lafruta94@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: SurrenderDorothy <shinigamiizmajnkrafta@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: moon <jamiejakie@gmail.com>
Co-authored-by: poog <poogchamp@gmail.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/be/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ca/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ceb/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/de/
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/fa/
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/jv/
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/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/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/zh_Hant/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@gmail.com>
Co-authored-by: Bmswad1 <Bmswad1@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: Eugene <e.shlyapkin99@gmail.com>
Co-authored-by: Fyodor Danilov <danilovfa@protonmail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hiroshi <borlonjhayron1119@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Lyfja <yassinelaoud@gmail.com>
Co-authored-by: Lzmxya <lzmxya@gmail.com>
Co-authored-by: Mehdi <mix3d.r@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Rostyslav Haitkulov <info@ubilling.net.ua>
Co-authored-by: Samuel Leonardo <lafruta94@gmail.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: SurrenderDorothy <shinigamiizmajnkrafta@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: moon <jamiejakie@gmail.com>
Co-authored-by: poog <poogchamp@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-06-18 00:01:35 +00:00
c5d84b4f24 Fix History not being added when restoring backup (#7324) 2022-06-17 17:29:07 -04:00
ae88252cb1 MangaController: Change the workaround for title alpha (#7277)
Now checks for the backstack for any dialog controller when a push exit occurs
before restoring the title alpha.
2022-06-17 17:28:50 -04:00
3c3d787a2b MainActivity: Fix incorrect UI states when activity recreated with dialog controller (#7325) 2022-06-17 17:28:07 -04:00
6aee4fc464 Fix freezing on migrating manga (#7317)
* Use `supend` instead of `runBlocking` in migrate function

* lift `syncChaptersWithSource` out of the db trasaction
2022-06-16 23:34:44 -04:00
4ef337f1e9 Don't set text colors when creating compose theme (#7316)
This avoids compose snackbar text color issue
2022-06-16 11:37:57 -04:00
017f6b22f0 Use SQLDelight on Category screen (#7310)
* Use SQLDelight on Category screen

* Include category name in DuplicateNameException
2022-06-16 10:59:10 -04:00
602168bc48 Update Compose 2022-06-15 22:24:22 -04:00
fdf384b809 Add Cancel button to App Update Notification (#7309)
* Add cancel button in app update download notif

Since stuck downloads are a common issue and only solution until now was
to force close the app or download and update the app manually by
downloading from GitHub (which clears the notif away)

Based on commit
4dea924337

Co-authored-by: Jays2Kings <8617760+Jays2Kings@users.noreply.github.com>

* Linting by Android Studio

* commit PR Review Suggestion

Update app/src/main/java/eu/kanade/tachiyomi/data/notification/NotificationReceiver.kt

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

* Use `launchIO`

copied this over from how j2k was doing it. Launching in IO Thread like
how it was before this PR is sufficient

* Clear previous actions before adding `Cancel`

Otherwise, it led to two identical Cancel buttons

Co-authored-by: Jays2Kings <8617760+Jays2Kings@users.noreply.github.com>
Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-06-15 18:07:01 -04:00
284880d096 Fix WebView user-agent (fixes #7306)
The `source.headers.toMultimap()` call in WebViewActivity makes all the names lowercase.
2022-06-15 18:05:56 -04:00
a446b37c1f Make Compose overflow menu feel slightly more like XML version 2022-06-15 18:02:08 -04:00
ad75d137b0 Bump dependencies 2022-06-15 17:51:45 -04:00
d2f4c43526 Minor cleanup 2022-06-14 22:31:39 -04:00
6bc484617e Fix wrapped long page numbers in reader (closes #7300) 2022-06-14 22:31:24 -04:00
9d5b7de1d8 Maintain source info in the database. (#6389)
* Maintain Source Info in database

* Review changes and cleanups

* Review changes 2

* Review Changes 3
2022-06-14 09:10:40 -04:00
a01c370d63 Set db chapter metadata from correct chapter (#7303) 2022-06-14 09:09:21 -04:00
fd5da2de3a Use SQLDelight in Backup/Restore (#7295)
* Use SQLDelight in Backup/Restore

* Use CoroutineWorker
2022-06-12 14:33:48 -04:00
3c9f96d621 Update okhttp_version to v4.10.0 (#7299)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-12 13:35:57 -04:00
693cc103ea Add date_upload to toDbChapter() (#7297) 2022-06-12 11:44:02 -04:00
5ccde61ae1 Minor cleanup 2022-06-12 11:29:48 -04:00
b96686e6ad Fix chapter list live update (#7296) 2022-06-12 11:23:41 -04:00
e7695aef78 Fix Links to Changelog/Readme/Commits for multisrc (#7252)
* Fix Links to Changelog/Readme/Commits for `multisrc`

working basic fix. Needs to be refactored into `createUrl()`

* Refactor back into `createUrl`

hopefully the logic is understandable
there's three cases:
 - when multisrc, if `path` isn't mentioned, then we're trying to open
   commmit history
 - when multisrc, if `path` is mentioned, then its either a changelog or
   a readme to a multisrc extension, the files are stored in the
   `overrides` subfolder
 - when not multisrc, we're looking at a single source where the links
   are constructed in the same way regardless of it being
   changelog/readme/commit history
2022-06-12 10:24:39 -04:00
5bb78eb77f Update manga metadata on library update with sqldelight (#7293)
Co-Authored-By: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>

Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
2022-06-12 10:21:45 -04:00
5fbf454652 Update compose-theme-adapter 2022-06-12 09:59:55 -04:00
d098eca69d Remove unused database resolvers/queries 2022-06-11 11:51:14 -04:00
120943a8b3 Make syncChaptersWithSource use sqldelight (#7263)
* Make `syncChaptersWithSource` use sqldelight

Will break chapter list live update on current ui

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

* Review Changes

Co-authored-by: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com>
2022-06-11 11:38:39 -04:00
1e64542f14 [skip ci] Remove CI-specific Gradle config
Newer versions of gradle-build-action allows the daemon to persist across build steps
2022-06-11 11:38:20 -04:00
e15a867106 Convert clear database queries to SQLDelight 2022-06-10 21:33:56 -04:00
349e6ca98f Weblate translations (#7253)
Co-authored-by: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@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: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hiroshi <borlonjhayron1119@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ID-86 <ultralehky@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
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: Medo <phenomenalpharaoh@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: 赤城 呼明 <hapipon815@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/ceb/
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/ja/
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/th/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/tr/
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: Ajeje Brazorf <lmelonimamo@yahoo.it>
Co-authored-by: Alessandro Jean <alessandrojean@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: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hiroshi <borlonjhayron1119@gmail.com>
Co-authored-by: ID-86 <ultralehky@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
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: Medo <phenomenalpharaoh@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: 赤城 呼明 <hapipon815@gmail.com>
2022-06-11 00:01:21 +00:00
da8669c826 Actually compare chapter numbers as numbers when sorting (fixes #7247) 2022-06-10 09:49:50 -04:00
59837bbb90 Change cover memory key (#7276)
Use different key for custom cover and add last modified time for updating
cover without clearing the whole memory cache
2022-06-10 09:33:59 -04:00
20c14a0a00 Update ChapterSourceSync.kt (#7271) 2022-06-10 09:27:08 -04:00
06fdfcdb23 Make ChapterRecognition return the result (#7279) 2022-06-10 09:26:56 -04:00
cf48bbc176 Minor cleanup
Fixing some things that were errors when compiling against SDK 33.
2022-06-09 23:04:40 -04:00
40f5d26945 Don't show clipboard copy confirmation toast on Android 13 or above 2022-06-08 22:31:01 -04:00
18ea6c4f65 Add more DoH providers (#7256)
* Add more DoH providers

* Fix IPs
2022-06-07 17:58:58 -04:00
7a661747c5 Tweak extension details screen (#7257) 2022-06-07 17:47:46 -04:00
177a642afc Update dependency androidx.sqlite:sqlite-ktx to v2.3.0-alpha03 (#7254)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-06-07 17:46:28 -04:00
161c8bcf9e Use Requery to enhance SQLite (#7260) 2022-06-06 08:25:03 -04:00
e3f8aedd5a Bump dependencies 2022-06-04 16:15:02 -04:00
7fdbf40cd2 Minor cleanups
Pulling out some of the smaller changes that aren't related to the manga controller changes in #7244
2022-06-04 16:01:49 -04:00
5ea03fad87 New: Migrating titles maintains custom covers (#7196)
* New: Migrating titles maintains custom covers #7189

* Added Custom Covers to MigrationFlags.kt, strings.xml

* Reworded covers --> cover

* Updated logic to show/hide Migration flags titles depending on manga.
2022-06-04 12:52:35 -04:00
dd5da56695 ChapterSourceSync: set default timestamp to max timestamp (#7197) 2022-06-04 12:48:18 -04:00
0e1e57c1c3 Fix loading progress not showing in webview (#7243)
* Fix loading progress not showing in webview

* Review Changes
2022-06-04 12:44:20 -04:00
6ddd6ed0e3 [skip ci] Adjust merge criteria for translation PRs 2022-06-04 09:26:21 -04:00
b80a992fdb Weblate translations (#7248)
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ja/
Translation: Tachiyomi/Tachiyomi 0.x

Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
2022-06-04 13:20:19 +00:00
20de02dffb [skip ci] Adjust merge criteria for translation PRs 2022-06-03 21:09:25 -04:00
a3a85ea49f Weblate translations (#7225)
Co-authored-by: AD_Ahmed DeviL <vodaaahmed@gmail.com>
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: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: ID-86 <ultralehky@gmail.com>
Co-authored-by: IceUniverse1 <koukichisakamoto@gmail.com>
Co-authored-by: Igor <zerrxs@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
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: Marwan Sakr <maro.572004@gmail.com>
Co-authored-by: Max <maxhevn@rocketmail.com>
Co-authored-by: Micky Micke <michael.dubois.martin@gmail.com>
Co-authored-by: Nestor A. Sanchez <help.toastcode@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Paulo Pinho <kebrus@gmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
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: THE_LEGEND <the.legend9285+weblate@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Uzuki Shimamura <hzy980512@126.com>
Co-authored-by: W.A.R <crybby990@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: ayaao <myrgdream@gmail.com>
Co-authored-by: carrot <expertcarrot@gmail.com>
Co-authored-by: paulo victor <paulovictorcarvalho2014@gmail.com>
Co-authored-by: saka <siegtra@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: אילון קטן <eilonkatan@gmail.com>
Co-authored-by: 赤城 呼明 <hapipon815@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/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/kk/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/km/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ms/
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/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: AD_Ahmed DeviL <vodaaahmed@gmail.com>
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: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Huang Zhiyi <hzy980512@126.com>
Co-authored-by: ID-86 <ultralehky@gmail.com>
Co-authored-by: IceUniverse1 <koukichisakamoto@gmail.com>
Co-authored-by: Igor <zerrxs@gmail.com>
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
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: Marwan Sakr <maro.572004@gmail.com>
Co-authored-by: Max <maxhevn@rocketmail.com>
Co-authored-by: Micky Micke <michael.dubois.martin@gmail.com>
Co-authored-by: Nestor A. Sanchez <help.toastcode@gmail.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Paulo Pinho <kebrus@gmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
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: THE_LEGEND <the.legend9285+weblate@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: W.A.R <crybby990@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: ayaao <myrgdream@gmail.com>
Co-authored-by: carrot <expertcarrot@gmail.com>
Co-authored-by: paulo victor <paulovictorcarvalho2014@gmail.com>
Co-authored-by: saka <siegtra@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: אילון קטן <eilonkatan@gmail.com>
Co-authored-by: 赤城 呼明 <hapipon815@gmail.com>
2022-06-04 00:01:02 +00:00
4560033e66 feat: add read last read chapter shortcut (#7230)
Supersedes #6861

Co-authored-by: Pierre-Monier <65488471+Pierre-Monier@users.noreply.github.com>

Co-authored-by: Pierre-Monier <65488471+Pierre-Monier@users.noreply.github.com>
2022-05-31 22:55:58 -04:00
11c61d42dc [skip ci] Configure Mergify to automatically merge translations PR every week 2022-05-29 17:16:46 -04:00
d1be221d7a Remove logic for restoring legacy JSON backups
- Protobuf backups have been around for 1.5 years now
- The ability to restore online-dependant data from JSON backups gets harder as time goes on and sources drift
- If users really need a way to restore them, they can use an older version of the app, or a separate tool for translating between the formats could be created
2022-05-29 12:24:39 -04:00
cd0294b1b6 Replace history query with actual upsert 2022-05-29 12:12:06 -04:00
0dbe82c781 Update coroutines_version to v1.6.2 (#7219)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-28 22:41:26 -04:00
ad9ef81a77 Update aboutlib_version to v10.3.0 (#7220)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-28 22:41:14 -04:00
b36ca92dd9 Make Storio follow new database table structure (#7217) 2022-05-28 18:36:40 -04:00
c8468c29f1 MangaUpdates tweaks (#7205)
* MangaUpdates tweaks

* Review changes

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

* Use built in functions instead of Jsoup

Co-authored-by: arkon <4098258+arkon@users.noreply.github.com>
2022-05-28 18:36:28 -04:00
3c40010aff Minor cleanups 2022-05-28 09:12:15 -04:00
63238b388d Fix global update ignoring network constraint (#7188)
* update library update network constraint logic

* add explicit 'only on unmetered network' update constraint
2022-05-28 09:09:53 -04:00
809da49301 Reader: Save reading progress with SQLDelight (#7185)
* Use SQLDelight in reader to update history

* Move chapter progress to sqldelight

* Review Changes

Co-Authored-By: inorichi <len@kanade.eu>

* Review Changes 2

Co-authored-by: FourTOne5 <59261191+FourTOne5@users.noreply.github.com>
Co-authored-by: inorichi <len@kanade.eu>
2022-05-28 09:09:27 -04:00
6b14f38cfa [skip ci] Fix wording in issue template (#7207) 2022-05-28 09:00:45 -04:00
e1e1c20dbe Downgrade R8 to avoid extension issues 2022-05-26 22:33:18 -04:00
b0360b83d4 Move SQLDelight Gradle plugin to version catalog 2022-05-26 22:11:08 -04:00
f7881651c5 Mention MangaUpdates in README 2022-05-26 19:41:54 -04:00
d71224b40b Adjust R8 optimization configs to fix extension issues
Related: https://issuetracker.google.com/issues/233779072
2022-05-26 19:41:43 -04:00
241c4ad857 Update AGP for Android Studio Chipmunk 2021.2.1 Patch 1 2022-05-25 22:43:03 -04:00
87661eb85a Minor cleanup 2022-05-24 18:16:07 -04:00
ad17eb1386 Local Source - qol, cleanup and cover related fixes (#7166)
* Local Source - qol, cleanup and cover related fixes

* Review Changes
2022-05-24 18:02:02 -04:00
0c631a4990 Add MangaUpdates as a tracker (#7170)
* Add MangaUpdates as a tracker

- jobobby04 co-authored for suggestion in BackupTracking.kt

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

* Changes from code review

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

Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-05-24 18:00:33 -04:00
9b0d85bf6c Migrate settings search view to Compose 2022-05-23 18:33:46 -04:00
3b2362c784 Add scrollbar indicator to LazyColumn (#7164) 2022-05-23 18:03:46 -04:00
aa2370b381 Refactor chapter recognition tests to run in parallel 2022-05-23 17:33:03 -04:00
3e07100dc2 Fixes: incorrect sorting when chapter name contains hyphens '-' (#7161)
* Fixes: incorrect sorting when chapter name contains hyphens '-'

* Added a test case for hyphen in ChapterRecognitionTest.kt

* Removed chapter range test case since it will be replaced by chapterContainingHyphensCase
2022-05-23 17:17:29 -04:00
1949fb1abe Bump dependencies 2022-05-23 16:59:12 -04:00
28be423e65 Fix LogPriority in HistoryRepositoryImpl (#7173) 2022-05-20 08:05:23 -04:00
9a75232ca4 Minor cleanup 2022-05-19 17:43:27 -04:00
64da16f58f Update extension details screen design (#7158)
* Update extension details screen design

* Review Changes

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

* Review Changes 2

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
2022-05-19 17:31:07 -04:00
fd9510e18f Migrate extensions language filter screen to compose (#7169) 2022-05-19 17:29:40 -04:00
4be9b03ac6 Combine build and test tasks in workflows 2022-05-19 13:45:15 -04:00
2761d27aaa Make extension list update when languages changes (#7168) 2022-05-19 08:32:21 -04:00
6d154b1e4f Run unit tests during CI builds 2022-05-18 22:41:29 -04:00
bbb69482e1 Add ability to show manga when clicking item in migration search process (#7134) 2022-05-18 22:35:27 -04:00
f4e344f686 Bump dependencies 2022-05-18 22:30:28 -04:00
395a840fc4 Convert ic_untrusted_source icons to WEBP 2022-05-18 17:40:16 -04:00
6580f5771f Fix reader menu appearing then disappearing in webtoon viewer when there is no next chapter (#7115) 2022-05-17 17:20:37 -04:00
b21bcc2d45 Fix webtoon viewer showing transition view when going to next/prev chapter using next/prev button (#7133) 2022-05-17 17:20:18 -04:00
S97
4481c54376 Fixed Splitting Height for Tall Images (#7148)
* Fixed Splitting Height for Tall Images #7140

* Update app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt

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

Co-authored-by: FourTOne5 <59261191+FourTOne5@users.noreply.github.com>
2022-05-17 17:19:38 -04:00
7b242bf118 Change jsDelivr CDN URL to Fastly (#7156) 2022-05-17 17:19:17 -04:00
f2a478288a Fix close button tint in extension screen (#7154) 2022-05-17 08:09:11 -04:00
01e04e31bf Theme Compose SwipeRefresh indicator like XML version
Also rename some screens/controllers to better represent that they're the list views.
2022-05-16 23:08:04 -04:00
cbc114608b Fix both warning banner appearing for unofficial ext (#7150) 2022-05-16 12:04:54 -04:00
63987f952e [skip ci] Reword reset viewer flags settings 2022-05-15 17:48:36 -04:00
9f42306f79 Minor cleanup 2022-05-15 17:03:57 -04:00
d61bfd7caf Use jsDelivr as fallback when GitHub can't be reached for extensions (closes #5517)
Re-implementation of 24bb2f02dc
2022-05-15 16:51:52 -04:00
13943f77f7 Migrate extension details page to Compose 2022-05-15 16:35:33 -04:00
1c94ecdcdf Fix formatting (#7146) 2022-05-15 16:19:55 -04:00
fb83a07f84 Add missing top padding for screen that was rewritten in Compose (#7145) 2022-05-15 14:00:35 -04:00
3e2d7d76b9 Convert Extension tab to use Compose (#7107)
* Convert Extension tab to use Compose

Co-authored-by: jobobby04 <17078382+jobobby04@users.noreply.github.com>

* Review changes

Co-authored-by: jobobby04 <17078382+jobobby04@users.noreply.github.com>
2022-05-15 09:59:53 -04:00
7a0915964a Update serialization_version to v1.3.3 (#7128)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-15 09:41:00 -04:00
aef97c5563 Update dependency com.fredporciuncula:flow-preferences to v1.7.0 (#7132)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-15 09:38:26 -04:00
4c9331c4e9 Settings cleanup (#7126)
* Settings cleanup

* Oops

* Also hide "Invert tap zones" if tap zones is set to "Disabled" in ReaderReadingModeSettings
2022-05-15 09:37:52 -04:00
6fb5552d57 Update aboutlib_version to v10.2.0 (#7129)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-05-15 09:36:32 -04:00
bdb55ef881 Update to AGP 7.2.0 again
- Disable optimizations on eu.kanade.tachiyomi.source.** classes to avoid access modifications causing mismatches between the app and extensions
- Remove Gson and Kotson Proguard rules, since we don't have those dependencies anymore
2022-05-14 19:40:08 -04:00
628a3bc16c Temporarily downgrade AGP to fix extension loading issue in non-debug builds 2022-05-14 19:18:01 -04:00
c77396dbdb Weblate translations (#6994)
Co-authored-by: Aboo Gh <aboozar.gh.r@gmail.com>
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: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: David <david082321@yahoo.com.tw>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Howard Wu <wuhao_2000@outlook.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: John Philip Sabinet <philiptenibas@gmail.com>
Co-authored-by: Jozef Hollý <j2.00ghz@gmail.com>
Co-authored-by: Kim Vognstrup Lind <iceman1145@gmail.com>
Co-authored-by: Luck In Hell <gogono58976df542y6913ubehfbw@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: Nasy <nasy@duck.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Paulo Pinho <kebrus@gmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: RAID ALA EDDINE CHERIFI <raid555dada@gmail.com>
Co-authored-by: Rikishaaa <jebote90@gmail.com>
Co-authored-by: Samuel Leonardo <lafruta94@gmail.com>
Co-authored-by: Saud Aljaffer <saud.aljaffer@gmail.com>
Co-authored-by: Scoop <Scoo0p@yandex.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: THE_LEGEND <the.legend9285+weblate@gmail.com>
Co-authored-by: Te quiero <ilytequiero@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Thomas <Wallkman66@gmail.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Zakhar Timoshenko <vp1984tanki@gmail.com>
Co-authored-by: Zio <ankoukurayami79@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: jimman2003 <jim41825@gmail.com>
Co-authored-by: nzoba <enzobatista2@gmail.com>
Co-authored-by: opb <myniceaddress@outlook.com>
Co-authored-by: pedro henrique garcia pinto <pedro__pinto@hotmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: אילון קטן <eilonkatan@gmail.com>
Co-authored-by: عمران حديوي <imrane05011977@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/ceb/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/da/
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/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/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/jv/
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/nn/
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/si/
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: Aboo Gh <aboozar.gh.r@gmail.com>
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: DatTran MLL <tranthanhdat1142003@gmail.com>
Co-authored-by: David <david082321@yahoo.com.tw>
Co-authored-by: Eduard Ereza Martínez <eduard@ereza.cat>
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Co-authored-by: Giorgio Sanna <sannagiorgio1997@gmail.com>
Co-authored-by: Howard Wu <wuhao_2000@outlook.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: John Philip Sabinet <philiptenibas@gmail.com>
Co-authored-by: Kim Vognstrup Lind <iceman1145@gmail.com>
Co-authored-by: Luck In Hell <gogono58976df542y6913ubehfbw@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: Nasy <nasy@duck.com>
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Paulo Pinho <kebrus@gmail.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: RAID ALA EDDINE CHERIFI <raid555dada@gmail.com>
Co-authored-by: Rikishaaa <jebote90@gmail.com>
Co-authored-by: Samuel Leonardo <lafruta94@gmail.com>
Co-authored-by: Saud Aljaffer <saud.aljaffer@gmail.com>
Co-authored-by: Scoop <Scoo0p@yandex.com>
Co-authored-by: Shjosan <shjosan@kakmix.co>
Co-authored-by: Swyter <swyterzone@gmail.com>
Co-authored-by: THE_LEGEND <the.legend9285+weblate@gmail.com>
Co-authored-by: Te quiero <ilytequiero@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: Thomas <Wallkman66@gmail.com>
Co-authored-by: Vetle Ledaal <vetle.ledaal@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Zakhar Timoshenko <vp1984tanki@gmail.com>
Co-authored-by: Zio <ankoukurayami79@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: jimman2003 <jim41825@gmail.com>
Co-authored-by: nzoba <enzobatista2@gmail.com>
Co-authored-by: opb <myniceaddress@outlook.com>
Co-authored-by: pedro henrique garcia pinto <pedro__pinto@hotmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
Co-authored-by: אילון קטן <eilonkatan@gmail.com>
Co-authored-by: عمران حديوي <imrane05011977@gmail.com>
2022-05-14 17:49:56 -04:00
5002692bda Add long click action on chapter download button (#7125) 2022-05-14 11:37:47 -04:00
71bb8ed975 Minor cleanup in ImageUtil and SourceFilterPresenter (#7106)
* Minor cleanup in `ImageUtil` and `SourceFilterPresenter`

* Fix missed stuff
2022-05-14 11:34:15 -04:00
6d011ebe32 Update AndroidX SQLite (#7123) 2022-05-14 10:04:43 -04:00
f1ab34e27c Save reader progress when activity is paused (#7121) 2022-05-14 08:51:04 -04:00
6d655ff757 Fix category tabs incorrect scroll position (#7120) 2022-05-14 08:09:15 -04:00
63627c81eb Add switch to DownloadPageLoader when chapter is downloaded (#7119) 2022-05-13 21:42:23 -04:00
5dc688dc2e Update reset viewer flags strings 2022-05-12 09:04:02 -04:00
08fb2fe467 Add option to reset viewer flags (#7062)
* Add option to reset viewer flags

* Review Changes

* Run `resetViewerFlags()` content with `launchIO`
2022-05-12 09:00:57 -04:00
f1afeac0bc Detect identical mangas when long pressing to add to library (#7095)
* Detect identical mangas when long pressing to add to library

* Use extracted duplicate manga dialog to avoid duplication

* Partially revert previous commit

* Review changes

* Review changes part 2
2022-05-12 08:58:37 -04:00
S97
f75d632740 Fixed splitting logic and CBZ compression logic (#7098)
* Fixes:
- spliiting fails when the page was already been split and processed before
- Moved CBZ logic a little earlier to avoid marking a download as complete before the CBZ compression was completed

* Added a single space for readablity

* Added 2 spaces for readability

* Moved the splitting logic to happen inside getOrDownloadImage()

* Minor cleanup

* - Improved error handling when splitting fails due to OOM exception caused by BitmapFactory.decodeFile. - Changed logic from throwing error to only notify to allow the download to complete even if splitting failed.

* reverted auto formatting changes

* removed an extra loop

* Merged to Upstream, cleaned up

* Removed unused localized string

* Minor cleanup
2022-05-11 22:36:16 -04:00
b26daf8824 Fix "Move to top" showing at the most top item in download queue (#7109) 2022-05-11 22:35:30 -04:00
393fc14630 Update Compose
Fixes #7004
2022-05-11 22:29:28 -04:00
c7707dc50e Minor cleanup 2022-05-11 22:17:12 -04:00
37199a10bf Bump dependencies 2022-05-11 18:09:13 -04:00
b950370f12 Address some build warnings 2022-05-11 18:08:49 -04:00
598e4516b3 [skip ci] Configure Renovate (#7105)
* Add renovate.json

* Update renovate.json

* Update renovate.json

* Update renovate.json

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-05-11 17:59:47 -04:00
cd8392bae2 Minor dependency updates 2022-05-10 17:55:07 -04:00
ae7df4fb7f Update linter 2022-05-10 17:54:52 -04:00
8bee5accb7 Update build workflow actions 2022-05-10 17:53:19 -04:00
cf024b0e61 Update to Coil 2.0.0 2022-05-10 17:46:59 -04:00
d3f9232a3f Minor cleanup
- Add pending intent immutable flags to satisfy lint warnings
- Change AddDuplicateMangaDialog arg to a function instead to avoid leaking controller-specific logic into it
- Require WebView 99+
2022-05-10 17:39:45 -04:00
9f655e0d41 Fix download splitter potentially throwing OOM on huge images (#7099)
* Fix download splitter potentially throwing OOM on huge images

Also move the splitting to ImageUtil

* Change variable name and logcat output
2022-05-10 17:06:18 -04:00
e7ed130f2a Check for app updates by comparing semver (#7100)
Instead of just checking whether the current app version *matches* with
latest app version in GitHub Releases, compare the semver from the tag
names to check whether the latter is greater and the app needs an update

Reference: semver spec #11 https://semver.org/#spec-item-11

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>

Co-authored-by: Andreas <6576096+ghostbear@users.noreply.github.com>
2022-05-10 17:04:40 -04:00
e421eb61bc Extract add duplicate manga dialog into a controller 2022-05-10 09:19:10 -04:00
bc053580ad Use theme primary color for slider track (#7102) 2022-05-10 09:02:46 -04:00
11c01235ac Don't save categories in backup if not selected (#7101)
Currently, manually created backups contain list of categories even if
Categories option is not selected during Backup Prompt. This leads to
empty categories being created when restoring such backup files

This commit adds a check before saving categories list info to the
backup file. The check is the same check which is used while backing up
category info of manga in library

Tested and worked successfully on app installed on Android 12
2022-05-09 11:03:40 -04:00
c49d862fc5 Rename "navigation layout" to "tap zones" 2022-05-09 08:45:26 -04:00
6993e88265 Adjust inset consumption in Compose controllers (fixes #7085)
Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
2022-05-07 23:50:14 -04:00
681e9396b3 Fix crash when using renamed library sort methods (fixes #7092) 2022-05-07 23:48:53 -04:00
85ef40d0ff Don't allow swiping away app update install notification
Also show the new version number in the notifications.
2022-05-07 11:04:55 -04:00
39c0b74250 Fix tall image split math issues
- Round up per-split height to ensure the entire page ends up being split
- Handle the last split of a page potentially being shorter than the others
2022-05-06 23:10:56 -04:00
a9e629aea6 Minor cleanup
- Remove some unused StorIO queries
- Clean up tall image splitting a bit (no need for creating an unscaled scaled bitmap copy, or tracking coordinates)
- Clean up library updater a bit (still needs a lot of work though)
2022-05-06 22:48:00 -04:00
S97
aa11902aa1 Add option to automatically split tall downloaded images (#7029)
* Auto split long images to improve performance of reader

* Auto split long images to improve performance of reader - fixed the sorting

* Improved performance of splitting by getting rid of 1 extra loop

* Cleaned up code and moved the functionality to work during the downloading process (unsure how this affects download speed)

* Replaced the import .* with the actual used imports

* Fixes for Bugs discovered during my testing

* Fixed last split missing bug.

* Reordered the download progress to be updated before splitting instead of after to reflect more meaningful progress of download

* Reverted last commit since it had no effect

* Improved progress tracking when a download is paused then resumed.

* Implemented the recommended changes to enhance the feature.

* Apply suggestions from code review

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

* Update app/src/main/res/values/strings.xml

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

Co-authored-by: arkon <arkon@users.noreply.github.com>
2022-05-06 22:17:27 -04:00
c4088bad12 Fix removing manga from library reverts during global update (#7063)
* Fix removing manga from library reverts during global update

* Review Changes

* Review changes 2
2022-05-06 22:15:44 -04:00
49d3ddb830 Add -r flag to ShizukuInstaller createCommand (#7080) 2022-05-06 22:00:24 -04:00
6d802063b4 Reword and Fix library sort (#7068) 2022-05-03 18:39:04 -04:00
55a1cdb1c7 Case insensitive sort in Source tab (#7067) 2022-05-03 08:45:34 -04:00
ed8a54bd2a Properly modify StateFlow value (#7059) 2022-05-02 08:31:50 -04:00
5bd5b21543 Properly show history state (#7052)
* Make `HistoryState` similar to `MigrateState`

* Review Changes

* Also cache the transformation

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

* Fix States

Co-authored-by: Andreas <andreas.everos@gmail.com>
2022-05-01 22:40:35 -04:00
aec980662f Extract migrate list number badges for later use in library items 2022-05-01 22:35:44 -04:00
aef1dc6eaf Make MigrateSourceState similar to MigrateState (#7054) 2022-05-01 22:35:34 -04:00
bd45bf7407 Make SourceState similar to MigrateState (#7053)
* make `SourceState` similar to `MigrateState`

* Review Changes
2022-05-01 22:34:58 -04:00
e3f6cfa2df Add newer methods to StubSource 2022-05-01 10:46:44 -04:00
609f552c8d Fix migrations (#7051) 2022-05-01 10:27:01 -04:00
5763201307 Notify user of error during a page download failure (#7047)
* Notify user of error during a page download failure

* Included the manga title in the error notification
2022-04-30 16:30:02 -04:00
dee7830793 Update navigation bar padding in Compose screens 2022-04-30 11:59:39 -04:00
23f8f35354 Migrate Source Filter Screen to Compose (#7031)
* Migrate Source Filter Screen to Compose

* Changes from Review and some more fixes

* Rename some variable and classes

* Review Change

* Ewbase and Review changes
2022-04-30 11:49:02 -04:00
cccd09fb5c Allow passing modifier to preference composables 2022-04-30 09:43:49 -04:00
bf6d59cd21 Migrate Migrate Manga screen to Compose (#7045)
* Migrate Migrate Manga screen to Compose

* Changes from review comments
2022-04-30 09:37:10 -04:00
6ef6eab994 Remove source lang on migrate screen also seperate removed source on alphabetical sort (#7041)
* Remove source lang on migrate screen also seperate removed source on alphabetical sort

* Review changes

* Rename Variable
2022-04-30 08:33:00 -04:00
ccff333123 Use Compose for OAuth login loading indicator 2022-04-29 09:01:05 -04:00
891406cc7f Fix database corruption (#7042)
When using SQLDelight and Storio at the same time
2022-04-29 08:04:59 -04:00
a5d767042c Update compiler flag args 2022-04-28 18:09:16 -04:00
9fdc803c14 Fix Android 13 icon sizing 2022-04-28 18:09:05 -04:00
8798c295e6 Fix about icons sizing 2022-04-28 09:15:59 -04:00
7abb407897 Fix crashing in Android 13 Beta 1 2022-04-28 09:15:59 -04:00
78207d48ba Center CurcularProgressIndicator in LoadingScreen (#7032)
* Center `CurcularProgressIndicator` in `LoadingScreen`

* Fix Import and move modifier to top
2022-04-28 08:54:51 -04:00
70698e6494 Add links to website FAQ for library update and download warning notifications 2022-04-27 22:45:31 -04:00
adf02e53fd Add error state to MangaCover composable (#7022)
* Add error state to MangaCover

- Add error drawable when thumbnailUrl isn't able to be loaded
- Tweak usage of MangaCover

* Change `contentDescription` to be nullable

As the invoke function makes default nulls
2022-04-27 09:24:35 -04:00
259c370eb9 Remove unused drawables 2022-04-27 09:19:21 -04:00
7261fcccda Use Compose in Migrate tab (#7008)
* Use Compose in Migrate tab

* Add missing header

* Remove unused files

* Fix build after rebase

* Changes from review comments
2022-04-27 08:36:16 -04:00
a4a4503311 Migrate SettingsMainController to Compose 2022-04-26 22:41:42 -04:00
2752540330 Update Kotlin and Compose 2022-04-26 17:52:18 -04:00
0b77b78f6a Remove some minor settings
Some spring cleaning to remove some unnecessary complexity so things are easier to maintain.

- Start screen: redundant with app shortcuts in Android 7.1+
- Jump to chapters: irrelevant in tablet mode and people can scroll a tiny bit if they really have to
- Option to not scroll away bottom nav: issues with fast scroll will be irrelevant with it being replaced or removed in the Compose migrations

Get ready for people malding over their special needs. https://xkcd.com/1172/
2022-04-24 22:17:15 -04:00
06bec0ad54 Download new chapters when only excluded categories is selected (#6984) 2022-04-24 16:36:14 -04:00
f1126c55ca Add Plumber to handle some system leaks automatically 2022-04-24 16:28:09 -04:00
2caf220b18 Remove some unused StorIO queries/resolvers 2022-04-24 16:20:46 -04:00
4d23f35b9d Throw out old unit tests
Considering we never run or update them, they're not providing any value right now.
Kept the chapter recognition tests and bumped to JUnit 5.
2022-04-24 16:16:05 -04:00
f6fdb12db2 Adjust download menu item positioning (fixes #6932) 2022-04-24 15:55:24 -04:00
7773deabc0 Adjust library sorting by dates (closes #6954)
Ascending by date = oldest dates first. If no date is present, fallback to epoch 0 (i.e., oldest).
2022-04-24 15:50:51 -04:00
91ed3a4a5f Fix skipped library entries and size warning notifications using same ID 2022-04-24 15:49:24 -04:00
20145f7a12 Fix update warning notifications being cut off (fixes #6983) 2022-04-24 15:35:05 -04:00
883945e3e8 Default to downloading as CBZ (closes #6942)
Generally seems fine. People with weak devices may experience some issues, but they can toggle it off/extract the archives separately if needed.
2022-04-24 15:32:50 -04:00
3feea71146 Add battery not low restriction for global updates (closes #6980) 2022-04-24 15:25:28 -04:00
5e32b8e49f Fix chapter transition setting for one page chapters (#6998) 2022-04-24 15:21:21 -04:00
08e63e5fab Minor cleanup 2: Electric Boogaloo
- Reword pins on top setting
- Make "Latest" button style match old UI
- Sort sources by name
2022-04-24 15:17:01 -04:00
0ec9496d26 Minor cleanup 2022-04-24 14:39:51 -04:00
29a0989f28 Convert Source tab to use Compose (#6987)
* Use Compose in Source tab

* Replace hashCode with key function

* Add ability to turn off pins moving on top of source list

* Changes from review comments
2022-04-24 14:35:59 -04:00
558b18899c Migrate WebViewActivity to Compose 2022-04-24 10:22:22 -04:00
6e95fde4ec Delete entire app_webview folder when clearing WebView data 2022-04-24 09:42:26 -04:00
e691e17efc Remove unused preference layouts 2022-04-23 18:34:53 -04:00
80ea14bf7f Weblate translations (#6937)
Co-authored-by: Abay Emes <abayemes@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: 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: 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: Jozef Hollý <j2.00ghz@gmail.com>
Co-authored-by: Kim Vognstrup Lind <iceman1145@gmail.com>
Co-authored-by: Luck In Hell <gogono58976df542y6913ubehfbw@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: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pierre Kim <admin@manateeshome.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Saud Aljaffer <saud.aljaffer@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: Thameem Riyaz <geniusartz69@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: abdellah <abdellahkadem5@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: roger <616steam@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/ca/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/cs/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/da/
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/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/kk/
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/or/
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/si/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/sv/
Translate-URL: https://hosted.weblate.org/projects/tachiyomi/strings/ta/
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: Abay Emes <abayemes@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: 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: 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: Kim Vognstrup Lind <iceman1145@gmail.com>
Co-authored-by: Luck In Hell <gogono58976df542y6913ubehfbw@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: Oğuz Ersen <oguz@ersen.moe>
Co-authored-by: Pierre Kim <admin@manateeshome.com>
Co-authored-by: Pitpe11 <giorgos2550@gmail.com>
Co-authored-by: Saud Aljaffer <saud.aljaffer@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: Thameem Riyaz <geniusartz69@gmail.com>
Co-authored-by: TheKingTermux <achmadmaulana0233@gmail.com>
Co-authored-by: abdellah <abdellahkadem5@gmail.com>
Co-authored-by: altinat <poiiiii4yy@gmail.com>
Co-authored-by: roger <616steam@gmail.com>
Co-authored-by: Роман <Rozhenkov69@gmail.com>
2022-04-23 16:09:23 -04:00
c25cffafc6 Migrate More screen to Compose (#6990) 2022-04-23 15:51:50 -04:00
8933b41937 Tweak about preferences styles 2022-04-23 12:42:35 -04:00
7e2f1d729f Clean up repetitive controller transactions 2022-04-23 12:10:32 -04:00
d6c87ec10e Basic initial port of About screen to Compose 2022-04-23 12:05:00 -04:00
070abd79ce Resume when history item is tapped (#6982)
* Remove resume button

* Rename onClickItem to onClickCover

* Optimize imports

* Rename reference to onClickItem in HistoryController.kt

Co-authored-by: CrepeTF <trungnguyen02@outlookcom>
2022-04-23 10:58:33 -04:00
2d01933c28 Lifted NestedScrollConnection to abstract Compose classes
Since it'll likely be used in every controller.
2022-04-23 10:57:04 -04:00
bf0bb5aa88 Move clear webview data action to network group 2022-04-23 10:52:34 -04:00
1b4d9fc4e9 Migrate open source licenses screen to Compose 2022-04-23 10:52:19 -04:00
2b79295240 Revert "Revert history Compose/SQLDelight changes"
This reverts commit 96c894ce5b.
2022-04-22 17:35:18 -04:00
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
1268 changed files with 82205 additions and 45180 deletions

View File

@ -2,4 +2,6 @@
indent_size=4
insert_final_newline=true
ij_kotlin_allow_trailing_comma=true
ij_kotlin_allow_trailing_comma_on_call_site=true
ij_kotlin_allow_trailing_comma_on_call_site=true
ij_kotlin_name_count_to_use_star_import = 2147483647
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647

View File

@ -3,11 +3,11 @@
I acknowledge that:
- I have updated:
- To the latest version of the app (stable is v0.13.3)
- To the latest version of the app (stable is v0.14.3)
- 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
- I have searched the existing issues and this is new ticket **NOT** a duplicate or related to another open issue
- I have searched the existing issues and this is new ticket **NOT** a duplicate or related to another open or closed issue
- I will fill out the title and the information in this template
Note that the issue will be automatically closed if you do not fill out the title or requested information.

View File

@ -45,7 +45,7 @@ body:
description: |
If you're experiencing crashes, share the crash logs from **More → Settings → Advanced** then press **Dump crash logs**.
placeholder: |
You can paste the crash logs in pure text or upload it as an attachment.
You can paste the crash logs in plain text or upload it as an attachment.
- type: input
id: tachiyomi-version
@ -53,7 +53,7 @@ body:
label: Tachiyomi version
description: You can find your Tachiyomi version in **More → About**.
placeholder: |
Example: "0.13.3"
Example: "0.14.3"
validations:
required: true
@ -90,7 +90,7 @@ body:
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.
- label: I have searched the existing issues and this is a new ticket, **NOT** a duplicate or related to another open or closed issue.
required: true
- label: I have written a short but informative title.
required: true
@ -98,7 +98,7 @@ body:
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.3](https://github.com/tachiyomiorg/tachiyomi/releases/latest)**.
- label: I have updated the app to version **[0.14.3](https://github.com/tachiyomiorg/tachiyomi/releases/latest)**.
required: true
- label: I have updated all installed extensions.
required: true

View File

@ -27,13 +27,13 @@ body:
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.
- label: I have searched the existing issues and this is a new ticket, **NOT** a duplicate or related to another open or closed 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.3](https://github.com/tachiyomiorg/tachiyomi/releases/latest)**.
- label: I have updated the app to version **[0.14.3](https://github.com/tachiyomiorg/tachiyomi/releases/latest)**.
required: true
- label: I will fill out all of the requested information in this form.
required: true

10
.github/mergify.yml vendored Normal file
View File

@ -0,0 +1,10 @@
#pull_request_rules:
# - name: Automatically merge translations
# conditions:
# - "author = weblate"
# - "-conflict"
# - "current-day-of-week = Sat"
# - "created-at < 1 day ago"
# actions:
# merge:
# method: squash

12
.github/renovate.json vendored Normal file
View File

@ -0,0 +1,12 @@
{
"extends": [
"config:base"
],
"schedule": ["every sunday"],
"ignoreDeps": [
"androidx.core:core-splashscreen",
"com.android.tools:r8",
"com.google.guava:guava",
"com.github.commandiron:WheelPickerCompose"
]
}

View File

@ -1,5 +0,0 @@
org.gradle.daemon=false
org.gradle.jvmargs=-Xmx5120m
org.gradle.workers.max=2
kotlin.incremental=false

View File

@ -3,7 +3,11 @@ on:
pull_request:
paths-ignore:
- '**.md'
- 'app/src/main/res/**/strings.xml'
- 'i18n/src/main/res/**/strings.xml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
@ -21,19 +25,15 @@ jobs:
uses: gradle/wrapper-validation-action@v1
- name: Dependency Review
uses: actions/dependency-review-action@v1
uses: actions/dependency-review-action@v3
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: adopt
- name: Copy CI gradle.properties
run: |
mkdir -p ~/.gradle
cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties
- name: Build app
- name: Build app and run unit tests
uses: gradle/gradle-command-action@v2
with:
arguments: assembleStandardRelease
arguments: assembleStandardRelease testStandardReleaseUnitTest

View File

@ -6,18 +6,16 @@ on:
tags:
- v*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build app
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
all_but_latest: true
- name: Clone repo
uses: actions/checkout@v3
@ -25,19 +23,15 @@ jobs:
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: adopt
- name: Copy CI gradle.properties
run: |
mkdir -p ~/.gradle
cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties
- name: Build app
- name: Build app and run unit tests
uses: gradle/gradle-command-action@v2
with:
arguments: assembleStandardRelease
arguments: assembleStandardRelease testStandardReleaseUnitTest
# Sign APK and create release for tags
@ -77,6 +71,10 @@ jobs:
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
cp app/build/outputs/apk/standard/release/app-standard-x86_64-release-unsigned-signed.apk tachiyomi-x86_64-${{ env.VERSION_TAG }}.apk
sha=`sha256sum tachiyomi-x86_64-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
echo "APK_X86_64_SHA=$sha" >> $GITHUB_ENV
- name: Create Release
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'tachiyomiorg/tachiyomi'
@ -95,11 +93,13 @@ jobs:
| arm64-v8a | ${{ env.APK_ARM64_V8A_SHA }}
| armeabi-v7a | ${{ env.APK_ARMEABI_V7A_SHA }}
| x86 | ${{ env.APK_X86_SHA }} |
| x86_64 | ${{ env.APK_X86_64_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
tachiyomi-x86_64-${{ env.VERSION_TAG }}.apk
draft: true
prerelease: false
env:

View File

@ -1,16 +0,0 @@
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

@ -12,7 +12,7 @@ jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v3
- uses: dessant/lock-threads@v4
with:
github-token: ${{ github.token }}
issue-inactive-days: '2'

4
.gitignore vendored
View File

@ -12,5 +12,5 @@
*.apk
app/**/output.json
# Hebrew assets are copied on build
app/src/main/res/values-iw/
# Unnecessary file
*.swp

View File

@ -12,7 +12,7 @@ Features include:
* Online reading from a variety of sources
* Local reading of downloaded content
* A configurable reader with multiple viewers, reading directions and other settings.
* Tracker support: [MyAnimeList](https://myanimelist.net/), [AniList](https://anilist.co/), [Kitsu](https://kitsu.io/), [Shikimori](https://shikimori.one), and [Bangumi](https://bgm.tv/)
* Tracker support: [MyAnimeList](https://myanimelist.net/), [AniList](https://anilist.co/), [Kitsu](https://kitsu.io/), [MangaUpdates](https://mangaupdates.com), [Shikimori](https://shikimori.one), and [Bangumi](https://bgm.tv/) support
* Categories to organize your library
* Light and dark themes
* Schedule updating your library for new chapters

View File

@ -1,4 +1,6 @@
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jmailen.gradle.kotlinter.tasks.LintTask
plugins {
id("com.android.application")
@ -6,6 +8,7 @@ plugins {
kotlin("android")
kotlin("plugin.serialization")
id("com.github.zellius.shortcut-helper")
id("com.squareup.sqldelight")
}
if (gradle.startParameter.taskRequests.toString().contains("Standard")) {
@ -14,9 +17,10 @@ if (gradle.startParameter.taskRequests.toString().contains("Standard")) {
shortcutHelper.setFilePath("./shortcuts.xml")
val SUPPORTED_ABIS = setOf("armeabi-v7a", "arm64-v8a", "x86")
val SUPPORTED_ABIS = setOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
android {
namespace = "eu.kanade.tachiyomi"
compileSdk = AndroidConfig.compileSdk
ndkVersion = AndroidConfig.ndk
@ -24,8 +28,8 @@ android {
applicationId = "eu.kanade.tachiyomi"
minSdk = AndroidConfig.minSdk
targetSdk = AndroidConfig.targetSdk
versionCode = 79
versionName = "0.13.3"
versionCode = 93
versionName = "0.14.3"
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
@ -56,6 +60,7 @@ android {
named("debug") {
versionNameSuffix = "-${getCommitCount()}"
applicationIdSuffix = ".debug"
isPseudoLocalesEnabled = true
}
named("release") {
isShrinkResources = true
@ -70,11 +75,22 @@ android {
signingConfig = debugType.signingConfig
versionNameSuffix = debugType.versionNameSuffix
applicationIdSuffix = debugType.applicationIdSuffix
matchingFallbacks.add("release")
}
create("benchmark") {
initWith(getByName("release"))
signingConfig = signingConfigs.getByName("debug")
matchingFallbacks.add("release")
isDebuggable = false
versionNameSuffix = "-benchmark"
applicationIdSuffix = ".benchmark"
}
}
sourceSets {
getByName("preview").res.srcDirs("src/debug/res")
getByName("benchmark").res.srcDirs("src/debug/res")
}
flavorDimensions.add("default")
@ -85,7 +101,8 @@ android {
dimension = "default"
}
create("dev") {
resourceConfigurations.addAll(listOf("en", "xxhdpi"))
// Include pseudolocales: https://developer.android.com/guide/topics/resources/pseudolocales
resourceConfigurations.addAll(listOf("en", "en_XA", "ar_XB", "xxhdpi"))
dimension = "default"
}
}
@ -99,7 +116,6 @@ android {
"META-INF/README.md",
"META-INF/NOTICE",
"META-INF/*.kotlin_module",
"META-INF/*.version",
))
}
@ -109,6 +125,7 @@ android {
buildFeatures {
viewBinding = true
compose = true
// Disable some unused things
aidl = false
@ -117,29 +134,70 @@ android {
}
lint {
disable.addAll(listOf("MissingTranslation", "ExtraTranslation"))
abortOnError = false
checkReleaseBuilds = false
}
composeOptions {
kotlinCompilerExtensionVersion = compose.versions.compiler.get()
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
isCoreLibraryDesugaringEnabled = true
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
sqldelight {
database("Database") {
packageName = "eu.kanade.tachiyomi"
dialect = "sqlite:3.24"
}
}
}
dependencies {
implementation(project(":i18n"))
implementation(project(":core"))
implementation(project(":source-api"))
coreLibraryDesugaring(libs.desugar)
// Compose
implementation(platform(compose.bom))
implementation(compose.activity)
implementation(compose.foundation)
implementation(compose.material3.core)
implementation(compose.material.core)
implementation(compose.material.icons)
implementation(compose.animation)
implementation(compose.animation.graphics)
implementation(compose.ui.tooling)
implementation(compose.ui.util)
implementation(compose.accompanist.webview)
implementation(compose.accompanist.flowlayout)
implementation(compose.accompanist.permissions)
implementation(compose.accompanist.themeadapter)
implementation(compose.accompanist.systemuicontroller)
implementation(androidx.paging.runtime)
implementation(androidx.paging.compose)
implementation(libs.bundles.sqlite)
implementation(libs.sqldelight.android.driver)
implementation(libs.sqldelight.coroutines)
implementation(libs.sqldelight.android.paging)
implementation(kotlinx.reflect)
implementation(platform(kotlinx.coroutines.bom))
implementation(kotlinx.bundles.coroutines)
// Source models and interfaces from Tachiyomi 1.x
implementation(libs.tachiyomi.api)
// AndroidX libraries
implementation(androidx.annotation)
implementation(androidx.appcompat)
@ -149,8 +207,9 @@ dependencies {
implementation(androidx.corektx)
implementation(androidx.splashscreen)
implementation(androidx.recyclerview)
implementation(androidx.swiperefreshlayout)
implementation(androidx.viewpager)
implementation(androidx.glance)
implementation(androidx.profileinstaller)
implementation(androidx.bundles.lifecycle)
@ -171,9 +230,6 @@ dependencies {
// Data serialization (JSON, protobuf)
implementation(kotlinx.bundles.serialization)
// JavaScript engine
implementation(libs.bundles.js.engine)
// HTML parser
implementation(libs.jsoup)
@ -182,24 +238,14 @@ dependencies {
implementation(libs.unifile)
implementation(libs.junrar)
// Database
implementation(libs.bundles.sqlite)
implementation("com.github.inorichi.storio:storio-common:8be19de@aar")
implementation("com.github.inorichi.storio:storio-sqlite:8be19de@aar")
// Preferences
implementation(libs.preferencektx)
implementation(libs.flowpreferences)
// Model View Presenter
implementation(libs.bundles.nucleus)
// Dependency injection
implementation(libs.injekt.core)
// Image loading
implementation(libs.bundles.coil)
implementation(libs.subsamplingscaleimageview) {
exclude(module = "image-decoder")
}
@ -210,21 +256,19 @@ dependencies {
// 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)
// Conductor
implementation(libs.bundles.conductor)
// FlowBinding
implementation(libs.bundles.flowbinding)
implementation(libs.bundles.richtext)
implementation(libs.aboutLibraries.compose)
implementation(libs.cascade)
implementation(libs.bundles.voyager)
implementation(libs.wheelpicker)
implementation(libs.materialmotion.core)
// Logging
implementation(libs.logcat)
@ -233,47 +277,79 @@ dependencies {
implementation(libs.acra.http)
"standardImplementation"(libs.firebase.analytics)
// Licenses
implementation(libs.aboutlibraries.core)
// Shizuku
implementation(libs.bundles.shizuku)
// Tests
testImplementation(libs.junit)
testImplementation(libs.assertj.core)
testImplementation(libs.mockito.core)
testImplementation(libs.bundles.robolectric)
// For detecting memory leaks; see https://square.github.io/leakcanary/
// debugImplementation(libs.leakcanary.android)
implementation(libs.leakcanary.plumber)
}
androidComponents {
beforeVariants { variantBuilder ->
// Disables standardBenchmark
if (variantBuilder.buildType == "benchmark") {
variantBuilder.enable = variantBuilder.productFlavors.containsAll(listOf("default" to "dev"))
}
}
onVariants(selector().withFlavor("default" to "standard")) {
// Only excluding in standard flavor because this breaks
// Layout Inspector's Compose tree
it.packaging.resources.excludes.add("META-INF/*.version")
}
}
tasks {
withType<Test> {
useJUnitPlatform()
testLogging {
events(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
}
}
withType<LintTask>().configureEach {
exclude { it.file.path.contains("generated[\\\\/]".toRegex()) }
}
// See https://kotlinlang.org/docs/reference/experimental.html#experimental-status-of-experimental-api(-markers)
withType<KotlinCompile> {
kotlinOptions.freeCompilerArgs += listOf(
"-Xopt-in=kotlin.Experimental",
"-Xopt-in=kotlin.RequiresOptIn",
"-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",
"-opt-in=coil.annotation.ExperimentalCoilApi",
"-opt-in=com.google.accompanist.permissions.ExperimentalPermissionsApi",
"-opt-in=androidx.compose.foundation.layout.ExperimentalLayoutApi",
"-opt-in=androidx.compose.material.ExperimentalMaterialApi",
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
"-opt-in=androidx.compose.material.ExperimentalMaterialApi",
"-opt-in=androidx.compose.ui.ExperimentalComposeUiApi",
"-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
"-opt-in=androidx.compose.animation.ExperimentalAnimationApi",
"-opt-in=androidx.compose.animation.graphics.ExperimentalAnimationGraphicsApi",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=kotlinx.coroutines.FlowPreview",
"-opt-in=kotlinx.coroutines.InternalCoroutinesApi",
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
)
}
// Duplicating Hebrew string assets due to some locale code issues on different devices
val copyHebrewStrings = task("copyHebrewStrings", type = Copy::class) {
from("./src/main/res/values-he")
into("./src/main/res/values-iw")
include("**/*")
if (project.findProperty("tachiyomi.enableComposeCompilerMetrics") == "true") {
kotlinOptions.freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
project.buildDir.absolutePath + "/compose_metrics"
)
kotlinOptions.freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
project.buildDir.absolutePath + "/compose_metrics"
)
}
}
preBuild {
dependsOn(formatKotlin, copyHebrewStrings)
val ktlintTask = if (System.getenv("GITHUB_BASE_REF") == null) formatKotlin else lintKotlin
dependsOn(ktlintTask)
}
}

View File

@ -1,4 +1,3 @@
-allowaccessmodification
-dontusemixedcaseclassnames
-verbose

View File

@ -1,20 +1,25 @@
-dontobfuscate
# Keep extension's common dependencies
-keep,allowoptimization class eu.kanade.tachiyomi.** { public protected *; }
-keep,allowoptimization class androidx.preference.** { *; }
# Keep common dependencies used in extensions
-keep,allowoptimization class androidx.preference.** { public protected *; }
-keep,allowoptimization class kotlin.** { public protected *; }
-keep,allowoptimization class kotlinx.coroutines.** { public protected *; }
-keep,allowoptimization class kotlinx.serialization.** { public protected *; }
-keep,allowoptimization class okhttp3.** { public protected *; }
-keep,allowoptimization class okio.** { public protected *; }
-keep,allowoptimization class rx.** { public protected *; }
-keep,allowoptimization class org.jsoup.** { public protected *; }
-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 *; }
# From extensions-lib
-keep,allowoptimization class eu.kanade.tachiyomi.network.interceptor.RateLimitInterceptorKt { public protected *; }
-keep,allowoptimization class eu.kanade.tachiyomi.network.interceptor.SpecificHostRateLimitInterceptorKt { public protected *; }
-keep,allowoptimization class eu.kanade.tachiyomi.network.NetworkHelper { public protected *; }
-keep,allowoptimization class eu.kanade.tachiyomi.network.OkHttpExtensionsKt { public protected *; }
-keep,allowoptimization class eu.kanade.tachiyomi.network.RequestsKt { public protected *; }
-keep,allowoptimization class eu.kanade.tachiyomi.AppInfo { public protected *; }
##---------------Begin: proguard configuration for RxJava 1.x ----------
-dontwarn sun.misc.**
@ -34,30 +39,6 @@
-dontnote rx.internal.util.PlatformDependent
##---------------End: proguard configuration for RxJava 1.x ----------
##---------------Begin: proguard configuration for Gson ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
# Gson specific classes
-dontwarn sun.misc.**
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * extends com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}
##---------------End: proguard configuration for Gson ----------
##---------------Begin: proguard configuration for kotlinx.serialization ----------
-keepattributes *Annotation*, InnerClasses
-dontnote kotlinx.serialization.AnnotationsKt # core serialization annotations
@ -70,11 +51,11 @@
kotlinx.serialization.KSerializer serializer(...);
}
-keep,includedescriptorclasses class eu.kanade.tachiyomi.**$$serializer { *; }
-keepclassmembers class eu.kanade.tachiyomi.** {
-keep,includedescriptorclasses class eu.kanade.**$$serializer { *; }
-keepclassmembers class eu.kanade.** {
*** Companion;
}
-keepclasseswithmembers class eu.kanade.tachiyomi.** {
-keepclasseswithmembers class eu.kanade.** {
kotlinx.serialization.KSerializer serializer(...);
}
@ -83,3 +64,6 @@
<methods>;
}
##---------------End: proguard configuration for kotlinx.serialization ----------
# XmlUtil
-keep public enum nl.adaptivity.xmlutil.EventType { *; }

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

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="eu.kanade.tachiyomi">
xmlns:tools="http://schemas.android.com/tools">
<!-- Internet -->
<uses-permission android:name="android.permission.INTERNET" />
@ -22,6 +22,13 @@
<!-- To view extension packages in API 30+ -->
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.READ_APP_SPECIFIC_LOCALES" />
<!-- Remove permission from Firebase dependency -->
<uses-permission android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" />
<application
android:name=".App"
android:allowBackup="false"
@ -29,12 +36,18 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:localeConfig="@xml/locales_config"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:theme="@style/Theme.Tachiyomi"
android:supportsRtl="true"
android:networkSecurityConfig="@xml/network_security_config">
<!-- enable profiling by macrobenchmark -->
<profileable
android:shell="true"
tools:targetApi="q" />
<activity
android:name=".ui.main.MainActivity"
android:launchMode="singleTop"
@ -49,6 +62,12 @@
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity>
<activity
android:process=":error_handler"
android:name=".crash.CrashActivity"
android:exported="false" />
<activity
android:name=".ui.main.DeepLinkActivity"
android:launchMode="singleTask"
@ -168,6 +187,20 @@
android:name=".data.notification.NotificationReceiver"
android:exported="false" />
<receiver
android:name=".glance.UpdatesGridGlanceReceiver"
android:enabled="@bool/glance_appwidget_available"
android:exported="false"
android:label="@string/label_recent_updates">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/updates_grid_glance_widget_info" />
</receiver>
<service
android:name=".data.library.LibraryUpdateService"
android:exported="false" />
@ -187,6 +220,15 @@
<service android:name=".extension.util.ExtensionInstallService"
android:exported="false" />
<service
android:name="androidx.appcompat.app.AppLocalesMetadataHolderService"
android:enabled="false"
android:exported="false">
<meta-data
android:name="autoStoreLocales"
android:value="true" />
</service>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
@ -205,11 +247,18 @@
android:exported="true"
android:permission="android.permission.INTERACT_ACROSS_USERS_FULL" />
<meta-data android:name="android.webkit.WebView.EnableSafeBrowsing"
<meta-data
android:name="android.webkit.WebView.EnableSafeBrowsing"
android:value="false" />
<meta-data android:name="android.webkit.WebView.MetricsOptOut"
<meta-data
android:name="android.webkit.WebView.MetricsOptOut"
android:value="true" />
<!-- Disable advertising ID collection for Firebase -->
<meta-data
android:name="google_analytics_adid_collection_enabled"
android:value="false" />
</application>
</manifest>

22513
app/src/main/baseline-prof.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,55 @@
package eu.kanade.core.prefs
import androidx.compose.ui.state.ToggleableState
sealed class CheckboxState<T>(open val value: T) {
abstract fun next(): CheckboxState<T>
sealed class State<T>(override val value: T) : CheckboxState<T>(value) {
data class Checked<T>(override val value: T) : State<T>(value)
data class None<T>(override val value: T) : State<T>(value)
val isChecked: Boolean
get() = this is Checked
override fun next(): CheckboxState<T> {
return when (this) {
is Checked -> None(value)
is None -> Checked(value)
}
}
}
sealed class TriState<T>(override val value: T) : CheckboxState<T>(value) {
data class Include<T>(override val value: T) : TriState<T>(value)
data class Exclude<T>(override val value: T) : TriState<T>(value)
data class None<T>(override val value: T) : TriState<T>(value)
override fun next(): CheckboxState<T> {
return when (this) {
is Exclude -> None(value)
is Include -> Exclude(value)
is None -> Include(value)
}
}
fun asState(): ToggleableState {
return when (this) {
is Exclude -> ToggleableState.Indeterminate
is Include -> ToggleableState.On
is None -> ToggleableState.Off
}
}
}
}
inline fun <T> T.asCheckboxState(condition: (T) -> Boolean): CheckboxState.State<T> {
return if (condition(this)) {
CheckboxState.State.Checked(this)
} else {
CheckboxState.State.None(this)
}
}
inline fun <T> List<T>.mapAsCheckboxState(condition: (T) -> Boolean): List<CheckboxState.State<T>> {
return this.map { it.asCheckboxState(condition) }
}

View File

@ -0,0 +1,38 @@
package eu.kanade.core.prefs
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.mutableStateOf
import eu.kanade.tachiyomi.core.preference.Preference
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
class PreferenceMutableState<T>(
private val preference: Preference<T>,
scope: CoroutineScope,
) : MutableState<T> {
private val state = mutableStateOf(preference.get())
init {
preference.changes()
.onEach { state.value = it }
.launchIn(scope)
}
override var value: T
get() = state.value
set(value) {
preference.set(value)
}
override fun component1(): T {
return state.value
}
override fun component2(): (T) -> Unit {
return { preference.set(it) }
}
}
fun <T> Preference<T>.asState(scope: CoroutineScope) = PreferenceMutableState(this, scope)

View File

@ -0,0 +1,148 @@
package eu.kanade.core.util
import androidx.compose.ui.util.fastForEach
import java.util.concurrent.ConcurrentHashMap
import kotlin.contracts.ExperimentalContracts
import kotlin.contracts.contract
fun <T : R, R : Any> List<T>.insertSeparators(
generator: (T?, T?) -> R?,
): List<R> {
if (isEmpty()) return emptyList()
val newList = mutableListOf<R>()
for (i in -1..lastIndex) {
val before = getOrNull(i)
before?.let { newList.add(it) }
val after = getOrNull(i + 1)
val separator = generator.invoke(before, after)
separator?.let { newList.add(it) }
}
return newList
}
/**
* Returns a new map containing only the key entries of [transform] that are not null.
*/
inline fun <K, V, R> Map<out K, V>.mapNotNullKeys(transform: (Map.Entry<K?, V>) -> R?): ConcurrentHashMap<R, V> {
val mutableMap = ConcurrentHashMap<R, V>()
forEach { element -> transform(element)?.let { mutableMap[it] = element.value } }
return mutableMap
}
fun <E> HashSet<E>.addOrRemove(value: E, shouldAdd: Boolean) {
if (shouldAdd) {
add(value)
} else {
remove(value)
}
}
/**
* Returns a list containing only elements matching the given [predicate].
*
* **Do not use for collections that come from public APIs**, since they may not support random
* access in an efficient way, and this method may actually be a lot slower. Only use for
* collections that are created by code we control and are known to support random access.
*/
@OptIn(ExperimentalContracts::class)
inline fun <T> List<T>.fastFilter(predicate: (T) -> Boolean): List<T> {
contract { callsInPlace(predicate) }
val destination = ArrayList<T>()
fastForEach { if (predicate(it)) destination.add(it) }
return destination
}
/**
* Returns a list containing all elements not matching the given [predicate].
*
* **Do not use for collections that come from public APIs**, since they may not support random
* access in an efficient way, and this method may actually be a lot slower. Only use for
* collections that are created by code we control and are known to support random access.
*/
@OptIn(ExperimentalContracts::class)
inline fun <T> List<T>.fastFilterNot(predicate: (T) -> Boolean): List<T> {
contract { callsInPlace(predicate) }
val destination = ArrayList<T>()
fastForEach { if (!predicate(it)) destination.add(it) }
return destination
}
/**
* Returns a list containing only the non-null results of applying the
* given [transform] function to each element in the original collection.
*
* **Do not use for collections that come from public APIs**, since they may not support random
* access in an efficient way, and this method may actually be a lot slower. Only use for
* collections that are created by code we control and are known to support random access.
*/
@OptIn(ExperimentalContracts::class)
inline fun <T, R> List<T>.fastMapNotNull(transform: (T) -> R?): List<R> {
contract { callsInPlace(transform) }
val destination = ArrayList<R>()
fastForEach { element ->
transform(element)?.let { destination.add(it) }
}
return destination
}
/**
* Splits the original collection into pair of lists,
* where *first* list contains elements for which [predicate] yielded `true`,
* while *second* list contains elements for which [predicate] yielded `false`.
*
* **Do not use for collections that come from public APIs**, since they may not support random
* access in an efficient way, and this method may actually be a lot slower. Only use for
* collections that are created by code we control and are known to support random access.
*/
@OptIn(ExperimentalContracts::class)
inline fun <T> List<T>.fastPartition(predicate: (T) -> Boolean): Pair<List<T>, List<T>> {
contract { callsInPlace(predicate) }
val first = ArrayList<T>()
val second = ArrayList<T>()
fastForEach {
if (predicate(it)) {
first.add(it)
} else {
second.add(it)
}
}
return Pair(first, second)
}
/**
* Returns the number of entries not matching the given [predicate].
*
* **Do not use for collections that come from public APIs**, since they may not support random
* access in an efficient way, and this method may actually be a lot slower. Only use for
* collections that are created by code we control and are known to support random access.
*/
@OptIn(ExperimentalContracts::class)
inline fun <T> List<T>.fastCountNot(predicate: (T) -> Boolean): Int {
contract { callsInPlace(predicate) }
var count = size
fastForEach { if (predicate(it)) --count }
return count
}
/**
* Returns a list containing only elements from the given collection
* having distinct keys returned by the given [selector] function.
*
* Among elements of the given collection with equal keys, only the first one will be present in the resulting list.
* The elements in the resulting list are in the same order as they were in the source collection.
*
* **Do not use for collections that come from public APIs**, since they may not support random
* access in an efficient way, and this method may actually be a lot slower. Only use for
* collections that are created by code we control and are known to support random access.
*/
@OptIn(ExperimentalContracts::class)
inline fun <T, K> List<T>.fastDistinctBy(selector: (T) -> K): List<T> {
contract { callsInPlace(selector) }
val set = HashSet<K>()
val list = ArrayList<T>()
fastForEach {
val key = selector(it)
if (set.add(key)) list.add(it)
}
return list
}

View File

@ -0,0 +1,16 @@
package eu.kanade.core.util
import android.content.Context
import eu.kanade.tachiyomi.R
import kotlin.time.Duration
fun Duration.toDurationString(context: Context, fallback: String): String {
return toComponents { days, hours, minutes, seconds, _ ->
buildList(4) {
if (days != 0L) add(context.getString(R.string.day_short, days))
if (hours != 0) add(context.getString(R.string.hour_short, hours))
if (minutes != 0 && (days == 0L || hours == 0)) add(context.getString(R.string.minute_short, minutes))
if (seconds != 0 && days == 0L && hours == 0) add(context.getString(R.string.seconds_short, seconds))
}.joinToString(" ").ifBlank { fallback }
}
}

View File

@ -0,0 +1,61 @@
package eu.kanade.core.util
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.CoroutineStart
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.callbackFlow
import kotlinx.coroutines.launch
import rx.Emitter
import rx.Observable
import rx.Observer
import kotlin.coroutines.CoroutineContext
fun <T : Any> Observable<T>.asFlow(): Flow<T> = callbackFlow {
val observer = object : Observer<T> {
override fun onNext(t: T) {
trySend(t)
}
override fun onError(e: Throwable) {
close(e)
}
override fun onCompleted() {
close()
}
}
val subscription = subscribe(observer)
awaitClose { subscription.unsubscribe() }
}
fun <T : Any> Flow<T>.asObservable(
context: CoroutineContext = Dispatchers.Unconfined,
backpressureMode: Emitter.BackpressureMode = Emitter.BackpressureMode.NONE,
): Observable<T> {
return Observable.create(
{ emitter ->
/*
* ATOMIC is used here to provide stable behaviour of subscribe+dispose pair even if
* asObservable is already invoked from unconfined
*/
val job = GlobalScope.launch(context = context, start = CoroutineStart.ATOMIC) {
try {
collect { emitter.onNext(it) }
emitter.onCompleted()
} catch (e: Throwable) {
// Ignore `CancellationException` as error, since it indicates "normal cancellation"
if (e !is CancellationException) {
emitter.onError(e)
} else {
emitter.onCompleted()
}
}
}
emitter.setCancellation { job.cancel() }
},
backpressureMode,
)
}

View File

@ -0,0 +1,90 @@
package eu.kanade.data
import androidx.paging.PagingSource
import com.squareup.sqldelight.Query
import com.squareup.sqldelight.db.SqlDriver
import com.squareup.sqldelight.runtime.coroutines.asFlow
import com.squareup.sqldelight.runtime.coroutines.mapToList
import com.squareup.sqldelight.runtime.coroutines.mapToOne
import com.squareup.sqldelight.runtime.coroutines.mapToOneOrNull
import eu.kanade.tachiyomi.Database
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.withContext
class AndroidDatabaseHandler(
val db: Database,
private val driver: SqlDriver,
val queryDispatcher: CoroutineDispatcher = Dispatchers.IO,
val transactionDispatcher: CoroutineDispatcher = queryDispatcher,
) : DatabaseHandler {
val suspendingTransactionId = ThreadLocal<Int>()
override suspend fun <T> await(inTransaction: Boolean, block: suspend Database.() -> T): T {
return dispatch(inTransaction, block)
}
override suspend fun <T : Any> awaitList(
inTransaction: Boolean,
block: suspend Database.() -> Query<T>,
): List<T> {
return dispatch(inTransaction) { block(db).executeAsList() }
}
override suspend fun <T : Any> awaitOne(
inTransaction: Boolean,
block: suspend Database.() -> Query<T>,
): T {
return dispatch(inTransaction) { block(db).executeAsOne() }
}
override suspend fun <T : Any> awaitOneOrNull(
inTransaction: Boolean,
block: suspend Database.() -> Query<T>,
): T? {
return dispatch(inTransaction) { block(db).executeAsOneOrNull() }
}
override fun <T : Any> subscribeToList(block: Database.() -> Query<T>): Flow<List<T>> {
return block(db).asFlow().mapToList(queryDispatcher)
}
override fun <T : Any> subscribeToOne(block: Database.() -> Query<T>): Flow<T> {
return block(db).asFlow().mapToOne(queryDispatcher)
}
override fun <T : Any> subscribeToOneOrNull(block: Database.() -> Query<T>): Flow<T?> {
return block(db).asFlow().mapToOneOrNull(queryDispatcher)
}
override fun <T : Any> subscribeToPagingSource(
countQuery: Database.() -> Query<Long>,
queryProvider: Database.(Long, Long) -> Query<T>,
): PagingSource<Long, T> {
return QueryPagingSource(
handler = this,
countQuery = countQuery,
queryProvider = { limit, offset ->
queryProvider.invoke(db, limit, offset)
},
)
}
private suspend fun <T> dispatch(inTransaction: Boolean, block: suspend Database.() -> T): T {
// Create a transaction if needed and run the calling block inside it.
if (inTransaction) {
return withTransaction { block(db) }
}
// If we're currently in the transaction thread, there's no need to dispatch our query.
if (driver.currentTransaction() != null) {
return block(db)
}
// Get the current database context and run the calling block.
val context = getCurrentDatabaseContext()
return withContext(context) { block(db) }
}
}

View File

@ -0,0 +1,30 @@
package eu.kanade.data
import com.squareup.sqldelight.ColumnAdapter
import eu.kanade.tachiyomi.source.model.UpdateStrategy
import java.util.Date
val dateAdapter = object : ColumnAdapter<Date, Long> {
override fun decode(databaseValue: Long): Date = Date(databaseValue)
override fun encode(value: Date): Long = value.time
}
private const val listOfStringsSeparator = ", "
val listOfStringsAdapter = object : ColumnAdapter<List<String>, String> {
override fun decode(databaseValue: String) =
if (databaseValue.isEmpty()) {
emptyList()
} else {
databaseValue.split(listOfStringsSeparator)
}
override fun encode(value: List<String>) = value.joinToString(separator = listOfStringsSeparator)
}
val updateStrategyAdapter = object : ColumnAdapter<UpdateStrategy, Long> {
private val enumValues by lazy { UpdateStrategy.values() }
override fun decode(databaseValue: Long): UpdateStrategy =
enumValues.getOrElse(databaseValue.toInt()) { UpdateStrategy.ALWAYS_UPDATE }
override fun encode(value: UpdateStrategy): Long = value.ordinal.toLong()
}

View File

@ -0,0 +1,37 @@
package eu.kanade.data
import androidx.paging.PagingSource
import com.squareup.sqldelight.Query
import eu.kanade.tachiyomi.Database
import kotlinx.coroutines.flow.Flow
interface DatabaseHandler {
suspend fun <T> await(inTransaction: Boolean = false, block: suspend Database.() -> T): T
suspend fun <T : Any> awaitList(
inTransaction: Boolean = false,
block: suspend Database.() -> Query<T>,
): List<T>
suspend fun <T : Any> awaitOne(
inTransaction: Boolean = false,
block: suspend Database.() -> Query<T>,
): T
suspend fun <T : Any> awaitOneOrNull(
inTransaction: Boolean = false,
block: suspend Database.() -> Query<T>,
): T?
fun <T : Any> subscribeToList(block: Database.() -> Query<T>): Flow<List<T>>
fun <T : Any> subscribeToOne(block: Database.() -> Query<T>): Flow<T>
fun <T : Any> subscribeToOneOrNull(block: Database.() -> Query<T>): Flow<T?>
fun <T : Any> subscribeToPagingSource(
countQuery: Database.() -> Query<Long>,
queryProvider: Database.(Long, Long) -> Query<T>,
): PagingSource<Long, T>
}

View File

@ -0,0 +1,72 @@
package eu.kanade.data
import androidx.paging.PagingSource
import androidx.paging.PagingState
import com.squareup.sqldelight.Query
import eu.kanade.tachiyomi.Database
import kotlin.properties.Delegates
class QueryPagingSource<RowType : Any>(
val handler: DatabaseHandler,
val countQuery: Database.() -> Query<Long>,
val queryProvider: Database.(Long, Long) -> Query<RowType>,
) : PagingSource<Long, RowType>(), Query.Listener {
override val jumpingSupported: Boolean = true
private var currentQuery: Query<RowType>? by Delegates.observable(null) { _, old, new ->
old?.removeListener(this)
new?.addListener(this)
}
init {
registerInvalidatedCallback {
currentQuery?.removeListener(this)
currentQuery = null
}
}
override suspend fun load(params: LoadParams<Long>): LoadResult<Long, RowType> {
try {
val key = params.key ?: 0L
val loadSize = params.loadSize
val count = handler.awaitOne { countQuery() }
val (offset, limit) = when (params) {
is LoadParams.Prepend -> key - loadSize to loadSize.toLong()
else -> key to loadSize.toLong()
}
val data = handler.awaitList {
queryProvider(limit, offset)
.also { currentQuery = it }
}
val (prevKey, nextKey) = when (params) {
is LoadParams.Append -> { offset - loadSize to offset + loadSize }
else -> { offset to offset + loadSize }
}
return LoadResult.Page(
data = data,
prevKey = if (offset <= 0L || prevKey < 0L) null else prevKey,
nextKey = if (offset + loadSize >= count) null else nextKey,
itemsBefore = maxOf(0L, offset).toInt(),
itemsAfter = maxOf(0L, count - (offset + loadSize)).toInt(),
)
} catch (e: Exception) {
return LoadResult.Error(throwable = e)
}
}
override fun getRefreshKey(state: PagingState<Long, RowType>): Long? {
return state.anchorPosition?.let { anchorPosition ->
val anchorPage = state.closestPageToPosition(anchorPosition)
anchorPage?.prevKey ?: anchorPage?.nextKey
}
}
override fun queryResultsChanged() {
invalidate()
}
}

View File

@ -0,0 +1,161 @@
package eu.kanade.data
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Job
import kotlinx.coroutines.asContextElement
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.suspendCancellableCoroutine
import kotlinx.coroutines.withContext
import java.util.concurrent.RejectedExecutionException
import java.util.concurrent.atomic.AtomicInteger
import kotlin.coroutines.ContinuationInterceptor
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext
import kotlin.coroutines.coroutineContext
import kotlin.coroutines.resume
/**
* Returns the transaction dispatcher if we are on a transaction, or the database dispatchers.
*/
internal suspend fun AndroidDatabaseHandler.getCurrentDatabaseContext(): CoroutineContext {
return coroutineContext[TransactionElement]?.transactionDispatcher ?: queryDispatcher
}
/**
* Calls the specified suspending [block] in a database transaction. The transaction will be
* marked as successful unless an exception is thrown in the suspending [block] or the coroutine
* is cancelled.
*
* SQLDelight will only perform at most one transaction at a time, additional transactions are queued
* and executed on a first come, first serve order.
*
* Performing blocking database operations is not permitted in a coroutine scope other than the
* one received by the suspending block. It is recommended that all [Dao] function invoked within
* the [block] be suspending functions.
*
* The dispatcher used to execute the given [block] will utilize threads from SQLDelight's query executor.
*/
internal suspend fun <T> AndroidDatabaseHandler.withTransaction(block: suspend () -> T): T {
// Use inherited transaction context if available, this allows nested suspending transactions.
val transactionContext =
coroutineContext[TransactionElement]?.transactionDispatcher ?: createTransactionContext()
return withContext(transactionContext) {
val transactionElement = coroutineContext[TransactionElement]!!
transactionElement.acquire()
try {
db.transactionWithResult {
runBlocking(transactionContext) {
block()
}
}
} finally {
transactionElement.release()
}
}
}
/**
* Creates a [CoroutineContext] for performing database operations within a coroutine transaction.
*
* The context is a combination of a dispatcher, a [TransactionElement] and a thread local element.
*
* * The dispatcher will dispatch coroutines to a single thread that is taken over from the SQLDelight
* query executor. If the coroutine context is switched, suspending DAO functions will be able to
* dispatch to the transaction thread.
*
* * The [TransactionElement] serves as an indicator for inherited context, meaning, if there is a
* switch of context, suspending DAO methods will be able to use the indicator to dispatch the
* database operation to the transaction thread.
*
* * The thread local element serves as a second indicator and marks threads that are used to
* execute coroutines within the coroutine transaction, more specifically it allows us to identify
* if a blocking DAO method is invoked within the transaction coroutine. Never assign meaning to
* this value, for now all we care is if its present or not.
*/
private suspend fun AndroidDatabaseHandler.createTransactionContext(): CoroutineContext {
val controlJob = Job()
// make sure to tie the control job to this context to avoid blocking the transaction if
// context get cancelled before we can even start using this job. Otherwise, the acquired
// transaction thread will forever wait for the controlJob to be cancelled.
// see b/148181325
coroutineContext[Job]?.invokeOnCompletion {
controlJob.cancel()
}
val dispatcher = transactionDispatcher.acquireTransactionThread(controlJob)
val transactionElement = TransactionElement(controlJob, dispatcher)
val threadLocalElement =
suspendingTransactionId.asContextElement(System.identityHashCode(controlJob))
return dispatcher + transactionElement + threadLocalElement
}
/**
* Acquires a thread from the executor and returns a [ContinuationInterceptor] to dispatch
* coroutines to the acquired thread. The [controlJob] is used to control the release of the
* thread by cancelling the job.
*/
private suspend fun CoroutineDispatcher.acquireTransactionThread(
controlJob: Job,
): ContinuationInterceptor {
return suspendCancellableCoroutine { continuation ->
continuation.invokeOnCancellation {
// We got cancelled while waiting to acquire a thread, we can't stop our attempt to
// acquire a thread, but we can cancel the controlling job so once it gets acquired it
// is quickly released.
controlJob.cancel()
}
try {
dispatch(EmptyCoroutineContext) {
runBlocking {
// Thread acquired, resume coroutine
continuation.resume(coroutineContext[ContinuationInterceptor]!!)
controlJob.join()
}
}
} catch (ex: RejectedExecutionException) {
// Couldn't acquire a thread, cancel coroutine
continuation.cancel(
IllegalStateException(
"Unable to acquire a thread to perform the database transaction",
ex,
),
)
}
}
}
/**
* A [CoroutineContext.Element] that indicates there is an on-going database transaction.
*/
private class TransactionElement(
private val transactionThreadControlJob: Job,
val transactionDispatcher: ContinuationInterceptor,
) : CoroutineContext.Element {
companion object Key : CoroutineContext.Key<TransactionElement>
override val key: CoroutineContext.Key<TransactionElement>
get() = TransactionElement
/**
* Number of transactions (including nested ones) started with this element.
* Call [acquire] to increase the count and [release] to decrease it. If the count reaches zero
* when [release] is invoked then the transaction job is cancelled and the transaction thread
* is released.
*/
private val referenceCount = AtomicInteger(0)
fun acquire() {
referenceCount.incrementAndGet()
}
fun release() {
val count = referenceCount.decrementAndGet()
if (count < 0) {
throw IllegalStateException("Transaction was never started or was already released")
} else if (count == 0) {
// Cancel the job that controls the transaction thread, causing it to be released.
transactionThreadControlJob.cancel()
}
}
}

View File

@ -0,0 +1,12 @@
package eu.kanade.data.category
import eu.kanade.domain.category.model.Category
val categoryMapper: (Long, String, Long, Long) -> Category = { id, name, order, flags ->
Category(
id = id,
name = name,
order = order,
flags = flags,
)
}

View File

@ -0,0 +1,84 @@
package eu.kanade.data.category
import eu.kanade.data.DatabaseHandler
import eu.kanade.domain.category.model.Category
import eu.kanade.domain.category.model.CategoryUpdate
import eu.kanade.domain.category.repository.CategoryRepository
import eu.kanade.tachiyomi.Database
import kotlinx.coroutines.flow.Flow
class CategoryRepositoryImpl(
private val handler: DatabaseHandler,
) : CategoryRepository {
override suspend fun get(id: Long): Category? {
return handler.awaitOneOrNull { categoriesQueries.getCategory(id, categoryMapper) }
}
override suspend fun getAll(): List<Category> {
return handler.awaitList { categoriesQueries.getCategories(categoryMapper) }
}
override fun getAllAsFlow(): Flow<List<Category>> {
return handler.subscribeToList { categoriesQueries.getCategories(categoryMapper) }
}
override suspend fun getCategoriesByMangaId(mangaId: Long): List<Category> {
return handler.awaitList {
categoriesQueries.getCategoriesByMangaId(mangaId, categoryMapper)
}
}
override fun getCategoriesByMangaIdAsFlow(mangaId: Long): Flow<List<Category>> {
return handler.subscribeToList {
categoriesQueries.getCategoriesByMangaId(mangaId, categoryMapper)
}
}
override suspend fun insert(category: Category) {
handler.await {
categoriesQueries.insert(
name = category.name,
order = category.order,
flags = category.flags,
)
}
}
override suspend fun updatePartial(update: CategoryUpdate) {
handler.await {
updatePartialBlocking(update)
}
}
override suspend fun updatePartial(updates: List<CategoryUpdate>) {
handler.await(inTransaction = true) {
for (update in updates) {
updatePartialBlocking(update)
}
}
}
private fun Database.updatePartialBlocking(update: CategoryUpdate) {
categoriesQueries.update(
name = update.name,
order = update.order,
flags = update.flags,
categoryId = update.id,
)
}
override suspend fun updateAllFlags(flags: Long?) {
handler.await {
categoriesQueries.updateAllFlags(flags)
}
}
override suspend fun delete(categoryId: Long) {
handler.await {
categoriesQueries.delete(
categoryId = categoryId,
)
}
}
}

View File

@ -0,0 +1,21 @@
package eu.kanade.data.chapter
import eu.kanade.domain.chapter.model.Chapter
val chapterMapper: (Long, Long, String, String, String?, Boolean, Boolean, Long, Float, Long, Long, Long) -> Chapter =
{ id, mangaId, url, name, scanlator, read, bookmark, lastPageRead, chapterNumber, sourceOrder, dateFetch, dateUpload ->
Chapter(
id = id,
mangaId = mangaId,
read = read,
bookmark = bookmark,
lastPageRead = lastPageRead,
dateFetch = dateFetch,
sourceOrder = sourceOrder,
url = url,
name = name,
dateUpload = dateUpload,
chapterNumber = chapterNumber,
scanlator = scanlator,
)
}

View File

@ -0,0 +1,99 @@
package eu.kanade.data.chapter
import eu.kanade.data.DatabaseHandler
import eu.kanade.domain.chapter.model.Chapter
import eu.kanade.domain.chapter.model.ChapterUpdate
import eu.kanade.domain.chapter.repository.ChapterRepository
import eu.kanade.tachiyomi.util.system.logcat
import eu.kanade.tachiyomi.util.system.toLong
import kotlinx.coroutines.flow.Flow
import logcat.LogPriority
class ChapterRepositoryImpl(
private val handler: DatabaseHandler,
) : ChapterRepository {
override suspend fun addAll(chapters: List<Chapter>): List<Chapter> {
return try {
handler.await(inTransaction = true) {
chapters.map { chapter ->
chaptersQueries.insert(
chapter.mangaId,
chapter.url,
chapter.name,
chapter.scanlator,
chapter.read,
chapter.bookmark,
chapter.lastPageRead,
chapter.chapterNumber,
chapter.sourceOrder,
chapter.dateFetch,
chapter.dateUpload,
)
val lastInsertId = chaptersQueries.selectLastInsertedRowId().executeAsOne()
chapter.copy(id = lastInsertId)
}
}
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
emptyList()
}
}
override suspend fun update(chapterUpdate: ChapterUpdate) {
partialUpdate(chapterUpdate)
}
override suspend fun updateAll(chapterUpdates: List<ChapterUpdate>) {
partialUpdate(*chapterUpdates.toTypedArray())
}
private suspend fun partialUpdate(vararg chapterUpdates: ChapterUpdate) {
handler.await(inTransaction = true) {
chapterUpdates.forEach { chapterUpdate ->
chaptersQueries.update(
mangaId = chapterUpdate.mangaId,
url = chapterUpdate.url,
name = chapterUpdate.name,
scanlator = chapterUpdate.scanlator,
read = chapterUpdate.read?.toLong(),
bookmark = chapterUpdate.bookmark?.toLong(),
lastPageRead = chapterUpdate.lastPageRead,
chapterNumber = chapterUpdate.chapterNumber?.toDouble(),
sourceOrder = chapterUpdate.sourceOrder,
dateFetch = chapterUpdate.dateFetch,
dateUpload = chapterUpdate.dateUpload,
chapterId = chapterUpdate.id,
)
}
}
}
override suspend fun removeChaptersWithIds(chapterIds: List<Long>) {
try {
handler.await { chaptersQueries.removeChaptersWithIds(chapterIds) }
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
}
}
override suspend fun getChapterByMangaId(mangaId: Long): List<Chapter> {
return handler.awaitList { chaptersQueries.getChaptersByMangaId(mangaId, chapterMapper) }
}
override suspend fun getBookmarkedChaptersByMangaId(mangaId: Long): List<Chapter> {
return handler.awaitList { chaptersQueries.getBookmarkedChaptersByMangaId(mangaId, chapterMapper) }
}
override suspend fun getChapterById(id: Long): Chapter? {
return handler.awaitOneOrNull { chaptersQueries.getChapterById(id, chapterMapper) }
}
override suspend fun getChapterByMangaIdAsFlow(mangaId: Long): Flow<List<Chapter>> {
return handler.subscribeToList { chaptersQueries.getChaptersByMangaId(mangaId, chapterMapper) }
}
override suspend fun getChapterByUrlAndMangaId(url: String, mangaId: Long): Chapter? {
return handler.awaitOneOrNull { chaptersQueries.getChapterByUrlAndMangaId(url, mangaId, chapterMapper) }
}
}

View File

@ -0,0 +1,47 @@
package eu.kanade.data.chapter
object CleanupChapterName {
fun await(chapterName: String, mangaTitle: String): String {
return chapterName
.trim()
.removePrefix(mangaTitle)
.trim(*CHAPTER_TRIM_CHARS)
}
private val CHAPTER_TRIM_CHARS = arrayOf(
// Whitespace
' ',
'\u0009',
'\u000A',
'\u000B',
'\u000C',
'\u000D',
'\u0020',
'\u0085',
'\u00A0',
'\u1680',
'\u2000',
'\u2001',
'\u2002',
'\u2003',
'\u2004',
'\u2005',
'\u2006',
'\u2007',
'\u2008',
'\u2009',
'\u200A',
'\u2028',
'\u2029',
'\u202F',
'\u205F',
'\u3000',
// Separators
'-',
'_',
',',
':',
).toCharArray()
}

View File

@ -0,0 +1,3 @@
package eu.kanade.data.chapter
class NoChaptersException : Exception()

View File

@ -0,0 +1,35 @@
package eu.kanade.data.history
import eu.kanade.domain.history.model.History
import eu.kanade.domain.history.model.HistoryWithRelations
import eu.kanade.domain.manga.model.MangaCover
import java.util.Date
val historyMapper: (Long, Long, Date?, Long) -> History = { id, chapterId, readAt, readDuration ->
History(
id = id,
chapterId = chapterId,
readAt = readAt,
readDuration = readDuration,
)
}
val historyWithRelationsMapper: (Long, Long, Long, String, String?, Long, Boolean, Long, Float, Date?, Long) -> HistoryWithRelations = {
historyId, mangaId, chapterId, title, thumbnailUrl, sourceId, isFavorite, coverLastModified, chapterNumber, readAt, readDuration ->
HistoryWithRelations(
id = historyId,
chapterId = chapterId,
mangaId = mangaId,
title = title,
chapterNumber = chapterNumber,
readAt = readAt,
readDuration = readDuration,
coverData = MangaCover(
mangaId = mangaId,
sourceId = sourceId,
isMangaFavorite = isFavorite,
url = thumbnailUrl,
lastModified = coverLastModified,
),
)
}

View File

@ -0,0 +1,70 @@
package eu.kanade.data.history
import eu.kanade.data.DatabaseHandler
import eu.kanade.domain.history.model.HistoryUpdate
import eu.kanade.domain.history.model.HistoryWithRelations
import eu.kanade.domain.history.repository.HistoryRepository
import eu.kanade.tachiyomi.util.system.logcat
import kotlinx.coroutines.flow.Flow
import logcat.LogPriority
class HistoryRepositoryImpl(
private val handler: DatabaseHandler,
) : HistoryRepository {
override fun getHistory(query: String): Flow<List<HistoryWithRelations>> {
return handler.subscribeToList {
historyViewQueries.history(query, historyWithRelationsMapper)
}
}
override suspend fun getLastHistory(): HistoryWithRelations? {
return handler.awaitOneOrNull {
historyViewQueries.getLatestHistory(historyWithRelationsMapper)
}
}
override suspend fun getTotalReadDuration(): Long {
return handler.awaitOne { historyQueries.getReadDuration() }
}
override suspend fun resetHistory(historyId: Long) {
try {
handler.await { historyQueries.resetHistoryById(historyId) }
} catch (e: Exception) {
logcat(LogPriority.ERROR, throwable = e)
}
}
override suspend fun resetHistoryByMangaId(mangaId: Long) {
try {
handler.await { historyQueries.resetHistoryByMangaId(mangaId) }
} catch (e: Exception) {
logcat(LogPriority.ERROR, throwable = e)
}
}
override suspend fun deleteAllHistory(): Boolean {
return try {
handler.await { historyQueries.removeAllHistory() }
true
} catch (e: Exception) {
logcat(LogPriority.ERROR, throwable = e)
false
}
}
override suspend fun upsertHistory(historyUpdate: HistoryUpdate) {
try {
handler.await {
historyQueries.upsert(
historyUpdate.chapterId,
historyUpdate.readAt,
historyUpdate.sessionReadDuration,
)
}
} catch (e: Exception) {
logcat(LogPriority.ERROR, throwable = e)
}
}
}

View File

@ -0,0 +1,63 @@
package eu.kanade.data.manga
import eu.kanade.domain.library.model.LibraryManga
import eu.kanade.domain.manga.model.Manga
import eu.kanade.tachiyomi.source.model.UpdateStrategy
val mangaMapper: (Long, Long, String, String?, String?, String?, List<String>?, String, Long, String?, Boolean, Long?, Long?, Boolean, Long, Long, Long, Long, UpdateStrategy) -> Manga =
{ id, source, url, artist, author, description, genre, title, status, thumbnailUrl, favorite, lastUpdate, _, initialized, viewerFlags, chapterFlags, coverLastModified, dateAdded, updateStrategy ->
Manga(
id = id,
source = source,
favorite = favorite,
lastUpdate = lastUpdate ?: 0,
dateAdded = dateAdded,
viewerFlags = viewerFlags,
chapterFlags = chapterFlags,
coverLastModified = coverLastModified,
url = url,
title = title,
artist = artist,
author = author,
description = description,
genre = genre,
status = status,
thumbnailUrl = thumbnailUrl,
updateStrategy = updateStrategy,
initialized = initialized,
)
}
val libraryManga: (Long, Long, String, String?, String?, String?, List<String>?, String, Long, String?, Boolean, Long?, Long?, Boolean, Long, Long, Long, Long, UpdateStrategy, Long, Long, Long, Long, Long, Long, Long) -> LibraryManga =
{ id, source, url, artist, author, description, genre, title, status, thumbnailUrl, favorite, lastUpdate, nextUpdate, initialized, viewerFlags, chapterFlags, coverLastModified, dateAdded, updateStrategy, totalCount, readCount, latestUpload, chapterFetchedAt, lastRead, bookmarkCount, category ->
LibraryManga(
manga = mangaMapper(
id,
source,
url,
artist,
author,
description,
genre,
title,
status,
thumbnailUrl,
favorite,
lastUpdate,
nextUpdate,
initialized,
viewerFlags,
chapterFlags,
coverLastModified,
dateAdded,
updateStrategy,
),
category = category,
totalChapters = totalCount,
readCount = readCount,
bookmarkCount = bookmarkCount,
latestUpload = latestUpload,
chapterFetchedAt = chapterFetchedAt,
lastRead = lastRead,
)
}

View File

@ -0,0 +1,148 @@
package eu.kanade.data.manga
import eu.kanade.data.DatabaseHandler
import eu.kanade.data.listOfStringsAdapter
import eu.kanade.data.updateStrategyAdapter
import eu.kanade.domain.library.model.LibraryManga
import eu.kanade.domain.manga.model.Manga
import eu.kanade.domain.manga.model.MangaUpdate
import eu.kanade.domain.manga.repository.MangaRepository
import eu.kanade.tachiyomi.util.system.logcat
import eu.kanade.tachiyomi.util.system.toLong
import kotlinx.coroutines.flow.Flow
import logcat.LogPriority
class MangaRepositoryImpl(
private val handler: DatabaseHandler,
) : MangaRepository {
override suspend fun getMangaById(id: Long): Manga {
return handler.awaitOne { mangasQueries.getMangaById(id, mangaMapper) }
}
override suspend fun getMangaByIdAsFlow(id: Long): Flow<Manga> {
return handler.subscribeToOne { mangasQueries.getMangaById(id, mangaMapper) }
}
override suspend fun getMangaByUrlAndSourceId(url: String, sourceId: Long): Manga? {
return handler.awaitOneOrNull(inTransaction = true) { mangasQueries.getMangaByUrlAndSource(url, sourceId, mangaMapper) }
}
override fun getMangaByUrlAndSourceIdAsFlow(url: String, sourceId: Long): Flow<Manga?> {
return handler.subscribeToOneOrNull { mangasQueries.getMangaByUrlAndSource(url, sourceId, mangaMapper) }
}
override suspend fun getFavorites(): List<Manga> {
return handler.awaitList { mangasQueries.getFavorites(mangaMapper) }
}
override suspend fun getLibraryManga(): List<LibraryManga> {
return handler.awaitList { libraryViewQueries.library(libraryManga) }
}
override fun getLibraryMangaAsFlow(): Flow<List<LibraryManga>> {
return handler.subscribeToList { libraryViewQueries.library(libraryManga) }
}
override fun getFavoritesBySourceId(sourceId: Long): Flow<List<Manga>> {
return handler.subscribeToList { mangasQueries.getFavoriteBySourceId(sourceId, mangaMapper) }
}
override suspend fun getDuplicateLibraryManga(title: String, sourceId: Long): Manga? {
return handler.awaitOneOrNull {
mangasQueries.getDuplicateLibraryManga(title, sourceId, mangaMapper)
}
}
override suspend fun resetViewerFlags(): Boolean {
return try {
handler.await { mangasQueries.resetViewerFlags() }
true
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
false
}
}
override suspend fun setMangaCategories(mangaId: Long, categoryIds: List<Long>) {
handler.await(inTransaction = true) {
mangas_categoriesQueries.deleteMangaCategoryByMangaId(mangaId)
categoryIds.map { categoryId ->
mangas_categoriesQueries.insert(mangaId, categoryId)
}
}
}
override suspend fun insert(manga: Manga): Long? {
return handler.awaitOneOrNull(inTransaction = true) {
mangasQueries.insert(
source = manga.source,
url = manga.url,
artist = manga.artist,
author = manga.author,
description = manga.description,
genre = manga.genre,
title = manga.title,
status = manga.status,
thumbnailUrl = manga.thumbnailUrl,
favorite = manga.favorite,
lastUpdate = manga.lastUpdate,
nextUpdate = null,
initialized = manga.initialized,
viewerFlags = manga.viewerFlags,
chapterFlags = manga.chapterFlags,
coverLastModified = manga.coverLastModified,
dateAdded = manga.dateAdded,
updateStrategy = manga.updateStrategy,
)
mangasQueries.selectLastInsertedRowId()
}
}
override suspend fun update(update: MangaUpdate): Boolean {
return try {
partialUpdate(update)
true
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
false
}
}
override suspend fun updateAll(mangaUpdates: List<MangaUpdate>): Boolean {
return try {
partialUpdate(*mangaUpdates.toTypedArray())
true
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
false
}
}
private suspend fun partialUpdate(vararg mangaUpdates: MangaUpdate) {
handler.await(inTransaction = true) {
mangaUpdates.forEach { value ->
mangasQueries.update(
source = value.source,
url = value.url,
artist = value.artist,
author = value.author,
description = value.description,
genre = value.genre?.let(listOfStringsAdapter::encode),
title = value.title,
status = value.status,
thumbnailUrl = value.thumbnailUrl,
favorite = value.favorite?.toLong(),
lastUpdate = value.lastUpdate,
initialized = value.initialized?.toLong(),
viewer = value.viewerFlags,
chapterFlags = value.chapterFlags,
coverLastModified = value.coverLastModified,
dateAdded = value.dateAdded,
mangaId = value.id,
updateStrategy = value.updateStrategy?.let(updateStrategyAdapter::encode),
)
}
}
}
}

View File

@ -0,0 +1,3 @@
package eu.kanade.data.source
class NoResultsException : Exception()

View File

@ -0,0 +1,23 @@
package eu.kanade.data.source
import eu.kanade.data.DatabaseHandler
import eu.kanade.domain.source.model.SourceData
import eu.kanade.domain.source.repository.SourceDataRepository
import kotlinx.coroutines.flow.Flow
class SourceDataRepositoryImpl(
private val handler: DatabaseHandler,
) : SourceDataRepository {
override fun subscribeAll(): Flow<List<SourceData>> {
return handler.subscribeToList { sourcesQueries.findAll(sourceDataMapper) }
}
override suspend fun getSourceData(id: Long): SourceData? {
return handler.awaitOneOrNull { sourcesQueries.findOne(id, sourceDataMapper) }
}
override suspend fun upsertSourceData(id: Long, lang: String, name: String) {
handler.await { sourcesQueries.upsert(id, lang, name) }
}
}

View File

@ -0,0 +1,24 @@
package eu.kanade.data.source
import eu.kanade.domain.source.model.Source
import eu.kanade.domain.source.model.SourceData
import eu.kanade.tachiyomi.source.CatalogueSource
import eu.kanade.tachiyomi.source.SourceManager
val sourceMapper: (eu.kanade.tachiyomi.source.Source) -> Source = { source ->
Source(
source.id,
source.lang,
source.name,
supportsLatest = false,
isStub = source is SourceManager.StubSource,
)
}
val catalogueSourceMapper: (CatalogueSource) -> Source = { source ->
sourceMapper(source).copy(supportsLatest = source.supportsLatest)
}
val sourceDataMapper: (Long, String, String) -> SourceData = { id, lang, name ->
SourceData(id, lang, name)
}

View File

@ -0,0 +1,62 @@
package eu.kanade.data.source
import androidx.paging.PagingState
import eu.kanade.domain.source.model.SourcePagingSourceType
import eu.kanade.tachiyomi.source.CatalogueSource
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.util.lang.awaitSingle
import eu.kanade.tachiyomi.util.lang.withIOContext
abstract class SourcePagingSource(
protected val source: CatalogueSource,
) : SourcePagingSourceType() {
abstract suspend fun requestNextPage(currentPage: Int): MangasPage
override suspend fun load(params: LoadParams<Long>): LoadResult<Long, SManga> {
val page = params.key ?: 1
val mangasPage = try {
withIOContext {
requestNextPage(page.toInt())
.takeIf { it.mangas.isNotEmpty() }
?: throw NoResultsException()
}
} catch (e: Exception) {
return LoadResult.Error(e)
}
return LoadResult.Page(
data = mangasPage.mangas,
prevKey = null,
nextKey = if (mangasPage.hasNextPage) page + 1 else null,
)
}
override fun getRefreshKey(state: PagingState<Long, SManga>): Long? {
return state.anchorPosition?.let { anchorPosition ->
val anchorPage = state.closestPageToPosition(anchorPosition)
anchorPage?.prevKey ?: anchorPage?.nextKey
}
}
}
class SourceSearchPagingSource(source: CatalogueSource, val query: String, val filters: FilterList) : SourcePagingSource(source) {
override suspend fun requestNextPage(currentPage: Int): MangasPage {
return source.fetchSearchManga(currentPage, query, filters).awaitSingle()
}
}
class SourcePopularPagingSource(source: CatalogueSource) : SourcePagingSource(source) {
override suspend fun requestNextPage(currentPage: Int): MangasPage {
return source.fetchPopularManga(currentPage).awaitSingle()
}
}
class SourceLatestPagingSource(source: CatalogueSource) : SourcePagingSource(source) {
override suspend fun requestNextPage(currentPage: Int): MangasPage {
return source.fetchLatestUpdates(currentPage).awaitSingle()
}
}

View File

@ -0,0 +1,74 @@
package eu.kanade.data.source
import eu.kanade.data.DatabaseHandler
import eu.kanade.domain.source.model.Source
import eu.kanade.domain.source.model.SourcePagingSourceType
import eu.kanade.domain.source.model.SourceWithCount
import eu.kanade.domain.source.repository.SourceRepository
import eu.kanade.tachiyomi.source.CatalogueSource
import eu.kanade.tachiyomi.source.LocalSource
import eu.kanade.tachiyomi.source.SourceManager
import eu.kanade.tachiyomi.source.model.FilterList
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map
class SourceRepositoryImpl(
private val sourceManager: SourceManager,
private val handler: DatabaseHandler,
) : SourceRepository {
override fun getSources(): Flow<List<Source>> {
return sourceManager.catalogueSources.map { sources ->
sources.map(catalogueSourceMapper)
}
}
override fun getOnlineSources(): Flow<List<Source>> {
return sourceManager.onlineSources.map { sources ->
sources.map(sourceMapper)
}
}
override fun getSourcesWithFavoriteCount(): Flow<List<Pair<Source, Long>>> {
val sourceIdWithFavoriteCount = handler.subscribeToList { mangasQueries.getSourceIdWithFavoriteCount() }
return sourceIdWithFavoriteCount.map { sourceIdsWithCount ->
sourceIdsWithCount
.filterNot { it.source == LocalSource.ID }
.map { (sourceId, count) ->
val source = sourceManager.getOrStub(sourceId).run {
sourceMapper(this)
}
source to count
}
}
}
override fun getSourcesWithNonLibraryManga(): Flow<List<SourceWithCount>> {
val sourceIdWithNonLibraryManga = handler.subscribeToList { mangasQueries.getSourceIdsWithNonLibraryManga() }
return sourceIdWithNonLibraryManga.map { sourceId ->
sourceId.map { (sourceId, count) ->
val source = sourceManager.getOrStub(sourceId)
SourceWithCount(sourceMapper(source), count)
}
}
}
override fun search(
sourceId: Long,
query: String,
filterList: FilterList,
): SourcePagingSourceType {
val source = sourceManager.get(sourceId) as CatalogueSource
return SourceSearchPagingSource(source, query, filterList)
}
override fun getPopular(sourceId: Long): SourcePagingSourceType {
val source = sourceManager.get(sourceId) as CatalogueSource
return SourcePopularPagingSource(source)
}
override fun getLatest(sourceId: Long): SourcePagingSourceType {
val source = sourceManager.get(sourceId) as CatalogueSource
return SourceLatestPagingSource(source)
}
}

View File

@ -0,0 +1,22 @@
package eu.kanade.data.track
import eu.kanade.domain.track.model.Track
val trackMapper: (Long, Long, Long, Long, Long?, String, Double, Long, Long, Float, String, Long, Long) -> Track =
{ id, mangaId, syncId, remoteId, libraryId, title, lastChapterRead, totalChapters, status, score, remoteUrl, startDate, finishDate ->
Track(
id = id,
mangaId = mangaId,
syncId = syncId,
remoteId = remoteId,
libraryId = libraryId,
title = title,
lastChapterRead = lastChapterRead,
totalChapters = totalChapters,
status = status,
score = score,
remoteUrl = remoteUrl,
startDate = startDate,
finishDate = finishDate,
)
}

View File

@ -0,0 +1,71 @@
package eu.kanade.data.track
import eu.kanade.data.DatabaseHandler
import eu.kanade.domain.track.model.Track
import eu.kanade.domain.track.repository.TrackRepository
import kotlinx.coroutines.flow.Flow
class TrackRepositoryImpl(
private val handler: DatabaseHandler,
) : TrackRepository {
override suspend fun getTrackById(id: Long): Track? {
return handler.awaitOneOrNull { manga_syncQueries.getTrackById(id, trackMapper) }
}
override suspend fun getTracksByMangaId(mangaId: Long): List<Track> {
return handler.awaitList {
manga_syncQueries.getTracksByMangaId(mangaId, trackMapper)
}
}
override fun getTracksAsFlow(): Flow<List<Track>> {
return handler.subscribeToList {
manga_syncQueries.getTracks(trackMapper)
}
}
override fun getTracksByMangaIdAsFlow(mangaId: Long): Flow<List<Track>> {
return handler.subscribeToList {
manga_syncQueries.getTracksByMangaId(mangaId, trackMapper)
}
}
override suspend fun delete(mangaId: Long, syncId: Long) {
handler.await {
manga_syncQueries.delete(
mangaId = mangaId,
syncId = syncId,
)
}
}
override suspend fun insert(track: Track) {
insertValues(track)
}
override suspend fun insertAll(tracks: List<Track>) {
insertValues(*tracks.toTypedArray())
}
private suspend fun insertValues(vararg tracks: Track) {
handler.await(inTransaction = true) {
tracks.forEach { mangaTrack ->
manga_syncQueries.insert(
mangaId = mangaTrack.mangaId,
syncId = mangaTrack.syncId,
remoteId = mangaTrack.remoteId,
libraryId = mangaTrack.libraryId,
title = mangaTrack.title,
lastChapterRead = mangaTrack.lastChapterRead,
totalChapters = mangaTrack.totalChapters,
status = mangaTrack.status,
score = mangaTrack.score,
remoteUrl = mangaTrack.remoteUrl,
startDate = mangaTrack.startDate,
finishDate = mangaTrack.finishDate,
)
}
}
}
}

View File

@ -0,0 +1,26 @@
package eu.kanade.data.updates
import eu.kanade.domain.manga.model.MangaCover
import eu.kanade.domain.updates.model.UpdatesWithRelations
val updateWithRelationMapper: (Long, String, Long, String, String?, Boolean, Boolean, Long, Boolean, String?, Long, Long, Long) -> UpdatesWithRelations = {
mangaId, mangaTitle, chapterId, chapterName, scanlator, read, bookmark, sourceId, favorite, thumbnailUrl, coverLastModified, _, dateFetch ->
UpdatesWithRelations(
mangaId = mangaId,
mangaTitle = mangaTitle,
chapterId = chapterId,
chapterName = chapterName,
scanlator = scanlator,
read = read,
bookmark = bookmark,
sourceId = sourceId,
dateFetch = dateFetch,
coverData = MangaCover(
mangaId = mangaId,
sourceId = sourceId,
isMangaFavorite = favorite,
url = thumbnailUrl,
lastModified = coverLastModified,
),
)
}

View File

@ -0,0 +1,17 @@
package eu.kanade.data.updates
import eu.kanade.data.DatabaseHandler
import eu.kanade.domain.updates.model.UpdatesWithRelations
import eu.kanade.domain.updates.repository.UpdatesRepository
import kotlinx.coroutines.flow.Flow
class UpdatesRepositoryImpl(
val databaseHandler: DatabaseHandler,
) : UpdatesRepository {
override fun subscribeAll(after: Long): Flow<List<UpdatesWithRelations>> {
return databaseHandler.subscribeToList {
updatesViewQueries.updates(after, updateWithRelationMapper)
}
}
}

View File

@ -0,0 +1,147 @@
package eu.kanade.domain
import eu.kanade.data.category.CategoryRepositoryImpl
import eu.kanade.data.chapter.ChapterRepositoryImpl
import eu.kanade.data.history.HistoryRepositoryImpl
import eu.kanade.data.manga.MangaRepositoryImpl
import eu.kanade.data.source.SourceDataRepositoryImpl
import eu.kanade.data.source.SourceRepositoryImpl
import eu.kanade.data.track.TrackRepositoryImpl
import eu.kanade.data.updates.UpdatesRepositoryImpl
import eu.kanade.domain.category.interactor.CreateCategoryWithName
import eu.kanade.domain.category.interactor.DeleteCategory
import eu.kanade.domain.category.interactor.GetCategories
import eu.kanade.domain.category.interactor.RenameCategory
import eu.kanade.domain.category.interactor.ReorderCategory
import eu.kanade.domain.category.interactor.ResetCategoryFlags
import eu.kanade.domain.category.interactor.SetDisplayModeForCategory
import eu.kanade.domain.category.interactor.SetMangaCategories
import eu.kanade.domain.category.interactor.SetSortModeForCategory
import eu.kanade.domain.category.interactor.UpdateCategory
import eu.kanade.domain.category.repository.CategoryRepository
import eu.kanade.domain.chapter.interactor.GetChapter
import eu.kanade.domain.chapter.interactor.GetChapterByMangaId
import eu.kanade.domain.chapter.interactor.SetMangaDefaultChapterFlags
import eu.kanade.domain.chapter.interactor.SetReadStatus
import eu.kanade.domain.chapter.interactor.ShouldUpdateDbChapter
import eu.kanade.domain.chapter.interactor.SyncChaptersWithSource
import eu.kanade.domain.chapter.interactor.SyncChaptersWithTrackServiceTwoWay
import eu.kanade.domain.chapter.interactor.UpdateChapter
import eu.kanade.domain.chapter.repository.ChapterRepository
import eu.kanade.domain.download.interactor.DeleteDownload
import eu.kanade.domain.extension.interactor.GetExtensionLanguages
import eu.kanade.domain.extension.interactor.GetExtensionSources
import eu.kanade.domain.extension.interactor.GetExtensionsByType
import eu.kanade.domain.history.interactor.GetHistory
import eu.kanade.domain.history.interactor.GetNextChapters
import eu.kanade.domain.history.interactor.GetTotalReadDuration
import eu.kanade.domain.history.interactor.RemoveHistory
import eu.kanade.domain.history.interactor.UpsertHistory
import eu.kanade.domain.history.repository.HistoryRepository
import eu.kanade.domain.manga.interactor.GetDuplicateLibraryManga
import eu.kanade.domain.manga.interactor.GetFavorites
import eu.kanade.domain.manga.interactor.GetLibraryManga
import eu.kanade.domain.manga.interactor.GetManga
import eu.kanade.domain.manga.interactor.GetMangaWithChapters
import eu.kanade.domain.manga.interactor.NetworkToLocalManga
import eu.kanade.domain.manga.interactor.ResetViewerFlags
import eu.kanade.domain.manga.interactor.SetMangaChapterFlags
import eu.kanade.domain.manga.interactor.SetMangaViewerFlags
import eu.kanade.domain.manga.interactor.UpdateManga
import eu.kanade.domain.manga.repository.MangaRepository
import eu.kanade.domain.source.interactor.GetEnabledSources
import eu.kanade.domain.source.interactor.GetLanguagesWithSources
import eu.kanade.domain.source.interactor.GetRemoteManga
import eu.kanade.domain.source.interactor.GetSourcesWithFavoriteCount
import eu.kanade.domain.source.interactor.GetSourcesWithNonLibraryManga
import eu.kanade.domain.source.interactor.SetMigrateSorting
import eu.kanade.domain.source.interactor.ToggleLanguage
import eu.kanade.domain.source.interactor.ToggleSource
import eu.kanade.domain.source.interactor.ToggleSourcePin
import eu.kanade.domain.source.repository.SourceDataRepository
import eu.kanade.domain.source.repository.SourceRepository
import eu.kanade.domain.track.interactor.DeleteTrack
import eu.kanade.domain.track.interactor.GetTracks
import eu.kanade.domain.track.interactor.GetTracksPerManga
import eu.kanade.domain.track.interactor.InsertTrack
import eu.kanade.domain.track.repository.TrackRepository
import eu.kanade.domain.updates.interactor.GetUpdates
import eu.kanade.domain.updates.repository.UpdatesRepository
import uy.kohesive.injekt.api.InjektModule
import uy.kohesive.injekt.api.InjektRegistrar
import uy.kohesive.injekt.api.addFactory
import uy.kohesive.injekt.api.addSingletonFactory
import uy.kohesive.injekt.api.get
class DomainModule : InjektModule {
override fun InjektRegistrar.registerInjectables() {
addSingletonFactory<CategoryRepository> { CategoryRepositoryImpl(get()) }
addFactory { GetCategories(get()) }
addFactory { ResetCategoryFlags(get(), get()) }
addFactory { SetDisplayModeForCategory(get(), get()) }
addFactory { SetSortModeForCategory(get(), get()) }
addFactory { CreateCategoryWithName(get(), get()) }
addFactory { RenameCategory(get()) }
addFactory { ReorderCategory(get()) }
addFactory { UpdateCategory(get()) }
addFactory { DeleteCategory(get()) }
addSingletonFactory<MangaRepository> { MangaRepositoryImpl(get()) }
addFactory { GetDuplicateLibraryManga(get()) }
addFactory { GetFavorites(get()) }
addFactory { GetLibraryManga(get()) }
addFactory { GetMangaWithChapters(get(), get()) }
addFactory { GetManga(get()) }
addFactory { GetNextChapters(get(), get(), get()) }
addFactory { ResetViewerFlags(get()) }
addFactory { SetMangaChapterFlags(get()) }
addFactory { SetMangaDefaultChapterFlags(get(), get(), get()) }
addFactory { SetMangaViewerFlags(get()) }
addFactory { NetworkToLocalManga(get()) }
addFactory { UpdateManga(get()) }
addFactory { SetMangaCategories(get()) }
addSingletonFactory<TrackRepository> { TrackRepositoryImpl(get()) }
addFactory { DeleteTrack(get()) }
addFactory { GetTracksPerManga(get()) }
addFactory { GetTracks(get()) }
addFactory { InsertTrack(get()) }
addSingletonFactory<ChapterRepository> { ChapterRepositoryImpl(get()) }
addFactory { GetChapter(get()) }
addFactory { GetChapterByMangaId(get()) }
addFactory { UpdateChapter(get()) }
addFactory { SetReadStatus(get(), get(), get(), get()) }
addFactory { ShouldUpdateDbChapter() }
addFactory { SyncChaptersWithSource(get(), get(), get(), get()) }
addFactory { SyncChaptersWithTrackServiceTwoWay(get(), get()) }
addSingletonFactory<HistoryRepository> { HistoryRepositoryImpl(get()) }
addFactory { GetHistory(get()) }
addFactory { UpsertHistory(get()) }
addFactory { RemoveHistory(get()) }
addFactory { GetTotalReadDuration(get()) }
addFactory { DeleteDownload(get(), get()) }
addFactory { GetExtensionsByType(get(), get()) }
addFactory { GetExtensionSources(get()) }
addFactory { GetExtensionLanguages(get(), get()) }
addSingletonFactory<UpdatesRepository> { UpdatesRepositoryImpl(get()) }
addFactory { GetUpdates(get()) }
addSingletonFactory<SourceRepository> { SourceRepositoryImpl(get(), get()) }
addSingletonFactory<SourceDataRepository> { SourceDataRepositoryImpl(get()) }
addFactory { GetEnabledSources(get(), get()) }
addFactory { GetLanguagesWithSources(get(), get()) }
addFactory { GetRemoteManga(get()) }
addFactory { GetSourcesWithFavoriteCount(get(), get()) }
addFactory { GetSourcesWithNonLibraryManga(get()) }
addFactory { SetMigrateSorting(get()) }
addFactory { ToggleLanguage(get()) }
addFactory { ToggleSource(get()) }
addFactory { ToggleSourcePin(get()) }
}
}

View File

@ -0,0 +1,16 @@
package eu.kanade.domain.backup.service
import eu.kanade.tachiyomi.core.preference.PreferenceStore
import eu.kanade.tachiyomi.core.provider.FolderProvider
class BackupPreferences(
private val folderProvider: FolderProvider,
private val preferenceStore: PreferenceStore,
) {
fun backupsDirectory() = preferenceStore.getString("backup_directory", folderProvider.path())
fun numberOfBackups() = preferenceStore.getInt("backup_slots", 2)
fun backupInterval() = preferenceStore.getInt("backup_interval", 12)
}

View File

@ -0,0 +1,30 @@
package eu.kanade.domain.base
import android.content.Context
import eu.kanade.tachiyomi.core.preference.PreferenceStore
import eu.kanade.tachiyomi.core.preference.getEnum
import eu.kanade.tachiyomi.data.preference.PreferenceValues
import eu.kanade.tachiyomi.util.system.DeviceUtil
import eu.kanade.tachiyomi.util.system.isPreviewBuildType
import eu.kanade.tachiyomi.util.system.isReleaseBuildType
class BasePreferences(
val context: Context,
private val preferenceStore: PreferenceStore,
) {
fun confirmExit() = preferenceStore.getBoolean("pref_confirm_exit", false)
fun downloadedOnly() = preferenceStore.getBoolean("pref_downloaded_only", false)
fun incognitoMode() = preferenceStore.getBoolean("incognito_mode", false)
fun automaticExtUpdates() = preferenceStore.getBoolean("automatic_ext_updates", true)
fun extensionInstaller() = preferenceStore.getEnum(
"extension_installer",
if (DeviceUtil.isMiui) PreferenceValues.ExtensionInstaller.LEGACY else PreferenceValues.ExtensionInstaller.PACKAGEINSTALLER,
)
fun acraEnabled() = preferenceStore.getBoolean("acra.enable", isPreviewBuildType || isReleaseBuildType)
}

View File

@ -0,0 +1,52 @@
package eu.kanade.domain.category.interactor
import eu.kanade.domain.category.model.Category
import eu.kanade.domain.category.model.anyWithName
import eu.kanade.domain.category.repository.CategoryRepository
import eu.kanade.domain.library.service.LibraryPreferences
import eu.kanade.tachiyomi.util.lang.withNonCancellableContext
import eu.kanade.tachiyomi.util.system.logcat
import logcat.LogPriority
class CreateCategoryWithName(
private val categoryRepository: CategoryRepository,
private val preferences: LibraryPreferences,
) {
private val initialFlags: Long
get() {
val sort = preferences.librarySortingMode().get()
return preferences.libraryDisplayMode().get().flag or
sort.type.flag or
sort.direction.flag
}
suspend fun await(name: String): Result = withNonCancellableContext {
val categories = categoryRepository.getAll()
if (categories.anyWithName(name)) {
return@withNonCancellableContext Result.NameAlreadyExistsError
}
val nextOrder = categories.maxOfOrNull { it.order }?.plus(1) ?: 0
val newCategory = Category(
id = 0,
name = name,
order = nextOrder,
flags = initialFlags,
)
try {
categoryRepository.insert(newCategory)
Result.Success
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
Result.InternalError(e)
}
}
sealed class Result {
object Success : Result()
object NameAlreadyExistsError : Result()
data class InternalError(val error: Throwable) : Result()
}
}

View File

@ -0,0 +1,42 @@
package eu.kanade.domain.category.interactor
import eu.kanade.domain.category.model.CategoryUpdate
import eu.kanade.domain.category.repository.CategoryRepository
import eu.kanade.tachiyomi.util.lang.withNonCancellableContext
import eu.kanade.tachiyomi.util.system.logcat
import logcat.LogPriority
class DeleteCategory(
private val categoryRepository: CategoryRepository,
) {
suspend fun await(categoryId: Long) = withNonCancellableContext {
try {
categoryRepository.delete(categoryId)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
return@withNonCancellableContext Result.InternalError(e)
}
val categories = categoryRepository.getAll()
val updates = categories.mapIndexed { index, category ->
CategoryUpdate(
id = category.id,
order = index.toLong(),
)
}
try {
categoryRepository.updatePartial(updates)
Result.Success
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
Result.InternalError(e)
}
}
sealed class Result {
object Success : Result()
data class InternalError(val error: Throwable) : Result()
}
}

View File

@ -0,0 +1,26 @@
package eu.kanade.domain.category.interactor
import eu.kanade.domain.category.model.Category
import eu.kanade.domain.category.repository.CategoryRepository
import kotlinx.coroutines.flow.Flow
class GetCategories(
private val categoryRepository: CategoryRepository,
) {
fun subscribe(): Flow<List<Category>> {
return categoryRepository.getAllAsFlow()
}
fun subscribe(mangaId: Long): Flow<List<Category>> {
return categoryRepository.getCategoriesByMangaIdAsFlow(mangaId)
}
suspend fun await(): List<Category> {
return categoryRepository.getAll()
}
suspend fun await(mangaId: Long): List<Category> {
return categoryRepository.getCategoriesByMangaId(mangaId)
}
}

View File

@ -0,0 +1,42 @@
package eu.kanade.domain.category.interactor
import eu.kanade.domain.category.model.Category
import eu.kanade.domain.category.model.CategoryUpdate
import eu.kanade.domain.category.model.anyWithName
import eu.kanade.domain.category.repository.CategoryRepository
import eu.kanade.tachiyomi.util.lang.withNonCancellableContext
import eu.kanade.tachiyomi.util.system.logcat
import logcat.LogPriority
class RenameCategory(
private val categoryRepository: CategoryRepository,
) {
suspend fun await(categoryId: Long, name: String) = withNonCancellableContext {
val categories = categoryRepository.getAll()
if (categories.anyWithName(name)) {
return@withNonCancellableContext Result.NameAlreadyExistsError
}
val update = CategoryUpdate(
id = categoryId,
name = name,
)
try {
categoryRepository.updatePartial(update)
Result.Success
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
Result.InternalError(e)
}
}
suspend fun await(category: Category, name: String) = await(category.id, name)
sealed class Result {
object Success : Result()
object NameAlreadyExistsError : Result()
data class InternalError(val error: Throwable) : Result()
}
}

View File

@ -0,0 +1,70 @@
package eu.kanade.domain.category.interactor
import eu.kanade.domain.category.model.Category
import eu.kanade.domain.category.model.CategoryUpdate
import eu.kanade.domain.category.repository.CategoryRepository
import eu.kanade.tachiyomi.util.lang.withNonCancellableContext
import eu.kanade.tachiyomi.util.system.logcat
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import logcat.LogPriority
import java.util.Collections
class ReorderCategory(
private val categoryRepository: CategoryRepository,
) {
private val mutex = Mutex()
suspend fun moveUp(category: Category): Result =
await(category, MoveTo.UP)
suspend fun moveDown(category: Category): Result =
await(category, MoveTo.DOWN)
private suspend fun await(category: Category, moveTo: MoveTo) = withNonCancellableContext {
mutex.withLock {
val categories = categoryRepository.getAll()
.filterNot(Category::isSystemCategory)
.toMutableList()
val currentIndex = categories.indexOfFirst { it.id == category.id }
if (currentIndex == -1) {
return@withNonCancellableContext Result.Unchanged
}
val newPosition = when (moveTo) {
MoveTo.UP -> currentIndex - 1
MoveTo.DOWN -> currentIndex + 1
}.toInt()
try {
Collections.swap(categories, currentIndex, newPosition)
val updates = categories.mapIndexed { index, category ->
CategoryUpdate(
id = category.id,
order = index.toLong(),
)
}
categoryRepository.updatePartial(updates)
Result.Success
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
Result.InternalError(e)
}
}
}
sealed class Result {
object Success : Result()
object Unchanged : Result()
data class InternalError(val error: Throwable) : Result()
}
private enum class MoveTo {
UP,
DOWN,
}
}

View File

@ -0,0 +1,17 @@
package eu.kanade.domain.category.interactor
import eu.kanade.domain.category.repository.CategoryRepository
import eu.kanade.domain.library.model.plus
import eu.kanade.domain.library.service.LibraryPreferences
class ResetCategoryFlags(
private val preferences: LibraryPreferences,
private val categoryRepository: CategoryRepository,
) {
suspend fun await() {
val display = preferences.libraryDisplayMode().get()
val sort = preferences.librarySortingMode().get()
categoryRepository.updateAllFlags(display + sort.type + sort.direction)
}
}

View File

@ -0,0 +1,34 @@
package eu.kanade.domain.category.interactor
import eu.kanade.domain.category.model.Category
import eu.kanade.domain.category.model.CategoryUpdate
import eu.kanade.domain.category.repository.CategoryRepository
import eu.kanade.domain.library.model.LibraryDisplayMode
import eu.kanade.domain.library.model.plus
import eu.kanade.domain.library.service.LibraryPreferences
class SetDisplayModeForCategory(
private val preferences: LibraryPreferences,
private val categoryRepository: CategoryRepository,
) {
suspend fun await(categoryId: Long, display: LibraryDisplayMode) {
val category = categoryRepository.get(categoryId) ?: return
val flags = category.flags + display
if (preferences.categorizedDisplaySettings().get()) {
categoryRepository.updatePartial(
CategoryUpdate(
id = category.id,
flags = flags,
),
)
} else {
preferences.libraryDisplayMode().set(display)
categoryRepository.updateAllFlags(flags)
}
}
suspend fun await(category: Category, display: LibraryDisplayMode) {
await(category.id, display)
}
}

View File

@ -0,0 +1,18 @@
package eu.kanade.domain.category.interactor
import eu.kanade.domain.manga.repository.MangaRepository
import eu.kanade.tachiyomi.util.system.logcat
import logcat.LogPriority
class SetMangaCategories(
private val mangaRepository: MangaRepository,
) {
suspend fun await(mangaId: Long, categoryIds: List<Long>) {
try {
mangaRepository.setMangaCategories(mangaId, categoryIds)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
}
}
}

View File

@ -0,0 +1,34 @@
package eu.kanade.domain.category.interactor
import eu.kanade.domain.category.model.Category
import eu.kanade.domain.category.model.CategoryUpdate
import eu.kanade.domain.category.repository.CategoryRepository
import eu.kanade.domain.library.model.LibrarySort
import eu.kanade.domain.library.model.plus
import eu.kanade.domain.library.service.LibraryPreferences
class SetSortModeForCategory(
private val preferences: LibraryPreferences,
private val categoryRepository: CategoryRepository,
) {
suspend fun await(categoryId: Long, type: LibrarySort.Type, direction: LibrarySort.Direction) {
val category = categoryRepository.get(categoryId) ?: return
val flags = category.flags + type + direction
if (preferences.categorizedDisplaySettings().get()) {
categoryRepository.updatePartial(
CategoryUpdate(
id = category.id,
flags = flags,
),
)
} else {
preferences.librarySortingMode().set(LibrarySort(type, direction))
categoryRepository.updateAllFlags(flags)
}
}
suspend fun await(category: Category, type: LibrarySort.Type, direction: LibrarySort.Direction) {
await(category.id, type, direction)
}
}

View File

@ -0,0 +1,24 @@
package eu.kanade.domain.category.interactor
import eu.kanade.domain.category.model.CategoryUpdate
import eu.kanade.domain.category.repository.CategoryRepository
import eu.kanade.tachiyomi.util.lang.withNonCancellableContext
class UpdateCategory(
private val categoryRepository: CategoryRepository,
) {
suspend fun await(payload: CategoryUpdate): Result = withNonCancellableContext {
try {
categoryRepository.updatePartial(payload)
Result.Success
} catch (e: Exception) {
Result.Error(e)
}
}
sealed class Result {
object Success : Result()
data class Error(val error: Exception) : Result()
}
}

View File

@ -0,0 +1,21 @@
package eu.kanade.domain.category.model
import java.io.Serializable
data class Category(
val id: Long,
val name: String,
val order: Long,
val flags: Long,
) : Serializable {
val isSystemCategory: Boolean = id == UNCATEGORIZED_ID
companion object {
const val UNCATEGORIZED_ID = 0L
}
}
internal fun List<Category>.anyWithName(name: String): Boolean {
return any { name == it.name }
}

View File

@ -0,0 +1,8 @@
package eu.kanade.domain.category.model
data class CategoryUpdate(
val id: Long,
val name: String? = null,
val order: Long? = null,
val flags: Long? = null,
)

View File

@ -0,0 +1,28 @@
package eu.kanade.domain.category.repository
import eu.kanade.domain.category.model.Category
import eu.kanade.domain.category.model.CategoryUpdate
import kotlinx.coroutines.flow.Flow
interface CategoryRepository {
suspend fun get(id: Long): Category?
suspend fun getAll(): List<Category>
fun getAllAsFlow(): Flow<List<Category>>
suspend fun getCategoriesByMangaId(mangaId: Long): List<Category>
fun getCategoriesByMangaIdAsFlow(mangaId: Long): Flow<List<Category>>
suspend fun insert(category: Category)
suspend fun updatePartial(update: CategoryUpdate)
suspend fun updatePartial(updates: List<CategoryUpdate>)
suspend fun updateAllFlags(flags: Long?)
suspend fun delete(categoryId: Long)
}

View File

@ -0,0 +1,29 @@
package eu.kanade.domain.chapter.interactor
import eu.kanade.domain.chapter.model.Chapter
import eu.kanade.domain.chapter.repository.ChapterRepository
import eu.kanade.tachiyomi.util.system.logcat
import logcat.LogPriority
class GetChapter(
private val chapterRepository: ChapterRepository,
) {
suspend fun await(id: Long): Chapter? {
return try {
chapterRepository.getChapterById(id)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
null
}
}
suspend fun await(url: String, mangaId: Long): Chapter? {
return try {
chapterRepository.getChapterByUrlAndMangaId(url, mangaId)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
null
}
}
}

View File

@ -0,0 +1,20 @@
package eu.kanade.domain.chapter.interactor
import eu.kanade.domain.chapter.model.Chapter
import eu.kanade.domain.chapter.repository.ChapterRepository
import eu.kanade.tachiyomi.util.system.logcat
import logcat.LogPriority
class GetChapterByMangaId(
private val chapterRepository: ChapterRepository,
) {
suspend fun await(mangaId: Long): List<Chapter> {
return try {
chapterRepository.getChapterByMangaId(mangaId)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
emptyList()
}
}
}

View File

@ -0,0 +1,36 @@
package eu.kanade.domain.chapter.interactor
import eu.kanade.domain.library.service.LibraryPreferences
import eu.kanade.domain.manga.interactor.GetFavorites
import eu.kanade.domain.manga.interactor.SetMangaChapterFlags
import eu.kanade.domain.manga.model.Manga
import eu.kanade.tachiyomi.util.lang.withNonCancellableContext
class SetMangaDefaultChapterFlags(
private val libraryPreferences: LibraryPreferences,
private val setMangaChapterFlags: SetMangaChapterFlags,
private val getFavorites: GetFavorites,
) {
suspend fun await(manga: Manga) {
withNonCancellableContext {
with(libraryPreferences) {
setMangaChapterFlags.awaitSetAllFlags(
mangaId = manga.id,
unreadFilter = filterChapterByRead().get(),
downloadedFilter = filterChapterByDownloaded().get(),
bookmarkedFilter = filterChapterByBookmarked().get(),
sortingMode = sortChapterBySourceOrNumber().get(),
sortingDirection = sortChapterByAscendingOrDescending().get(),
displayMode = displayChapterByNameOrNumber().get(),
)
}
}
}
suspend fun awaitAll() {
withNonCancellableContext {
getFavorites.await().forEach { await(it) }
}
}
}

View File

@ -0,0 +1,80 @@
package eu.kanade.domain.chapter.interactor
import eu.kanade.domain.chapter.model.Chapter
import eu.kanade.domain.chapter.model.ChapterUpdate
import eu.kanade.domain.chapter.repository.ChapterRepository
import eu.kanade.domain.download.interactor.DeleteDownload
import eu.kanade.domain.download.service.DownloadPreferences
import eu.kanade.domain.manga.model.Manga
import eu.kanade.domain.manga.repository.MangaRepository
import eu.kanade.tachiyomi.util.lang.withNonCancellableContext
import eu.kanade.tachiyomi.util.system.logcat
import logcat.LogPriority
class SetReadStatus(
private val downloadPreferences: DownloadPreferences,
private val deleteDownload: DeleteDownload,
private val mangaRepository: MangaRepository,
private val chapterRepository: ChapterRepository,
) {
private val mapper = { chapter: Chapter, read: Boolean ->
ChapterUpdate(
read = read,
lastPageRead = if (!read) 0 else null,
id = chapter.id,
)
}
suspend fun await(read: Boolean, vararg chapters: Chapter): Result = withNonCancellableContext {
val chaptersToUpdate = chapters.filter {
when (read) {
true -> !it.read
false -> it.read || it.lastPageRead > 0
}
}
if (chaptersToUpdate.isEmpty()) {
return@withNonCancellableContext Result.NoChapters
}
try {
chapterRepository.updateAll(
chaptersToUpdate.map { mapper(it, read) },
)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
return@withNonCancellableContext Result.InternalError(e)
}
if (read && downloadPreferences.removeAfterMarkedAsRead().get()) {
chaptersToUpdate
.groupBy { it.mangaId }
.forEach { (mangaId, chapters) ->
deleteDownload.awaitAll(
manga = mangaRepository.getMangaById(mangaId),
chapters = chapters.toTypedArray(),
)
}
}
Result.Success
}
suspend fun await(mangaId: Long, read: Boolean): Result = withNonCancellableContext {
await(
read = read,
chapters = chapterRepository
.getChapterByMangaId(mangaId)
.toTypedArray(),
)
}
suspend fun await(manga: Manga, read: Boolean) =
await(manga.id, read)
sealed class Result {
object Success : Result()
object NoChapters : Result()
data class InternalError(val error: Throwable) : Result()
}
}

View File

@ -0,0 +1,13 @@
package eu.kanade.domain.chapter.interactor
import eu.kanade.domain.chapter.model.Chapter
class ShouldUpdateDbChapter {
fun await(dbChapter: Chapter, sourceChapter: Chapter): Boolean {
return dbChapter.scanlator != sourceChapter.scanlator || dbChapter.name != sourceChapter.name ||
dbChapter.dateUpload != sourceChapter.dateUpload ||
dbChapter.chapterNumber != sourceChapter.chapterNumber ||
dbChapter.sourceOrder != sourceChapter.sourceOrder
}
}

View File

@ -0,0 +1,194 @@
package eu.kanade.domain.chapter.interactor
import eu.kanade.data.chapter.CleanupChapterName
import eu.kanade.data.chapter.NoChaptersException
import eu.kanade.domain.chapter.model.Chapter
import eu.kanade.domain.chapter.model.toChapterUpdate
import eu.kanade.domain.chapter.repository.ChapterRepository
import eu.kanade.domain.manga.interactor.UpdateManga
import eu.kanade.domain.manga.model.Manga
import eu.kanade.tachiyomi.data.download.DownloadManager
import eu.kanade.tachiyomi.data.download.DownloadProvider
import eu.kanade.tachiyomi.source.Source
import eu.kanade.tachiyomi.source.isLocal
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.online.HttpSource
import eu.kanade.tachiyomi.util.chapter.ChapterRecognition
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.lang.Long.max
import java.util.Date
import java.util.TreeSet
class SyncChaptersWithSource(
private val downloadManager: DownloadManager = Injekt.get(),
private val downloadProvider: DownloadProvider = Injekt.get(),
private val chapterRepository: ChapterRepository = Injekt.get(),
private val shouldUpdateDbChapter: ShouldUpdateDbChapter = Injekt.get(),
private val updateManga: UpdateManga = Injekt.get(),
private val updateChapter: UpdateChapter = Injekt.get(),
private val getChapterByMangaId: GetChapterByMangaId = Injekt.get(),
) {
/**
* Method to synchronize db chapters with source ones
*
* @param rawSourceChapters the chapters from the source.
* @param manga the manga the chapters belong to.
* @param source the source the manga belongs to.
* @return Newly added chapters
*/
suspend fun await(
rawSourceChapters: List<SChapter>,
manga: Manga,
source: Source,
): List<Chapter> {
if (rawSourceChapters.isEmpty() && !source.isLocal()) {
throw NoChaptersException()
}
val sourceChapters = rawSourceChapters
.distinctBy { it.url }
.mapIndexed { i, sChapter ->
Chapter.create()
.copyFromSChapter(sChapter)
.copy(name = CleanupChapterName.await(sChapter.name, manga.title))
.copy(mangaId = manga.id, sourceOrder = i.toLong())
}
// Chapters from db.
val dbChapters = getChapterByMangaId.await(manga.id)
// Chapters from the source not in db.
val toAdd = mutableListOf<Chapter>()
// Chapters whose metadata have changed.
val toChange = mutableListOf<Chapter>()
// Chapters from the db not in source.
val toDelete = dbChapters.filterNot { dbChapter ->
sourceChapters.any { sourceChapter ->
dbChapter.url == sourceChapter.url
}
}
val rightNow = Date().time
// Used to not set upload date of older chapters
// to a higher value than newer chapters
var maxSeenUploadDate = 0L
val sManga = manga.toSManga()
for (sourceChapter in sourceChapters) {
var chapter = sourceChapter
// Update metadata from source if necessary.
if (source is HttpSource) {
val sChapter = chapter.toSChapter()
source.prepareNewChapter(sChapter, sManga)
chapter = chapter.copyFromSChapter(sChapter)
}
// Recognize chapter number for the chapter.
val chapterNumber = ChapterRecognition.parseChapterNumber(manga.title, chapter.name, chapter.chapterNumber)
chapter = chapter.copy(chapterNumber = chapterNumber)
val dbChapter = dbChapters.find { it.url == chapter.url }
if (dbChapter == null) {
val toAddChapter = if (chapter.dateUpload == 0L) {
val altDateUpload = if (maxSeenUploadDate == 0L) rightNow else maxSeenUploadDate
chapter.copy(dateUpload = altDateUpload)
} else {
maxSeenUploadDate = max(maxSeenUploadDate, sourceChapter.dateUpload)
chapter
}
toAdd.add(toAddChapter)
} else {
if (shouldUpdateDbChapter.await(dbChapter, chapter)) {
val shouldRenameChapter = downloadProvider.isChapterDirNameChanged(dbChapter, chapter) &&
downloadManager.isChapterDownloaded(dbChapter.name, dbChapter.scanlator, manga.title, manga.source)
if (shouldRenameChapter) {
downloadManager.renameChapter(source, manga, dbChapter, chapter)
}
var toChangeChapter = dbChapter.copy(
name = chapter.name,
chapterNumber = chapter.chapterNumber,
scanlator = chapter.scanlator,
sourceOrder = chapter.sourceOrder,
)
if (chapter.dateUpload != 0L) {
toChangeChapter = toChangeChapter.copy(dateUpload = chapter.dateUpload)
}
toChange.add(toChangeChapter)
}
}
}
// Return if there's nothing to add, delete or change, avoiding unnecessary db transactions.
if (toAdd.isEmpty() && toDelete.isEmpty() && toChange.isEmpty()) {
return emptyList()
}
val reAdded = mutableListOf<Chapter>()
val deletedChapterNumbers = TreeSet<Float>()
val deletedReadChapterNumbers = TreeSet<Float>()
val deletedBookmarkedChapterNumbers = TreeSet<Float>()
toDelete.forEach { chapter ->
if (chapter.read) deletedReadChapterNumbers.add(chapter.chapterNumber)
if (chapter.bookmark) deletedBookmarkedChapterNumbers.add(chapter.chapterNumber)
deletedChapterNumbers.add(chapter.chapterNumber)
}
val deletedChapterNumberDateFetchMap = toDelete.sortedByDescending { it.dateFetch }
.associate { it.chapterNumber to it.dateFetch }
// Date fetch is set in such a way that the upper ones will have bigger value than the lower ones
// Sources MUST return the chapters from most to less recent, which is common.
var itemCount = toAdd.size
var updatedToAdd = toAdd.map { toAddItem ->
var chapter = toAddItem.copy(dateFetch = rightNow + itemCount--)
if (chapter.isRecognizedNumber.not() || chapter.chapterNumber !in deletedChapterNumbers) return@map chapter
chapter = chapter.copy(
read = chapter.chapterNumber in deletedReadChapterNumbers,
bookmark = chapter.chapterNumber in deletedBookmarkedChapterNumbers,
)
// Try to to use the fetch date of the original entry to not pollute 'Updates' tab
deletedChapterNumberDateFetchMap[chapter.chapterNumber]?.let {
chapter = chapter.copy(dateFetch = it)
}
reAdded.add(chapter)
chapter
}
if (toDelete.isNotEmpty()) {
val toDeleteIds = toDelete.map { it.id }
chapterRepository.removeChaptersWithIds(toDeleteIds)
}
if (updatedToAdd.isNotEmpty()) {
updatedToAdd = chapterRepository.addAll(updatedToAdd)
}
if (toChange.isNotEmpty()) {
val chapterUpdates = toChange.map { it.toChapterUpdate() }
updateChapter.awaitAll(chapterUpdates)
}
// Set this manga as updated since chapters were changed
// Note that last_update actually represents last time the chapter list changed at all
updateManga.awaitUpdateLastUpdate(manga.id)
val reAddedUrls = reAdded.map { it.url }.toHashSet()
return updatedToAdd.filterNot { it.url in reAddedUrls }
}
}

View File

@ -0,0 +1,41 @@
package eu.kanade.domain.chapter.interactor
import eu.kanade.domain.chapter.model.Chapter
import eu.kanade.domain.chapter.model.toChapterUpdate
import eu.kanade.domain.track.interactor.InsertTrack
import eu.kanade.domain.track.model.Track
import eu.kanade.domain.track.model.toDbTrack
import eu.kanade.tachiyomi.data.track.TrackService
import eu.kanade.tachiyomi.util.system.logcat
import logcat.LogPriority
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
class SyncChaptersWithTrackServiceTwoWay(
private val updateChapter: UpdateChapter = Injekt.get(),
private val insertTrack: InsertTrack = Injekt.get(),
) {
suspend fun await(
chapters: List<Chapter>,
remoteTrack: Track,
service: TrackService,
) {
val sortedChapters = chapters.sortedBy { it.chapterNumber }
val chapterUpdates = sortedChapters
.filter { chapter -> chapter.chapterNumber <= remoteTrack.lastChapterRead && !chapter.read }
.map { it.copy(read = true).toChapterUpdate() }
// only take into account continuous reading
val localLastRead = sortedChapters.takeWhile { it.read }.lastOrNull()?.chapterNumber ?: 0F
val updatedTrack = remoteTrack.copy(lastChapterRead = localLastRead.toDouble())
try {
service.update(updatedTrack.toDbTrack())
updateChapter.awaitAll(chapterUpdates)
insertTrack.await(updatedTrack)
} catch (e: Throwable) {
logcat(LogPriority.WARN, e)
}
}
}

View File

@ -0,0 +1,27 @@
package eu.kanade.domain.chapter.interactor
import eu.kanade.domain.chapter.model.ChapterUpdate
import eu.kanade.domain.chapter.repository.ChapterRepository
import eu.kanade.tachiyomi.util.system.logcat
import logcat.LogPriority
class UpdateChapter(
private val chapterRepository: ChapterRepository,
) {
suspend fun await(chapterUpdate: ChapterUpdate) {
try {
chapterRepository.update(chapterUpdate)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
}
}
suspend fun awaitAll(chapterUpdates: List<ChapterUpdate>) {
try {
chapterRepository.updateAll(chapterUpdates)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
}
}
}

View File

@ -0,0 +1,76 @@
package eu.kanade.domain.chapter.model
import eu.kanade.tachiyomi.data.database.models.ChapterImpl
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.data.database.models.Chapter as DbChapter
data class Chapter(
val id: Long,
val mangaId: Long,
val read: Boolean,
val bookmark: Boolean,
val lastPageRead: Long,
val dateFetch: Long,
val sourceOrder: Long,
val url: String,
val name: String,
val dateUpload: Long,
val chapterNumber: Float,
val scanlator: String?,
) {
val isRecognizedNumber: Boolean
get() = chapterNumber >= 0f
fun toSChapter(): SChapter {
return SChapter.create().also {
it.url = url
it.name = name
it.date_upload = dateUpload
it.chapter_number = chapterNumber
it.scanlator = scanlator
}
}
fun copyFromSChapter(sChapter: SChapter): Chapter {
return this.copy(
name = sChapter.name,
url = sChapter.url,
dateUpload = sChapter.date_upload,
chapterNumber = sChapter.chapter_number,
scanlator = sChapter.scanlator?.ifBlank { null },
)
}
companion object {
fun create() = Chapter(
id = -1,
mangaId = -1,
read = false,
bookmark = false,
lastPageRead = 0,
dateFetch = 0,
sourceOrder = 0,
url = "",
name = "",
dateUpload = -1,
chapterNumber = -1f,
scanlator = null,
)
}
}
// TODO: Remove when all deps are migrated
fun Chapter.toDbChapter(): DbChapter = ChapterImpl().also {
it.id = id
it.manga_id = mangaId
it.url = url
it.name = name
it.scanlator = scanlator
it.read = read
it.bookmark = bookmark
it.last_page_read = lastPageRead.toInt()
it.date_fetch = dateFetch
it.date_upload = dateUpload
it.chapter_number = chapterNumber
it.source_order = sourceOrder.toInt()
}

View File

@ -0,0 +1,82 @@
package eu.kanade.domain.chapter.model
import eu.kanade.domain.manga.model.Manga
import eu.kanade.domain.manga.model.TriStateFilter
import eu.kanade.domain.manga.model.isLocal
import eu.kanade.tachiyomi.data.download.DownloadManager
import eu.kanade.tachiyomi.data.download.model.Download
import eu.kanade.tachiyomi.ui.manga.ChapterItem
import eu.kanade.tachiyomi.util.chapter.getChapterSort
/**
* Applies the view filters to the list of chapters obtained from the database.
* @return an observable of the list of chapters filtered and sorted.
*/
fun List<Chapter>.applyFilters(manga: Manga, downloadManager: DownloadManager): List<Chapter> {
val isLocalManga = manga.isLocal()
val unreadFilter = manga.unreadFilter
val downloadedFilter = manga.downloadedFilter
val bookmarkedFilter = manga.bookmarkedFilter
return filter { chapter ->
when (unreadFilter) {
TriStateFilter.DISABLED -> true
TriStateFilter.ENABLED_IS -> !chapter.read
TriStateFilter.ENABLED_NOT -> chapter.read
}
}
.filter { chapter ->
when (bookmarkedFilter) {
TriStateFilter.DISABLED -> true
TriStateFilter.ENABLED_IS -> chapter.bookmark
TriStateFilter.ENABLED_NOT -> !chapter.bookmark
}
}
.filter { chapter ->
val downloaded = downloadManager.isChapterDownloaded(chapter.name, chapter.scanlator, manga.title, manga.source)
val downloadState = when {
downloaded -> Download.State.DOWNLOADED
else -> Download.State.NOT_DOWNLOADED
}
when (downloadedFilter) {
TriStateFilter.DISABLED -> true
TriStateFilter.ENABLED_IS -> downloadState == Download.State.DOWNLOADED || isLocalManga
TriStateFilter.ENABLED_NOT -> downloadState != Download.State.DOWNLOADED && !isLocalManga
}
}
.sortedWith(getChapterSort(manga))
}
/**
* Applies the view filters to the list of chapters obtained from the database.
* @return an observable of the list of chapters filtered and sorted.
*/
fun List<ChapterItem>.applyFilters(manga: Manga): Sequence<ChapterItem> {
val isLocalManga = manga.isLocal()
val unreadFilter = manga.unreadFilter
val downloadedFilter = manga.downloadedFilter
val bookmarkedFilter = manga.bookmarkedFilter
return asSequence()
.filter { (chapter) ->
when (unreadFilter) {
TriStateFilter.DISABLED -> true
TriStateFilter.ENABLED_IS -> !chapter.read
TriStateFilter.ENABLED_NOT -> chapter.read
}
}
.filter { (chapter) ->
when (bookmarkedFilter) {
TriStateFilter.DISABLED -> true
TriStateFilter.ENABLED_IS -> chapter.bookmark
TriStateFilter.ENABLED_NOT -> !chapter.bookmark
}
}
.filter {
when (downloadedFilter) {
TriStateFilter.DISABLED -> true
TriStateFilter.ENABLED_IS -> it.isDownloaded || isLocalManga
TriStateFilter.ENABLED_NOT -> !it.isDownloaded && !isLocalManga
}
}
.sortedWith { (chapter1), (chapter2) -> getChapterSort(manga).invoke(chapter1, chapter2) }
}

View File

@ -0,0 +1,20 @@
package eu.kanade.domain.chapter.model
data class ChapterUpdate(
val id: Long,
val mangaId: Long? = null,
val read: Boolean? = null,
val bookmark: Boolean? = null,
val lastPageRead: Long? = null,
val dateFetch: Long? = null,
val sourceOrder: Long? = null,
val url: String? = null,
val name: String? = null,
val dateUpload: Long? = null,
val chapterNumber: Float? = null,
val scanlator: String? = null,
)
fun Chapter.toChapterUpdate(): ChapterUpdate {
return ChapterUpdate(id, mangaId, read, bookmark, lastPageRead, dateFetch, sourceOrder, url, name, dateUpload, chapterNumber, scanlator)
}

View File

@ -0,0 +1,26 @@
package eu.kanade.domain.chapter.repository
import eu.kanade.domain.chapter.model.Chapter
import eu.kanade.domain.chapter.model.ChapterUpdate
import kotlinx.coroutines.flow.Flow
interface ChapterRepository {
suspend fun addAll(chapters: List<Chapter>): List<Chapter>
suspend fun update(chapterUpdate: ChapterUpdate)
suspend fun updateAll(chapterUpdates: List<ChapterUpdate>)
suspend fun removeChaptersWithIds(chapterIds: List<Long>)
suspend fun getChapterByMangaId(mangaId: Long): List<Chapter>
suspend fun getBookmarkedChaptersByMangaId(mangaId: Long): List<Chapter>
suspend fun getChapterById(id: Long): Chapter?
suspend fun getChapterByMangaIdAsFlow(mangaId: Long): Flow<List<Chapter>>
suspend fun getChapterByUrlAndMangaId(url: String, mangaId: Long): Chapter?
}

View File

@ -0,0 +1,19 @@
package eu.kanade.domain.download.interactor
import eu.kanade.domain.chapter.model.Chapter
import eu.kanade.domain.manga.model.Manga
import eu.kanade.tachiyomi.data.download.DownloadManager
import eu.kanade.tachiyomi.source.SourceManager
import eu.kanade.tachiyomi.util.lang.withNonCancellableContext
class DeleteDownload(
private val sourceManager: SourceManager,
private val downloadManager: DownloadManager,
) {
suspend fun awaitAll(manga: Manga, vararg chapters: Chapter) = withNonCancellableContext {
sourceManager.get(manga.source)?.let { source ->
downloadManager.deleteChapters(chapters.toList(), manga, source)
}
}
}

View File

@ -0,0 +1,34 @@
package eu.kanade.domain.download.service
import eu.kanade.tachiyomi.core.preference.PreferenceStore
import eu.kanade.tachiyomi.core.provider.FolderProvider
class DownloadPreferences(
private val folderProvider: FolderProvider,
private val preferenceStore: PreferenceStore,
) {
fun downloadsDirectory() = preferenceStore.getString("download_directory", folderProvider.path())
fun downloadOnlyOverWifi() = preferenceStore.getBoolean("pref_download_only_over_wifi_key", true)
fun saveChaptersAsCBZ() = preferenceStore.getBoolean("save_chapter_as_cbz", true)
fun splitTallImages() = preferenceStore.getBoolean("split_tall_images", false)
fun autoDownloadWhileReading() = preferenceStore.getInt("auto_download_while_reading", 0)
fun removeAfterReadSlots() = preferenceStore.getInt("remove_after_read_slots", -1)
fun removeAfterMarkedAsRead() = preferenceStore.getBoolean("pref_remove_after_marked_as_read_key", false)
fun removeBookmarkedChapters() = preferenceStore.getBoolean("pref_remove_bookmarked", false)
fun removeExcludeCategories() = preferenceStore.getStringSet("remove_exclude_categories", emptySet())
fun downloadNewChapters() = preferenceStore.getBoolean("download_new", false)
fun downloadNewChapterCategories() = preferenceStore.getStringSet("download_new_categories", emptySet())
fun downloadNewChapterCategoriesExclude() = preferenceStore.getStringSet("download_new_categories_exclude", emptySet())
}

View File

@ -0,0 +1,32 @@
package eu.kanade.domain.extension.interactor
import eu.kanade.domain.source.service.SourcePreferences
import eu.kanade.tachiyomi.extension.ExtensionManager
import eu.kanade.tachiyomi.util.system.LocaleHelper
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
class GetExtensionLanguages(
private val preferences: SourcePreferences,
private val extensionManager: ExtensionManager,
) {
fun subscribe(): Flow<List<String>> {
return combine(
preferences.enabledLanguages().changes(),
extensionManager.availableExtensionsFlow,
) { enabledLanguage, availableExtensions ->
availableExtensions
.flatMap { ext ->
if (ext.sources.isEmpty()) {
listOf(ext.lang)
} else {
ext.sources.map { it.lang }
}
}
.distinct()
.sortedWith(
compareBy<String> { it !in enabledLanguage }.then(LocaleHelper.comparator),
)
}
}
}

View File

@ -0,0 +1,37 @@
package eu.kanade.domain.extension.interactor
import eu.kanade.domain.source.service.SourcePreferences
import eu.kanade.tachiyomi.extension.model.Extension
import eu.kanade.tachiyomi.source.Source
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map
class GetExtensionSources(
private val preferences: SourcePreferences,
) {
fun subscribe(extension: Extension.Installed): Flow<List<ExtensionSourceItem>> {
val isMultiSource = extension.sources.size > 1
val isMultiLangSingleSource =
isMultiSource && extension.sources.map { it.name }.distinct().size == 1
return preferences.disabledSources().changes().map { disabledSources ->
fun Source.isEnabled() = id.toString() !in disabledSources
extension.sources
.map { source ->
ExtensionSourceItem(
source = source,
enabled = source.isEnabled(),
labelAsName = isMultiSource && isMultiLangSingleSource.not(),
)
}
}
}
}
data class ExtensionSourceItem(
val source: Source,
val enabled: Boolean,
val labelAsName: Boolean,
)

View File

@ -0,0 +1,60 @@
package eu.kanade.domain.extension.interactor
import eu.kanade.domain.extension.model.Extensions
import eu.kanade.domain.source.service.SourcePreferences
import eu.kanade.tachiyomi.extension.ExtensionManager
import eu.kanade.tachiyomi.extension.model.Extension
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
class GetExtensionsByType(
private val preferences: SourcePreferences,
private val extensionManager: ExtensionManager,
) {
fun subscribe(): Flow<Extensions> {
val showNsfwSources = preferences.showNsfwSource().get()
return combine(
preferences.enabledLanguages().changes(),
extensionManager.installedExtensionsFlow,
extensionManager.untrustedExtensionsFlow,
extensionManager.availableExtensionsFlow,
) { _activeLanguages, _installed, _untrusted, _available ->
val (updates, installed) = _installed
.filter { (showNsfwSources || it.isNsfw.not()) }
.sortedWith(
compareBy<Extension.Installed> { it.isObsolete.not() }
.thenBy(String.CASE_INSENSITIVE_ORDER) { it.name },
)
.partition { it.hasUpdate }
val untrusted = _untrusted
.sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER) { it.name })
val available = _available
.filter { extension ->
_installed.none { it.pkgName == extension.pkgName } &&
_untrusted.none { it.pkgName == extension.pkgName } &&
(showNsfwSources || extension.isNsfw.not())
}
.flatMap { ext ->
if (ext.sources.isEmpty()) {
return@flatMap if (ext.lang in _activeLanguages) listOf(ext) else emptyList()
}
ext.sources.filter { it.lang in _activeLanguages }
.map {
ext.copy(
name = it.name,
lang = it.lang,
pkgName = "${ext.pkgName}-${it.id}",
sources = listOf(it),
)
}
}
.sortedWith(compareBy(String.CASE_INSENSITIVE_ORDER) { it.name })
Extensions(updates, installed, available, untrusted)
}
}
}

View File

@ -0,0 +1,10 @@
package eu.kanade.domain.extension.model
import eu.kanade.tachiyomi.extension.model.Extension
data class Extensions(
val updates: List<Extension.Installed>,
val installed: List<Extension.Installed>,
val available: List<Extension.Available>,
val untrusted: List<Extension.Untrusted>,
)

View File

@ -0,0 +1,14 @@
package eu.kanade.domain.history.interactor
import eu.kanade.domain.history.model.HistoryWithRelations
import eu.kanade.domain.history.repository.HistoryRepository
import kotlinx.coroutines.flow.Flow
class GetHistory(
private val repository: HistoryRepository,
) {
fun subscribe(query: String): Flow<List<HistoryWithRelations>> {
return repository.getHistory(query)
}
}

View File

@ -0,0 +1,52 @@
package eu.kanade.domain.history.interactor
import eu.kanade.domain.chapter.interactor.GetChapterByMangaId
import eu.kanade.domain.chapter.model.Chapter
import eu.kanade.domain.history.repository.HistoryRepository
import eu.kanade.domain.manga.interactor.GetManga
import eu.kanade.tachiyomi.util.chapter.getChapterSort
import kotlin.math.max
class GetNextChapters(
private val getChapterByMangaId: GetChapterByMangaId,
private val getManga: GetManga,
private val historyRepository: HistoryRepository,
) {
suspend fun await(onlyUnread: Boolean = true): List<Chapter> {
val history = historyRepository.getLastHistory() ?: return emptyList()
return await(history.mangaId, history.chapterId, onlyUnread)
}
suspend fun await(mangaId: Long, onlyUnread: Boolean = true): List<Chapter> {
val manga = getManga.await(mangaId) ?: return emptyList()
val chapters = getChapterByMangaId.await(mangaId)
.sortedWith(getChapterSort(manga, sortDescending = false))
return if (onlyUnread) {
chapters.filterNot { it.read }
} else {
chapters
}
}
suspend fun await(mangaId: Long, fromChapterId: Long, onlyUnread: Boolean = true): List<Chapter> {
val chapters = await(mangaId, onlyUnread)
val currChapterIndex = chapters.indexOfFirst { it.id == fromChapterId }
val nextChapters = chapters.subList(max(0, currChapterIndex), chapters.size)
if (onlyUnread) {
return nextChapters
}
// The "next chapter" is either:
// - The current chapter if it isn't completely read
// - The chapters after the current chapter if the current one is completely read
val fromChapter = chapters.getOrNull(currChapterIndex)
return if (fromChapter != null && !fromChapter.read) {
nextChapters
} else {
nextChapters.drop(1)
}
}
}

View File

@ -0,0 +1,12 @@
package eu.kanade.domain.history.interactor
import eu.kanade.domain.history.repository.HistoryRepository
class GetTotalReadDuration(
private val repository: HistoryRepository,
) {
suspend fun await(): Long {
return repository.getTotalReadDuration()
}
}

View File

@ -0,0 +1,21 @@
package eu.kanade.domain.history.interactor
import eu.kanade.domain.history.model.HistoryWithRelations
import eu.kanade.domain.history.repository.HistoryRepository
class RemoveHistory(
private val repository: HistoryRepository,
) {
suspend fun awaitAll(): Boolean {
return repository.deleteAllHistory()
}
suspend fun await(history: HistoryWithRelations) {
repository.resetHistory(history.id)
}
suspend fun await(mangaId: Long) {
repository.resetHistoryByMangaId(mangaId)
}
}

View File

@ -0,0 +1,13 @@
package eu.kanade.domain.history.interactor
import eu.kanade.domain.history.model.HistoryUpdate
import eu.kanade.domain.history.repository.HistoryRepository
class UpsertHistory(
private val historyRepository: HistoryRepository,
) {
suspend fun await(historyUpdate: HistoryUpdate) {
historyRepository.upsertHistory(historyUpdate)
}
}

View File

@ -0,0 +1,10 @@
package eu.kanade.domain.history.model
import java.util.Date
data class History(
val id: Long,
val chapterId: Long,
val readAt: Date?,
val readDuration: Long,
)

View File

@ -0,0 +1,9 @@
package eu.kanade.domain.history.model
import java.util.Date
data class HistoryUpdate(
val chapterId: Long,
val readAt: Date,
val sessionReadDuration: Long,
)

View File

@ -0,0 +1,15 @@
package eu.kanade.domain.history.model
import eu.kanade.domain.manga.model.MangaCover
import java.util.Date
data class HistoryWithRelations(
val id: Long,
val chapterId: Long,
val mangaId: Long,
val title: String,
val chapterNumber: Float,
val readAt: Date?,
val readDuration: Long,
val coverData: MangaCover,
)

View File

@ -0,0 +1,22 @@
package eu.kanade.domain.history.repository
import eu.kanade.domain.history.model.HistoryUpdate
import eu.kanade.domain.history.model.HistoryWithRelations
import kotlinx.coroutines.flow.Flow
interface HistoryRepository {
fun getHistory(query: String): Flow<List<HistoryWithRelations>>
suspend fun getLastHistory(): HistoryWithRelations?
suspend fun getTotalReadDuration(): Long
suspend fun resetHistory(historyId: Long)
suspend fun resetHistoryByMangaId(mangaId: Long)
suspend fun deleteAllHistory(): Boolean
suspend fun upsertHistory(historyUpdate: HistoryUpdate)
}

View File

@ -0,0 +1,35 @@
package eu.kanade.domain.library.model
interface Flag {
val flag: Long
}
interface Mask {
val mask: Long
}
interface FlagWithMask : Flag, Mask
operator fun Long.contains(other: Flag): Boolean {
return if (other is Mask) {
other.flag == this and other.mask
} else {
other.flag == this
}
}
operator fun Long.plus(other: Flag): Long {
return if (other is Mask) {
this and other.mask.inv() or (other.flag and other.mask)
} else {
this or other.flag
}
}
operator fun Flag.plus(other: Flag): Long {
return if (other is Mask) {
this.flag and other.mask.inv() or (other.flag and other.mask)
} else {
this.flag or other.flag
}
}

View File

@ -0,0 +1,59 @@
package eu.kanade.domain.library.model
import eu.kanade.domain.category.model.Category
sealed class LibraryDisplayMode(
override val flag: Long,
) : FlagWithMask {
override val mask: Long = 0b00000011L
object CompactGrid : LibraryDisplayMode(0b00000000)
object ComfortableGrid : LibraryDisplayMode(0b00000001)
object List : LibraryDisplayMode(0b00000010)
object CoverOnlyGrid : LibraryDisplayMode(0b00000011)
object Serializer {
fun deserialize(serialized: String): LibraryDisplayMode {
return LibraryDisplayMode.deserialize(serialized)
}
fun serialize(value: LibraryDisplayMode): String {
return value.serialize()
}
}
companion object {
val values = setOf(CompactGrid, ComfortableGrid, List, CoverOnlyGrid)
val default = CompactGrid
fun valueOf(flag: Long?): LibraryDisplayMode {
if (flag == null) return default
return values
.find { mode -> mode.flag == flag and mode.mask }
?: default
}
fun deserialize(serialized: String): LibraryDisplayMode {
return when (serialized) {
"COMFORTABLE_GRID" -> ComfortableGrid
"COMPACT_GRID" -> CompactGrid
"COVER_ONLY_GRID" -> CoverOnlyGrid
"LIST" -> List
else -> default
}
}
}
fun serialize(): String {
return when (this) {
ComfortableGrid -> "COMFORTABLE_GRID"
CompactGrid -> "COMPACT_GRID"
CoverOnlyGrid -> "COVER_ONLY_GRID"
List -> "LIST"
}
}
}
val Category.display: LibraryDisplayMode
get() = LibraryDisplayMode.valueOf(flags)

View File

@ -0,0 +1,24 @@
package eu.kanade.domain.library.model
import eu.kanade.domain.manga.model.Manga
data class LibraryManga(
val manga: Manga,
val category: Long,
val totalChapters: Long,
val readCount: Long,
val bookmarkCount: Long,
val latestUpload: Long,
val chapterFetchedAt: Long,
val lastRead: Long,
) {
val id: Long = manga.id
val unreadCount
get() = totalChapters - readCount
val hasBookmarks
get() = bookmarkCount > 0
val hasStarted = readCount > 0
}

View File

@ -0,0 +1,119 @@
package eu.kanade.domain.library.model
import eu.kanade.domain.category.model.Category
data class LibrarySort(
val type: Type,
val direction: Direction,
) : FlagWithMask {
override val flag: Long
get() = type + direction
override val mask: Long
get() = type.mask or direction.mask
val isAscending: Boolean
get() = direction == Direction.Ascending
sealed class Type(
override val flag: Long,
) : FlagWithMask {
override val mask: Long = 0b00111100L
object Alphabetical : Type(0b00000000)
object LastRead : Type(0b00000100)
object LastUpdate : Type(0b00001000)
object UnreadCount : Type(0b00001100)
object TotalChapters : Type(0b00010000)
object LatestChapter : Type(0b00010100)
object ChapterFetchDate : Type(0b00011000)
object DateAdded : Type(0b00011100)
companion object {
fun valueOf(flag: Long): Type {
return types.find { type -> type.flag == flag and type.mask } ?: default.type
}
}
}
sealed class Direction(
override val flag: Long,
) : FlagWithMask {
override val mask: Long = 0b01000000L
object Ascending : Direction(0b01000000)
object Descending : Direction(0b00000000)
companion object {
fun valueOf(flag: Long): Direction {
return directions.find { direction -> direction.flag == flag and direction.mask } ?: default.direction
}
}
}
object Serializer {
fun deserialize(serialized: String): LibrarySort {
return LibrarySort.deserialize(serialized)
}
fun serialize(value: LibrarySort): String {
return value.serialize()
}
}
companion object {
val types = setOf(Type.Alphabetical, Type.LastRead, Type.LastUpdate, Type.UnreadCount, Type.TotalChapters, Type.LatestChapter, Type.ChapterFetchDate, Type.DateAdded)
val directions = setOf(Direction.Ascending, Direction.Descending)
val default = LibrarySort(Type.Alphabetical, Direction.Ascending)
fun valueOf(flag: Long): LibrarySort {
return LibrarySort(
Type.valueOf(flag),
Direction.valueOf(flag),
)
}
fun deserialize(serialized: String): LibrarySort {
if (serialized.isEmpty()) return default
return try {
val values = serialized.split(",")
val type = when (values[0]) {
"ALPHABETICAL" -> Type.Alphabetical
"LAST_READ" -> Type.LastRead
"LAST_MANGA_UPDATE" -> Type.LastUpdate
"UNREAD_COUNT" -> Type.UnreadCount
"TOTAL_CHAPTERS" -> Type.TotalChapters
"LATEST_CHAPTER" -> Type.LatestChapter
"CHAPTER_FETCH_DATE" -> Type.ChapterFetchDate
"DATE_ADDED" -> Type.DateAdded
else -> Type.Alphabetical
}
val ascending = if (values[1] == "ASCENDING") Direction.Ascending else Direction.Descending
LibrarySort(type, ascending)
} catch (e: Exception) {
default
}
}
}
fun serialize(): String {
val type = when (type) {
Type.Alphabetical -> "ALPHABETICAL"
Type.LastRead -> "LAST_READ"
Type.LastUpdate -> "LAST_MANGA_UPDATE"
Type.UnreadCount -> "UNREAD_COUNT"
Type.TotalChapters -> "TOTAL_CHAPTERS"
Type.LatestChapter -> "LATEST_CHAPTER"
Type.ChapterFetchDate -> "CHAPTER_FETCH_DATE"
Type.DateAdded -> "DATE_ADDED"
}
val direction = if (direction == Direction.Ascending) "ASCENDING" else "DESCENDING"
return "$type,$direction"
}
}
val Category.sort: LibrarySort
get() = LibrarySort.valueOf(flags)

View File

@ -0,0 +1,113 @@
package eu.kanade.domain.library.service
import eu.kanade.domain.library.model.LibraryDisplayMode
import eu.kanade.domain.library.model.LibrarySort
import eu.kanade.domain.manga.model.Manga
import eu.kanade.tachiyomi.core.preference.PreferenceStore
import eu.kanade.tachiyomi.data.preference.DEVICE_ONLY_ON_WIFI
import eu.kanade.tachiyomi.data.preference.MANGA_HAS_UNREAD
import eu.kanade.tachiyomi.data.preference.MANGA_NON_COMPLETED
import eu.kanade.tachiyomi.data.preference.MANGA_NON_READ
import eu.kanade.tachiyomi.widget.ExtendedNavigationView
class LibraryPreferences(
private val preferenceStore: PreferenceStore,
) {
fun libraryDisplayMode() = preferenceStore.getObject("pref_display_mode_library", LibraryDisplayMode.default, LibraryDisplayMode.Serializer::serialize, LibraryDisplayMode.Serializer::deserialize)
fun librarySortingMode() = preferenceStore.getObject("library_sorting_mode", LibrarySort.default, LibrarySort.Serializer::serialize, LibrarySort.Serializer::deserialize)
fun portraitColumns() = preferenceStore.getInt("pref_library_columns_portrait_key", 0)
fun landscapeColumns() = preferenceStore.getInt("pref_library_columns_landscape_key", 0)
fun libraryUpdateInterval() = preferenceStore.getInt("pref_library_update_interval_key", 24)
fun libraryUpdateLastTimestamp() = preferenceStore.getLong("library_update_last_timestamp", 0L)
fun libraryUpdateDeviceRestriction() = preferenceStore.getStringSet("library_update_restriction", setOf(DEVICE_ONLY_ON_WIFI))
fun libraryUpdateMangaRestriction() = preferenceStore.getStringSet("library_update_manga_restriction", setOf(MANGA_HAS_UNREAD, MANGA_NON_COMPLETED, MANGA_NON_READ))
fun autoUpdateMetadata() = preferenceStore.getBoolean("auto_update_metadata", false)
fun autoUpdateTrackers() = preferenceStore.getBoolean("auto_update_trackers", false)
fun showContinueReadingButton() = preferenceStore.getBoolean("display_continue_reading_button", false)
// region Filter
fun filterDownloaded() = preferenceStore.getInt("pref_filter_library_downloaded", ExtendedNavigationView.Item.TriStateGroup.State.IGNORE.value)
fun filterUnread() = preferenceStore.getInt("pref_filter_library_unread", ExtendedNavigationView.Item.TriStateGroup.State.IGNORE.value)
fun filterStarted() = preferenceStore.getInt("pref_filter_library_started", ExtendedNavigationView.Item.TriStateGroup.State.IGNORE.value)
fun filterBookmarked() = preferenceStore.getInt("pref_filter_library_bookmarked", ExtendedNavigationView.Item.TriStateGroup.State.IGNORE.value)
fun filterCompleted() = preferenceStore.getInt("pref_filter_library_completed", ExtendedNavigationView.Item.TriStateGroup.State.IGNORE.value)
fun filterTracking(name: Int) = preferenceStore.getInt("pref_filter_library_tracked_$name", ExtendedNavigationView.Item.TriStateGroup.State.IGNORE.value)
// endregion
// region Badges
fun downloadBadge() = preferenceStore.getBoolean("display_download_badge", false)
fun localBadge() = preferenceStore.getBoolean("display_local_badge", true)
fun unreadBadge() = preferenceStore.getBoolean("display_unread_badge", true)
fun languageBadge() = preferenceStore.getBoolean("display_language_badge", false)
fun newShowUpdatesCount() = preferenceStore.getBoolean("library_show_updates_count", true)
fun newUpdatesCount() = preferenceStore.getInt("library_unseen_updates_count", 0)
// endregion
// region Category
fun defaultCategory() = preferenceStore.getInt("default_category", -1)
fun lastUsedCategory() = preferenceStore.getInt("last_used_category", 0)
fun categoryTabs() = preferenceStore.getBoolean("display_category_tabs", true)
fun categoryNumberOfItems() = preferenceStore.getBoolean("display_number_of_items", false)
fun categorizedDisplaySettings() = preferenceStore.getBoolean("categorized_display", false)
fun libraryUpdateCategories() = preferenceStore.getStringSet("library_update_categories", emptySet())
fun libraryUpdateCategoriesExclude() = preferenceStore.getStringSet("library_update_categories_exclude", emptySet())
// endregion
// region Chapter
fun filterChapterByRead() = preferenceStore.getLong("default_chapter_filter_by_read", Manga.SHOW_ALL)
fun filterChapterByDownloaded() = preferenceStore.getLong("default_chapter_filter_by_downloaded", Manga.SHOW_ALL)
fun filterChapterByBookmarked() = preferenceStore.getLong("default_chapter_filter_by_bookmarked", Manga.SHOW_ALL)
// and upload date
fun sortChapterBySourceOrNumber() = preferenceStore.getLong("default_chapter_sort_by_source_or_number", Manga.CHAPTER_SORTING_SOURCE)
fun displayChapterByNameOrNumber() = preferenceStore.getLong("default_chapter_display_by_name_or_number", Manga.CHAPTER_DISPLAY_NAME)
fun sortChapterByAscendingOrDescending() = preferenceStore.getLong("default_chapter_sort_by_ascending_or_descending", Manga.CHAPTER_SORT_DESC)
fun setChapterSettingsDefault(manga: Manga) {
filterChapterByRead().set(manga.unreadFilterRaw)
filterChapterByDownloaded().set(manga.downloadedFilterRaw)
filterChapterByBookmarked().set(manga.bookmarkedFilterRaw)
sortChapterBySourceOrNumber().set(manga.sorting)
displayChapterByNameOrNumber().set(manga.displayMode)
sortChapterByAscendingOrDescending().set(if (manga.sortDescending()) Manga.CHAPTER_SORT_DESC else Manga.CHAPTER_SORT_ASC)
}
fun autoClearChapterCache() = preferenceStore.getBoolean("auto_clear_chapter_cache", false)
// endregion
}

View File

@ -0,0 +1,13 @@
package eu.kanade.domain.manga.interactor
import eu.kanade.domain.manga.model.Manga
import eu.kanade.domain.manga.repository.MangaRepository
class GetDuplicateLibraryManga(
private val mangaRepository: MangaRepository,
) {
suspend fun await(title: String, sourceId: Long): Manga? {
return mangaRepository.getDuplicateLibraryManga(title.lowercase(), sourceId)
}
}

View File

@ -0,0 +1,18 @@
package eu.kanade.domain.manga.interactor
import eu.kanade.domain.manga.model.Manga
import eu.kanade.domain.manga.repository.MangaRepository
import kotlinx.coroutines.flow.Flow
class GetFavorites(
private val mangaRepository: MangaRepository,
) {
suspend fun await(): List<Manga> {
return mangaRepository.getFavorites()
}
fun subscribe(sourceId: Long): Flow<List<Manga>> {
return mangaRepository.getFavoritesBySourceId(sourceId)
}
}

View File

@ -0,0 +1,18 @@
package eu.kanade.domain.manga.interactor
import eu.kanade.domain.library.model.LibraryManga
import eu.kanade.domain.manga.repository.MangaRepository
import kotlinx.coroutines.flow.Flow
class GetLibraryManga(
private val mangaRepository: MangaRepository,
) {
suspend fun await(): List<LibraryManga> {
return mangaRepository.getLibraryManga()
}
fun subscribe(): Flow<List<LibraryManga>> {
return mangaRepository.getLibraryMangaAsFlow()
}
}

View File

@ -0,0 +1,29 @@
package eu.kanade.domain.manga.interactor
import eu.kanade.domain.manga.model.Manga
import eu.kanade.domain.manga.repository.MangaRepository
import eu.kanade.tachiyomi.util.system.logcat
import kotlinx.coroutines.flow.Flow
import logcat.LogPriority
class GetManga(
private val mangaRepository: MangaRepository,
) {
suspend fun await(id: Long): Manga? {
return try {
mangaRepository.getMangaById(id)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
null
}
}
suspend fun subscribe(id: Long): Flow<Manga> {
return mangaRepository.getMangaByIdAsFlow(id)
}
fun subscribe(url: String, sourceId: Long): Flow<Manga?> {
return mangaRepository.getMangaByUrlAndSourceIdAsFlow(url, sourceId)
}
}

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