Commit Graph

237 Commits

Author SHA1 Message Date
arkon
2b089648a3 Remove redundant preference keys 2022-09-20 00:13:33 -04:00
Andreas
c740558327
Split library preferences from PreferencesHelper (#8036) 2022-09-19 23:55:07 -04:00
arkon
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
Andreas
30b3b2d3ff
Split source preferences from PreferencesHelper (#8029) 2022-09-18 10:36:41 -04:00
Andreas
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
AntsyLich
9e5d79aec3
Fix lint error (#8000) 2022-09-12 11:59:15 -04:00
AntsyLich
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
arkon
cd3cb72b65 Bump dependencies + linting 2022-09-10 23:57:03 -04:00
Andreas
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
AntsyLich
ff4a217730
Cleanup chapter name when syncing chapter with source (#7910) 2022-09-02 10:07:50 -04:00
Andreas
d4b764fa31
Use Compose on BrowseSourceScreens (#7901) 2022-08-31 14:41:35 -04:00
arkon
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
Andreas
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
Ivan Iskandar
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
stevenyomi
e36e9d9d5c
Remove 1.x source models (#7781) 2022-08-18 14:07:13 -04:00
Andreas
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
stevenyomi
1f9f9662bc
Fix download chapter dir when scanlator is empty or changed (#7780) 2022-08-16 17:26:08 -04:00
AntsyLich
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
arkon
d6f1534ee8 Address misc. build warnings 2022-08-10 23:26:34 -04:00
Andreas
914831d51f
Move default category into database (#7676) 2022-08-05 09:32:10 -04:00
AntsyLich
2a875fe9b8
SyncChaptersWithSource: Fix early exit condition for readded chapters (#7661) 2022-07-31 10:58:55 -04:00
Andreas
039fe4a618
Fix Clear Database item trying to display language when empty (#7651) 2022-07-30 13:55:07 -04:00
Andreas
99ac30e59f
Use Compose on Clear Database screen (#7639) 2022-07-30 11:51:47 -04:00
Andreas
7d74b174e0
Merge GetExtensions and GetExtensionUpdates (#7646) 2022-07-29 15:09:49 -04:00
AntsyLich
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
Andreas
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
jobobby04
bdbe1c4d0f
Use MangaImpl defaults in Manga.create() (#7538) 2022-07-15 14:44:45 -04:00
AntsyLich
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
jobobby04
4684797dfb
Fix crash with chapterFlags in Manga.create() (#7530) 2022-07-14 17:16:45 -04:00
Andreas
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
Andreas
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
jobobby04
9357af2bcf
Fix default category name (#7477) 2022-07-07 11:56:58 -04:00
arkon
a3378e6080 More domain model usage 2022-07-03 16:51:11 -04:00
arkon
3791d82540 More domain model usage 2022-07-03 16:34:58 -04:00
arkon
a3ab8746bf More domain model usage 2022-07-03 16:12:31 -04:00
arkon
b3dd8b7355 More domain model usage 2022-07-03 13:21:48 -04:00
Andreas
17951cfd68
Use SQLDelight for all Manga related queries (#7447) 2022-07-03 10:17:41 -04:00
Andreas
29633b64aa
Use SQLDelight for all Chapter related queries (#7440) 2022-07-02 18:51:33 -04:00
arkon
76c0ead1db Migrate to more use of domain models 2022-07-02 17:14:19 -04:00
Andreas
2674570792
Use SQLDelight for a Category related queries (#7438) 2022-07-02 16:12:06 -04:00
arkon
21771e62aa More SQLDelight migrations 2022-07-02 15:19:52 -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
AntsyLich
deaded5af2
Reimplement chapter download indicator longpress (#7412) 2022-07-02 12:43:18 -04:00
AntsyLich
e1525a5125
DownloadProvider: Only provide necessary info and not whole chapter/manga class (#7411) 2022-06-30 09:20:55 -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
33a778873a
MangaController overhaul (#7244) 2022-06-25 11:03:48 -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
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
1b804e61cb
Fix cover fetching in compose views (#7315)
Make sure it passed thru the custom fetcher
2022-06-17 22:21:29 -04:00
Andreas
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
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
a01c370d63
Set db chapter metadata from correct chapter (#7303) 2022-06-14 09:09:21 -04:00
AntsyLich
693cc103ea
Add date_upload to toDbChapter() (#7297) 2022-06-12 11:44:02 -04:00
arkon
5ccde61ae1 Minor cleanup 2022-06-12 11:29:48 -04:00
AntsyLich
b96686e6ad
Fix chapter list live update (#7296) 2022-06-12 11:23:41 -04:00
AntsyLich
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
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
arkon
e15a867106 Convert clear database queries to SQLDelight 2022-06-10 21:33:56 -04:00
Andreas
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
AntsyLich
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
arkon
9a75232ca4 Minor cleanup 2022-05-19 17:43:27 -04:00
FourTOne5
fd9510e18f
Migrate extensions language filter screen to compose (#7169) 2022-05-19 17:29:40 -04:00
Andreas
2761d27aaa
Make extension list update when languages changes (#7168) 2022-05-19 08:32:21 -04:00
arkon
13943f77f7 Migrate extension details page to Compose 2022-05-15 16:35:33 -04:00
Andreas
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
arkon
5dc688dc2e Update reset viewer flags strings 2022-05-12 09:04:02 -04:00
FourTOne5
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
arkon
ae7df4fb7f Update linter 2022-05-10 17:54:52 -04:00
FourTOne5
55a1cdb1c7
Case insensitive sort in Source tab (#7067) 2022-05-03 08:45:34 -04:00
arkon
dee7830793 Update navigation bar padding in Compose screens 2022-04-30 11:59:39 -04:00
FourTOne5
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
Andreas
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
FourTOne5
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
Andreas
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
arkon
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
arkon
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
Andreas
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
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
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
Andreas
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