Move chapter preferences from PreferencesHelper to LibraryPrefrences (#8061)
(cherry picked from commit b5dca2eb09)
# Conflicts:
# app/build.gradle.kts
# app/src/main/java/eu/kanade/domain/library/service/LibraryPreferences.kt
# app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaPresenter.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt
This commit is contained in:
@@ -49,9 +49,12 @@ fun CoroutineScope.launchUI(block: suspend CoroutineScope.() -> Unit): Job =
|
||||
fun CoroutineScope.launchIO(block: suspend CoroutineScope.() -> Unit): Job =
|
||||
launch(Dispatchers.IO, block = block)
|
||||
|
||||
fun CoroutineScope.launchNonCancellableIO(block: suspend CoroutineScope.() -> Unit): Job =
|
||||
fun CoroutineScope.launchNonCancellable(block: suspend CoroutineScope.() -> Unit): Job =
|
||||
launchIO { withContext(NonCancellable, block) }
|
||||
|
||||
suspend fun <T> withUIContext(block: suspend CoroutineScope.() -> T) = withContext(Dispatchers.Main, block)
|
||||
|
||||
suspend fun <T> withIOContext(block: suspend CoroutineScope.() -> T) = withContext(Dispatchers.IO, block)
|
||||
|
||||
suspend fun <T> withNonCancellableContext(block: suspend CoroutineScope.() -> T) =
|
||||
withContext(NonCancellable, block)
|
||||
|
||||
Reference in New Issue
Block a user