Add badge to bottom bar Updates tab indicating how many unread chapter updates are available (#5620)

Co-authored-by: arkon <arkon@users.noreply.github.com>
This commit is contained in:
Hunter Nickel
2021-10-30 10:32:51 -06:00
committed by GitHub
parent 00817aacfe
commit 459759bfe5
7 changed files with 31 additions and 0 deletions
@@ -133,6 +133,8 @@ object PreferenceKeys {
const val libraryUpdateRestriction = "library_update_restriction"
const val libraryUpdateShowTabBadge = "library_update_show_tab_badge"
const val libraryUpdateCategories = "library_update_categories"
const val libraryUpdateCategoriesExclude = "library_update_categories_exclude"
@@ -238,6 +238,9 @@ class PreferencesHelper(val context: Context) {
fun libraryUpdateRestriction() = flowPrefs.getStringSet(Keys.libraryUpdateRestriction, setOf(ONLY_ON_WIFI))
fun libraryUpdateShowTabBadge() = flowPrefs.getBoolean(Keys.libraryUpdateShowTabBadge, true)
fun libraryUnreadUpdatesCount() = flowPrefs.getInt("library_unread_updates_count", 0)
fun libraryUpdateCategories() = flowPrefs.getStringSet(Keys.libraryUpdateCategories, emptySet())
fun libraryUpdateCategoriesExclude() = flowPrefs.getStringSet(Keys.libraryUpdateCategoriesExclude, emptySet())