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 {
|
ext {
|
||||||
extName = 'Ikigai Mangas'
|
extName = 'Ikigai Mangas'
|
||||||
extClass = '.IkigaiMangas'
|
extClass = '.IkigaiMangas'
|
||||||
extVersionCode = 21
|
extVersionCode = 22
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,6 +278,10 @@ class IkigaiMangas : HttpSource(), ConfigurableSource {
|
|||||||
key = SHOW_NSFW_PREF
|
key = SHOW_NSFW_PREF
|
||||||
title = SHOW_NSFW_PREF_TITLE
|
title = SHOW_NSFW_PREF_TITLE
|
||||||
setDefaultValue(SHOW_NSFW_PREF_DEFAULT)
|
setDefaultValue(SHOW_NSFW_PREF_DEFAULT)
|
||||||
|
setOnPreferenceChangeListener { _, newValue ->
|
||||||
|
_cachedNsfwPref = newValue as Boolean
|
||||||
|
true
|
||||||
|
}
|
||||||
}.also { screen.addPreference(it) }
|
}.also { screen.addPreference(it) }
|
||||||
|
|
||||||
SwitchPreferenceCompat(screen.context).apply {
|
SwitchPreferenceCompat(screen.context).apply {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user