Improve MergeInterceptor, only merge normal preview requests
This commit is contained in:
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]
|
||||
|
||||
Reference in new issue
Block a user