I have an image composable that has ```val painter...
# compose
d
I have an image composable that has
Copy code
val painter = rememberAsyncImagePainter(model = profilePictureUri)
I want my composable to recompose every time I set a profilePicture, but the thing is my profilePicture name is the userId.jpg so when I set the profile picture only the content at file changes and not the Uri. Is there a way such that every emit (or value change) irrespective of if value is different, I could recompose my composable. In short, I want to trigger recomposition on every emit, whether the value has changed or not.
e
If you're interested only in recompositions, you can always read a derivedStateOf the property that actually changes. If userId.jpg is driven via http, a http header (in which case coil would handle it for you) or if it's local then resolve the file and use it's modified timestamp or some attribute that changes.