diff --git a/app/src/main/kotlin/com/hippo/ehviewer/coil/MergeInterceptor.kt b/app/src/main/kotlin/com/hippo/ehviewer/coil/MergeInterceptor.kt index 65b7c255a..f7fc58f88 100644 --- a/app/src/main/kotlin/com/hippo/ehviewer/coil/MergeInterceptor.kt +++ b/app/src/main/kotlin/com/hippo/ehviewer/coil/MergeInterceptor.kt @@ -41,7 +41,7 @@ object MergeInterceptor : Interceptor { override suspend fun intercept(chain: Interceptor.Chain): ImageResult { val req = chain.request - val key = req.memoryCacheKey?.takeIf { it.startsWith("m/") || Settings.preloadThumbAggressively } ?: return withContext(req.interceptorDispatcher) { chain.proceed() } + val key = req.memoryCacheKey?.takeIf { it.startsWith("m/") || Settings.preloadThumbAggressively } ?: return withContext(req.interceptorCoroutineContext) { chain.proceed() } suspendCancellableCoroutine { continuation -> synchronized(pendingContinuationMapLock) { @@ -62,7 +62,7 @@ object MergeInterceptor : Interceptor { } try { - return withContext(req.interceptorDispatcher) { chain.proceed() }.apply { + return withContext(req.interceptorCoroutineContext) { chain.proceed() }.apply { // Wake all pending continuations shared with the same memory key since we have written it to memory cache notifyScope.launch { synchronized(pendingContinuationMapLock) { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 142e8a9f7..3279cb5da 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,7 +18,7 @@ androidx-room = "2.7.0-alpha04" androidx-viewpager2 = "1.1.0" androidx-work = "2.10.0-alpha02" arrow = "1.2.4" -coil = "3.0.0-alpha07" +coil = "3.0.0-alpha08" compose-bom = "2024.06.00-alpha01" compose-destinations = "2.1.0-beta09" kotlin = "2.0.0"