Add category filters for Updates tab (#3589)
* 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
This commit is contained in:
@@ -19,6 +19,8 @@ class GetUpdates(
|
||||
started: Boolean?,
|
||||
bookmarked: Boolean?,
|
||||
hideExcludedScanlators: Boolean,
|
||||
includedCategories: List<Long>,
|
||||
excludedCategories: List<Long>,
|
||||
): Flow<List<UpdatesWithRelations>> {
|
||||
return repository.subscribeAll(
|
||||
instant.toEpochMilliseconds(),
|
||||
@@ -27,6 +29,8 @@ class GetUpdates(
|
||||
started = started,
|
||||
bookmarked = bookmarked,
|
||||
hideExcludedScanlators = hideExcludedScanlators,
|
||||
includedCategories = includedCategories,
|
||||
excludedCategories = excludedCategories,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ interface UpdatesRepository {
|
||||
started: Boolean?,
|
||||
bookmarked: Boolean?,
|
||||
hideExcludedScanlators: Boolean,
|
||||
includedCategories: List<Long>,
|
||||
excludedCategories: List<Long>,
|
||||
): Flow<List<UpdatesWithRelations>>
|
||||
|
||||
fun subscribeWithRead(read: Boolean, after: Long, limit: Long): Flow<List<UpdatesWithRelations>>
|
||||
|
||||
@@ -4,6 +4,7 @@ import tachiyomi.core.common.preference.Preference
|
||||
import tachiyomi.core.common.preference.PreferenceStore
|
||||
import tachiyomi.core.common.preference.TriState
|
||||
import tachiyomi.core.common.preference.getEnum
|
||||
import tachiyomi.core.common.preference.getLongArray
|
||||
|
||||
class UpdatesPreferences(
|
||||
preferenceStore: PreferenceStore,
|
||||
@@ -33,4 +34,14 @@ class UpdatesPreferences(
|
||||
"pref_filter_updates_hide_excluded_scanlators",
|
||||
false,
|
||||
)
|
||||
|
||||
val filterIncludedCategories: Preference<List<Long>> = preferenceStore.getLongArray(
|
||||
"pref_filter_updates_included_categories",
|
||||
emptyList(),
|
||||
)
|
||||
|
||||
val filterExcludedCategories: Preference<List<Long>> = preferenceStore.getLongArray(
|
||||
"pref_filter_updates_excluded_categories",
|
||||
emptyList(),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user