Equivalent to Picasso's LoadedFrom? #965
-
|
Hi! I'm in the process of migrating code from Picasso to Coil :) and so far everything's good but now I'm stuck into this problem and I don't know if it has a solution. When working with But now, the equivalent code in Coil is pretty similar but without a way to know where the bitmap came from: Is there any way to achieve this? Thanks in advance for your time :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
In Coil listener(onSuccess = { request, metadata ->
if (metadata.dataSource == DataSource.MEMORY) {
// Do something
}
})Note: Coil has a |
Beta Was this translation helpful? Give feedback.
In Coil
LoadedFrom==DataSourceand you can access it in the listener:Note: Coil has a
DataSource.MEMORY_CACHEenum which is slightly different thanDataSource.MEMORY. Check out the docs.