Question: Can Coil ignore the subsequent calls wit...
# compose
a
Question: Can Coil ignore the subsequent calls with same url until first call is success? Scenario:
Copy code
@Composable
fun Foo() {
  // call to load image from coil
}
Foo makes image call when on its first composition and due to any reason if Foo is recomposed before first call could be a success Coil makes another image load call Is there a way to avoid this? cc @Colin White
@theapache64
m
Try to make it a separate composable with url as parameters and check
c
If the URL doesn’t change it shouldn’t start a new request. Coil only starts a new request if the
hashCode
of the request (or the URL) changes: https://github.com/coil-kt/coil/blob/main/coil-compose-base/src/main/java/coil/compose/AsyncImagePainter.kt#L245
👍🏼 1
👍 1
a
@Gagan Deep ☝️