Commit Graph

583 Commits

Author SHA1 Message Date
Andreas 2674570792 Use SQLDelight for a Category related queries (#7438) 2022-07-02 16:12:06 -04:00
Andreas 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
Andreas 1f10b79ee8 Use SQLDelight on Updates screen (#7423) 2022-06-30 22:18:12 -04:00
AntsyLich e1525a5125 DownloadProvider: Only provide necessary info and not whole chapter/manga class (#7411) 2022-06-30 09:20:55 -04:00
AntsyLich 7440086ef1 Fix Mark previous as read (#7396) 2022-06-27 09:37:30 -04:00
arkon 65264e3ef5 Migrate more track DB calls to SQLDelight 2022-06-26 19:46:41 -04:00
AntsyLich 04f0ca7846 Use sqldelight for direct db calls in MangaPresenter (#7366) 2022-06-26 15:54:34 -04:00
Ivan Iskandar 924dfa19cf MangaScreen: Fix action mode download button not working (#7385) 2022-06-26 13:37:41 -04:00
Ivan Iskandar 0e0c1dcdc5 MangaPresenter: Fix state updates when opening a new manga entry (#7379) 2022-06-26 09:45:06 -04:00
Ivan Iskandar 33a778873a MangaController overhaul (#7244) 2022-06-25 11:03:48 -04:00
Ivan Iskandar a77bce7b37 ChapterDownloadView: Convert to compose (#7354) 2022-06-24 15:42:30 -04:00
arkon 915e38f636 Fix crashes from KTX extension changes 2022-06-24 12:06:43 -04:00
AntsyLich 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
arkon 254f021903 Minor cleanup 2022-06-20 22:51:04 -04:00
Ivan Iskandar 8fedd2d5f1 Convert cover dialog view to compose (#7346) 2022-06-20 22:31:36 -04:00
arkon cb1830d747 More minor refactorings
Extracted from #7244

Co-authored-by: ivaniskandar <ivaniskandar@users.noreply.github.com>
2022-06-19 17:32:31 -04:00
arkon a7decdb62d Migrate some categories SQL calls to SQLDelight 2022-06-19 16:38:42 -04:00
Ivan Iskandar 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
arkon 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
Ivan Iskandar 28e7009b49 Convert edit cover function to suspend function (#7330) 2022-06-18 10:01:03 -04:00
Ivan Iskandar 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
AntsyLich 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
AntsyLich b96686e6ad Fix chapter list live update (#7296) 2022-06-12 11:23:41 -04:00
AntsyLich 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
Ivan Iskandar 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
arkon 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
CVIUS 5002692bda Add long click action on chapter download button (#7125) 2022-05-14 11:37:47 -04:00
arkon c7707dc50e Minor cleanup 2022-05-11 22:17:12 -04:00
arkon b950370f12 Address some build warnings 2022-05-11 18:08:49 -04:00
arkon 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
arkon e421eb61bc Extract add duplicate manga dialog into a controller 2022-05-10 09:19:10 -04:00
arkon 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
arkon 7e2f1d729f Clean up repetitive controller transactions 2022-04-23 12:10:32 -04:00
arkon 2b79295240 Revert "Revert history Compose/SQLDelight changes"
This reverts commit 96c894ce5b.
2022-04-22 17:35:18 -04:00
arkon 96c894ce5b Revert history Compose/SQLDelight changes 2022-04-22 17:27:58 -04:00
arkon 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
arkon f1e5cccee7 Add placeholder color for Compose manga covers 2022-04-21 19:02:54 -04:00
Andreas 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
arkon 65a8b63b3b Move chapter name cleaning logic to holder (fixes #6955) 2022-04-18 09:26:43 -04:00
arkon 89decf3474 Always remove manga title from if it prefixes chapter names (related to #6913) 2022-04-15 15:52:48 -04:00
jmir1 0894b1394f Fix cover sharing error string (#6911) 2022-04-12 09:10:32 -04:00
arkon 5afff31f72 Formatting 2022-04-08 16:44:23 -04:00
arkon 7318f4f5dd Remove some dead code 2022-04-08 16:32:34 -04:00
arkon 346652e508 Ensure media store scan is triggered after saving an image (fixes #6808) 2022-04-08 15:55:12 -04:00
arkon f0eb42e72d Update linter 2022-04-08 15:30:39 -04:00
Ivan Iskandar ffd9c6995a UpdatesController: Don't init adapter until chapter data is ready (#6824)
Considering there's no pagination for this list, the data loading can take some
time. So this will show the existing refresh indicator instead of empty view
while the list is loading.
2022-03-25 22:20:47 -04:00
Andreas 1163aa4e4e Share logic for saving page/cover (#6787)
* Use MediaStore on newer Android Q or newer

* Use flow instead of Observable

* Review comment fixes

* Use suspended function instead of flow
2022-03-19 16:46:23 -04:00
Ivan Iskandar 10eef282fa Coil 2.x upgrade (#6725)
* Migrate to Coil 2

* Adapt to use coil disk cache

* Update to alpha 7

* Update to alpha 8

* Update to rc01
2022-03-04 16:04:32 -05:00
FourTOne5 08ee858f64 Adjust mark as unread and mark previous as read action visibility (#6703) 2022-03-01 22:21:15 -05:00
Felix Kaiser 71ddb16574 Detect identical mangas when adding to library (#6579)
* added duplicate manga check

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

* added german translations for newly added strings

* Revert "added german translations for newly added strings"

This reverts commit 71ada620671651daeeb2546aecd02400a4bc86bc.

* changed `AlertDialog.Builder` to `MaterialAlertDialogBuilder`

* using SQL query instead of filtering entire library with Kotlin
2022-02-12 11:13:27 -05:00