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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

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

View File

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