Added category-wise display setting (#5232)

* Added category-wise display setting

Co-authored-by: Rogavactive <30288842+Rogavactive@users.noreply.github.com>

* Use flag instead of preference

* Remove database call in LibraryItem

* Remove unnecessary code

Co-authored-by: Rogavactive <30288842+Rogavactive@users.noreply.github.com>
This commit is contained in:
Andreas
2021-06-05 16:25:34 +02:00
committed by GitHub
parent fff72b61df
commit a906e9b302
11 changed files with 153 additions and 25 deletions
@@ -185,6 +185,8 @@ object PreferenceKeys {
const val defaultCategory = "default_category"
const val categorizedDisplay = "categorized_display"
const val skipRead = "skip_read"
const val skipFiltered = "skip_filtered"
@@ -284,6 +284,8 @@ class PreferencesHelper(val context: Context) {
fun defaultCategory() = prefs.getInt(Keys.defaultCategory, -1)
fun categorisedDisplaySettings() = flowPrefs.getBoolean(Keys.categorizedDisplay, false)
fun skipRead() = prefs.getBoolean(Keys.skipRead, false)
fun skipFiltered() = prefs.getBoolean(Keys.skipFiltered, true)