Display the currently active restrictions in the library update preference (#5187)

* display the currently active restrictions in the library update preference

* removed first line

* use constant instead of literal string

* remove spanned string builder
This commit is contained in:
Gauthier
2021-05-26 20:57:13 +08:00
committed by GitHub
parent 8af8c57bb4
commit d9c27e7109
5 changed files with 37 additions and 8 deletions
@@ -1,5 +1,8 @@
package eu.kanade.tachiyomi.data.preference
const val UNMETERED_NETWORK = "wifi"
const val CHARGING = "ac"
/**
* This class stores the values for the preferences in the application.
*/
@@ -227,7 +227,7 @@ class PreferencesHelper(val context: Context) {
fun libraryUpdateInterval() = flowPrefs.getInt(Keys.libraryUpdateInterval, 24)
fun libraryUpdateRestriction() = prefs.getStringSet(Keys.libraryUpdateRestriction, setOf("wifi"))
fun libraryUpdateRestriction() = flowPrefs.getStringSet(Keys.libraryUpdateRestriction, setOf(UNMETERED_NETWORK))
fun libraryUpdateCategories() = flowPrefs.getStringSet(Keys.libraryUpdateCategories, emptySet())
fun libraryUpdateCategoriesExclude() = flowPrefs.getStringSet(Keys.libraryUpdateCategoriesExclude, emptySet())