qdsfdhvh / compose-imageloader

Compose Image library for Kotlin Multiplatform.

Home Page:https://qdsfdhvh.github.io/compose-imageloader/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rememberImageAction does not change image by new url

jershell opened this issue · comments

version 1.6.2
kotlin 1.8.2
platform ios
compose 1.4.3

i have a code

@Composabe
fun myAsyncImage(url: String) {
        val imageAction by rememberImageAction(url)
        val painter = rememberImageActionPainter(imageAction)
}

and then i changed a url happend nothing.

workaround

@Composable
private fun fixedRememberImageAction(
    url: String,
    imageLoader: ImageLoader = LocalImageLoader.current,
): State<ImageAction> {
    val request = >>>>remember(url)<<<< { ImageRequest(url) }
    return rememberImageAction(request, imageLoader)
}

Please, can you fix the rememberImageAction?

Thanks for the feedback, I'll be releasing a new version today to fix it!

I see this bug repeating on version 1.6.3
When you change the url, the image sometimes changes, but more often it does not.

I see this bug repeating on version 1.6.3
When you change the url, the image sometimes changes, but more often it does not.

I'll check again today.

I find the reason, here sometimes is not image -> load -> image, and is image -> image, so remember not recompose, I has fixed it.


is ImageResult.Bitmap -> remember(filterQuality) {

cool, it's working now