For reference, I am using Coil to load images over the network. I've provided each of these images with a fallback and a loading state via the code below:
This essentially adds my shimmer when the image is loading, and reverts to the provided fallback image if the image doesn't load or doesn't point to anything.
I expect there to be a way to wait for this to complete before taking the snapshot.
Actual behaviour
I am seeing inconsistent behavior where sometimes the snapshots complete with an actual image (when a real URL is provided) and some complete with the fallback image (when the URL is invalid) and some don't complete at all (remains in loading). This causes my snapshots to inconsistently fail for different reasons.
I have tried adding coroutine delays in prepareUIForScreenshot without any luck. I don't know how else to have it wait so these remain consistent.
Steps to reproduce
Add accompanist placeholder and coil to app build.gradle
Expected behaviour
For reference, I am using Coil to load images over the network. I've provided each of these images with a fallback and a loading state via the code below:
This essentially adds my shimmer when the image is loading, and reverts to the provided fallback image if the image doesn't load or doesn't point to anything.
I expect there to be a way to wait for this to complete before taking the snapshot.
Actual behaviour
I am seeing inconsistent behavior where sometimes the snapshots complete with an actual image (when a real URL is provided) and some complete with the fallback image (when the URL is invalid) and some don't complete at all (remains in loading). This causes my snapshots to inconsistently fail for different reasons.
I have tried adding coroutine delays in
prepareUIForScreenshot
without any luck. I don't know how else to have it wait so these remain consistent.Steps to reproduce
R.drawable.fallback
)Version of the library
Shot 5.14.1