fix(all/yomiroll): Crash on local token toggle (#2726)

This commit is contained in:
hollow
2024-01-12 07:23:11 +00:00
committed by GitHub
parent 233205d7bf
commit e7483f0671
2 changed files with 4 additions and 6 deletions

View File

@ -8,7 +8,7 @@ ext {
extName = 'Yomiroll' extName = 'Yomiroll'
pkgNameSuffix = 'all.kamyroll' pkgNameSuffix = 'all.kamyroll'
extClass = '.Yomiroll' extClass = '.Yomiroll'
extVersionCode = 25 extVersionCode = 26
libVersion = '13' libVersion = '13'
} }

View File

@ -513,11 +513,9 @@ class Yomiroll : ConfigurableAnimeSource, AnimeHttpSource() {
setOnPreferenceChangeListener { _, newValue -> setOnPreferenceChangeListener { _, newValue ->
val new = newValue as Boolean val new = newValue as Boolean
preferences.edit().putBoolean(key, new).commit().also { preferences.edit().putBoolean(key, new).commit().also {
Thread {
summary = runBlocking { summary = runBlocking {
withContext(Dispatchers.IO) { getTokenDetail(true) } withContext(Dispatchers.IO) { getTokenDetail(true) }
} }
}.start()
} }
} }
} }