Improve MergeInterceptor, only merge normal preview requests

This commit is contained in:
tarsin committed 2023-05-26 18:43:40 +08:00
1 parent 689a78d2ee
commit 92240c6c2c
1 file changed
+1 -1
@@ -21,7 +21,7 @@ object MergeInterceptor : Interceptor {
private val EMPTY_LIST = mutableListOf<Continuation<Unit>>()
override suspend fun intercept(chain: Interceptor.Chain): ImageResult {
val req = chain.request
val key = req.data as String
val key = req.memoryCacheKey?.key?.takeIf { it.startsWith("m/") } ?: return withContext(req.interceptorDispatcher) { chain.proceed(req) }
pendingContinuationMapLock.lock()
val existPendingContinuations = pendingContinuationMap[key]