Move chapter preferences from PreferencesHelper to LibraryPrefrences (#8061)

This commit is contained in:
Andreas
2022-09-24 16:14:16 +02:00
committed by GitHub
parent 747cbd24cb
commit b5dca2eb09
15 changed files with 154 additions and 128 deletions
@@ -33,7 +33,7 @@ import eu.kanade.tachiyomi.ui.base.controller.openInBrowser
import eu.kanade.tachiyomi.ui.base.controller.pushController
import eu.kanade.tachiyomi.ui.setting.database.ClearDatabaseController
import eu.kanade.tachiyomi.util.CrashLogUtil
import eu.kanade.tachiyomi.util.lang.launchNonCancellableIO
import eu.kanade.tachiyomi.util.lang.launchNonCancellable
import eu.kanade.tachiyomi.util.lang.withUIContext
import eu.kanade.tachiyomi.util.preference.bindTo
import eu.kanade.tachiyomi.util.preference.defaultValue
@@ -90,7 +90,7 @@ class SettingsAdvancedController(
summaryRes = R.string.pref_dump_crash_logs_summary
onClick {
viewScope.launchNonCancellableIO {
viewScope.launchNonCancellable {
CrashLogUtil(context).dumpLogs()
}
}
@@ -343,7 +343,7 @@ class SettingsAdvancedController(
private fun clearChapterCache() {
val activity = activity ?: return
viewScope.launchNonCancellableIO {
viewScope.launchNonCancellable {
try {
val deletedFiles = chapterCache.clear()
withUIContext {
@@ -379,7 +379,7 @@ class SettingsAdvancedController(
private fun resetViewerFlags() {
val activity = activity ?: return
viewScope.launchNonCancellableIO {
viewScope.launchNonCancellable {
val success = mangaRepository.resetViewerFlags()
withUIContext {
val message = if (success) {