IkigaiMangas: Update cached value on preference change (#7089)
update cached value on pref update
This commit is contained in:
parent
8d91fc6551
commit
bdadddf27c
|
@ -1,7 +1,7 @@
|
|||
ext {
|
||||
extName = 'Ikigai Mangas'
|
||||
extClass = '.IkigaiMangas'
|
||||
extVersionCode = 21
|
||||
extVersionCode = 22
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -278,6 +278,10 @@ class IkigaiMangas : HttpSource(), ConfigurableSource {
|
|||
key = SHOW_NSFW_PREF
|
||||
title = SHOW_NSFW_PREF_TITLE
|
||||
setDefaultValue(SHOW_NSFW_PREF_DEFAULT)
|
||||
setOnPreferenceChangeListener { _, newValue ->
|
||||
_cachedNsfwPref = newValue as Boolean
|
||||
true
|
||||
}
|
||||
}.also { screen.addPreference(it) }
|
||||
|
||||
SwitchPreferenceCompat(screen.context).apply {
|
||||
|
|
Loading…
Reference in New Issue