Commit Graph

214 Commits

Author SHA1 Message Date
arkon
7ec87e76db Migrate TriState usages to TriStateFilter enum 2023-02-24 16:09:47 -05:00
arkon
727399611d Migrate library settings sheet to Compose 2023-02-18 20:55:55 -05:00
arkon
07fdb74fbc Minor settings sheet cleanup 2023-02-18 19:00:19 -05:00
arkon
ee818bc7c5 Move chapter utils to domain module 2023-02-18 15:24:04 -05:00
arkon
f816196df2 Move more things to domain module 2023-02-18 15:14:04 -05:00
arkon
2970eca9e4 Remove background extensions updates check
Same reasoning as removing app update check. It gets kicked off in the foreground now too.
2023-02-12 23:07:11 -05:00
arkon
6348cbaeb7 Add option to hide entries already in library when browsing sources
Closes #2941
2023-02-12 22:28:12 -05:00
arkon
ab6dfe9e25 Bump dependencies
Fixes #8168, I think.
2023-02-08 22:53:42 -05:00
arkon
f2c48480b6 Move some interactors to domain module 2023-01-27 22:37:17 -05:00
arkon
1730dd6af1 Move more things around 2023-01-27 22:31:12 -05:00
Andreas
cdf242e8c8
Move more to data and domain modules (#8973) 2023-01-22 16:19:22 -05:00
Andreas
aee785a8bb
Move more implementation to data module (#8971) 2023-01-22 11:44:39 -05:00
arkon
d45fc1e245 Move more models to domain module 2023-01-22 11:04:50 -05:00
arkon
14500ba4f8 Move more repositories to domain module 2023-01-22 10:59:52 -05:00
arkon
345e9c2a9a Move more models to domain module 2023-01-22 10:54:28 -05:00
arkon
b53e24e0db Move more models to domain module 2023-01-22 10:37:13 -05:00
Andreas
d3a73fc228
Move Category model and repository to domain and data layer (#8967)
To keep the commit from being 100+ files the interactors wasn't moved.

The domain module like the data module uses `tachiyomi` instead of `eu.kanade.tachiyomi` for package names
2023-01-22 10:12:29 -05:00
stevenyomi
293b967858
Fix installing extensions on MIUI (#8916)
* Fix installing extensions on MIUI

* isShizukuReady -> isShizukuInstalled
2023-01-15 10:32:27 -05:00
zbue
f301dc64f0
Allow partially read chapters to be marked as unread in updates screen (#8884)
* Allow partially read chapters to be marked as unread in updates screen

* Review changes

* Review changes 2
2023-01-14 18:26:40 -05:00
zbue
33a2219716
Enable confirmButton only when needed to respond to user input (#8848)
* Enable `confirmButton` when appropriate

* Show error in dialog instead

* Follow M3 guidelines
2023-01-14 18:24:57 -05:00
arkon
a0f47d3f1b Don't exclude same source when checking for duplicate entries
Closes #8870
2023-01-08 22:06:42 -05:00
arkon
68345e636e Remove ability to hide unread chapter badges in library 2023-01-07 14:25:35 -05:00
arkon
50d46fe7f6 Prioritize "all" ("Multi") lang in extensions lists
Fixes #8811
Fixes #8812
2023-01-05 22:34:24 -05:00
arkon
5f4825465e Use actual indexes instead of existing order number when reordering categories
Fixes #8738
2022-12-15 23:06:05 -05:00
Two-Ai
171db639ff
Fix SetMangaViewerFlags (#8719)
Stop clearing old viewer flags when setting a flag
2022-12-11 16:12:41 -05:00
Soitora
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
Ivan Iskandar
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
arkon
696dc59ea5 More domain model migrations 2022-12-03 22:54:18 -05:00
AntsyLich
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
AntsyLich
ba91b483a0
Delayed Tracking Update related fix (#8642)
* Delayed Tracking Update related fix

* Lint
2022-12-01 23:01:24 -05:00
Andreas
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
AntsyLich
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
arkon
e2179a6669 Avoid concurrency issues when reordering categories
Maybe fixes #8372
2022-11-22 23:12:23 -05:00
Andreas
f1b85ff39d
Use Voyager on Extension Details screen (#8576) 2022-11-20 14:36:03 -05:00
arkon
6017229d1b Clean up ComicInfo stuff a bit more 2022-11-13 12:01:19 -05:00
arkon
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
arkon
6ada3c90ff Clean up ComicInfo stuff a bit 2022-11-11 16:34:18 -05:00
Shamicen
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
arkon
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
arkon
c6c4c1c393 Migrate to more domain model usages 2022-11-10 22:42:44 -05:00
d-najd
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
arkon
8749be518f Adjust read next history logic
Closes #8454
2022-11-05 10:37:32 -04:00
arkon
280b0f42db Toggle enabled source in bulk
Maybe fixes #8439
2022-11-04 09:39:23 -04:00
arkon
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
arkon
cac80daa71 Set source properly when creating manga entries
Fixes #8333
2022-10-30 17:40:17 -04:00
arkon
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
arkon
5efb31bd71 Fix some crashes 2022-10-28 21:10:03 -04:00
arkon
37cb4ec0c2 Don't filter out partially read chapters when marking as unread
Fixes #8313
2022-10-28 18:29:00 -04:00
AntsyLich
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
Ivan Iskandar
187e9f94aa
Set source id when inserting to db (#8300) 2022-10-27 22:34:21 -04:00
AntsyLich
0657a52924
Cleanup history repository (#8297)
* Cleanup history repository

* Lint
2022-10-27 18:03:52 -04:00
arkon
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
arkon
d5b4bb49b1 Refactor network to local manga logic
Maybe fixes #8289
2022-10-26 23:01:21 -04:00
arkon
6e04822f5e Only enable ACRA crash logging in preview and stable release builds 2022-10-22 15:47:09 -04:00
d-najd
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
arkon
93925a7286 Remove redundancy in ExtensionManager 2022-10-21 14:42:21 -04:00
arkon
b04807e53a Proper DI instantiation for some more download related classes 2022-10-21 14:29:44 -04:00
stevenyomi
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
Andreas
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
AntsyLich
ea092fa175
Fix selection in library (#8233) 2022-10-18 09:32:34 -04:00
AntsyLich
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
AntsyLich
a2b21e5ad6
Retain bookmark of readded chapters (#8205)
* Retain bookmark of readded chapters

* Fix typo
2022-10-15 14:22:58 -04:00
Ivan Iskandar
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
Swords
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
arkon
bc1fbfac9d Minor cleanup 2022-10-14 16:13:50 -04:00
AntsyLich
ea8383978b
Move LibraryManga to domain layer (#8126) 2022-10-01 11:30:51 -04:00
AntsyLich
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
Ivan Iskandar
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
Ivan Iskandar
98a4f6cccb
manga-refresh-state (#8090) 2022-09-27 17:49:21 -04:00
Alessandro Jean
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
Andreas
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
Andreas
b5dca2eb09
Move chapter preferences from PreferencesHelper to LibraryPrefrences (#8061) 2022-09-24 10:14:16 -04:00
Andreas
5cdcc1679f
Split backup preferences from PreferencesHelper (#8051) 2022-09-22 08:57:42 -04:00
arkon
b37b3767f3 Minor cleanup
Also add POST_NOTIFICATIONS permissions to make Android Studio stop complaining about it.
2022-09-21 22:39:32 -04:00
Andreas
e82963c9ef
Split download preferences from PreferencesHelper (#8048) 2022-09-21 17:45:07 -04:00
stevenyomi
2ced56e490
Fix error when updating manga details with uninitialized title (#8045) 2022-09-21 09:19:45 -04:00
Andreas
e568951396
Split track preferences from PreferencesHelper (#8046) 2022-09-21 09:18:53 -04:00
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