* Add category filters for Updates tab
Works just like Library Updates.
Provides a tab in the Updates tab filter dialog to allow for including
& excluding of updates belonging to a title from a given category.
Excludes overpower Includes, as with Library Updates.
A little helpful text informs users about this.
* Changelog
* [skip ci] Remove unused string
Leftover from before I realized the Default category will always be
available for in-/exclusion.
* Make :includeEmpty/:excludeEmpty true Boolean params
* "include" -> "included"
Consistency with #3607.
* Remove DISTINCT from getRecentUpdatesWithFilters
Apparently not needed anymore (though it was required at some point).
* [skip ci] Fix Changelog
* Replace java.time APIs with kotlin(x).(date)time
kotlinx-datetime explicitly says in its README that it does not cover
i18n, so we have to stick with using their toJavaX converters wherever
we localise dates and times.
Yes, some of these replacements are... questionable. But I wanted to
try and maximise the replacement for now.
* Bump kotlinx-datetime to 0.8.0
* More kotlin.time/kotlinx-datetime replacements
* Remove redundant init block & make attributes val
* Replace new use of java.time.Instant
* Rework library search to use an AST-based approach
* Spotless apply
* Move the filtering logic to the database
* Spotless apply
* Cleanup and separation of concerns
* Add `notes` to field and general search, and chapter read, total chapters to comparison search
* Handle searching for empty fields
* Add `language` as a field-only query option
* Clean up SQL clause generations
* Spotless apply
* Do not parse `-` as a negation when followed by a separator
* Revert moving filtering logic to database
* Changelog
* Use contains for genre instead of equals
* Add special handling for source name
* Add field-only query for source id
* Apply suggestions
* Add Filters to Updates screen
Behaves basically like the filters in the library:
- Unread: Show/Don't show unread chapters
- Downloaded: Show/Don't show downloaded chapters
- Started: Show/Don't show chapters that have some progress but aren't
fully Read
- Bookmarked: Show/Don't show chapters that have been bookmarked
Started behaves differently from its Library counterpart because the
actual manga data is not available at this point in time and I thought
calling getManga for each entry without caching would be a pretty bad
idea.
I have modelled this closely on the filter control flow in the
Library, but I'm sure this can be simplified/adjusted in some way.
* Move most filtering logic to SQL
Unread, Started, and Bookmarked filters are now part of the SQL query.
Download state cannot be filtered in the database so it remains in
Kotlin.
Because the Downloaded filter has to be run in Kotlin, the combine
flow uses the preferences flow twice, once to get the SQL query params
and once for the Kotlin filters (only Downloaded at this time).
* Add "Hide excluded scanlators" to update filters
Based on the work done in #1623 but integrated with the other filters
in this PR. Added the user as a co-author for credit.
Co-authored-by: Dani <17619547+shabnix@users.noreply.github.com>
---------
Co-authored-by: Dani <17619547+shabnix@users.noreply.github.com>
* Add query to get chapter count by manga and chapter number
* Add functions to get chapter count by manga and chapter number
* Only count read chapters
* Add interactor
* Savepoint
* Extract new chapter logic to separate function
* Update javadocs
* Add preference to toggle new functionality
* Add todo
* Add debug logcat
* Use string resource instead of hardcoding title
* Add temporary logcat for debugging
* Fix detekt issues
* Update javadocs
* Update download unread chapters preference
* Remove debug logcat calls
* Update javadocs
* Resolve issue where read chapters were still being downloaded during manual manga fetch
* Apply code review changes
* Apply code review changes
* Revert "Apply code review changes"
This reverts commit 1a2dce78acc66a7c529ce5b572bdaf94804b1a30.
* Revert "Apply code review changes"
This reverts commit ac2a77829313967ad39ce3cb0c0231083b9d640d.
* Group download chapter logic inside the interactor GetChaptersToDownload
* Update javadocs
* Apply code review
* Apply code review
* Apply code review
* Update CHANGELOG.md to include the new feature
* Run spotless
* Update domain/src/main/java/mihon/domain/chapter/interactor/FilterChaptersForDownload.kt
---------
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>