Option to clear chapter cache when MainActivity is closed (closes #5651)

This commit is contained in:
arkon
2021-11-19 10:50:52 -05:00
parent a2c830b908
commit 98822a39d9
5 changed files with 18 additions and 1 deletions

View File

@@ -233,6 +233,8 @@ object PreferenceKeys {
const val verboseLogging = "verbose_logging"
const val autoClearChapterCache = "auto_clear_chapter_cache"
fun trackUsername(syncId: Int) = "pref_mangasync_username_$syncId"
fun trackPassword(syncId: Int) = "pref_mangasync_password_$syncId"

View File

@@ -334,6 +334,8 @@ class PreferencesHelper(val context: Context) {
fun verboseLogging() = prefs.getBoolean(Keys.verboseLogging, false)
fun autoClearChapterCache() = prefs.getBoolean(Keys.autoClearChapterCache, false)
fun setChapterSettingsDefault(manga: Manga) {
prefs.edit {
putInt(Keys.defaultChapterFilterByRead, manga.readFilter)