Skip to content

Equivalent to Picasso's LoadedFrom? #965

Answered by colinrtwhite
rogererill asked this question in Q&A
Discussion options

You must be logged in to vote

In Coil LoadedFrom == DataSource and you can access it in the listener:

listener(onSuccess = { request, metadata ->
    if (metadata.dataSource == DataSource.MEMORY) {
           // Do something
    }
})

Note: Coil has a DataSource.MEMORY_CACHE enum which is slightly different than DataSource.MEMORY. Check out the docs.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rogererill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants