Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images not recomposing after changing the list of a LazyList #28

Closed
davidsal opened this issue Jun 22, 2021 · 5 comments
Closed

Images not recomposing after changing the list of a LazyList #28

davidsal opened this issue Jun 22, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@davidsal
Copy link

davidsal commented Jun 22, 2021

Please complete the following information:

  • Glide and Fresco v1.2.4

Describe the Bug:

I'm observing a Live Data List using observeAsState(). When I trigger a new event using value/postDelayed, the LazyList (LazyRow/LazyColumn) item recomposes everything (text, icons, colors) except the Glide/Fresco image, making the item keep the old image URL. I'm attaching a small video, you can see that when I remove an item for the list, the title and rating updates, but the image doesn't. This doesn't happen if I use the classic Accompanist Glide library.
WhatsApp Video 2021-06-21 at 22.41.zip

Expected Behavior:

Whenever the list state changes, the image should recompose too.

Current Glide Code:

>@Composable
> fun PosterImage(posterURL:String){
>     GlideImage(
>                 imageModel = posterURL,
>                 contentScale = ContentScale.FillWidth,
>                 circularRevealedEnabled = true,
>                 placeHolder = ImageBitmap.imageResource(R.drawable.entry_placeholder),
>                 alignment = Alignment.Center,
>                 modifier = Modifier
>                     .fillMaxWidth()
>                     .height(170.dp),
>                 requestOptions = RequestOptions().diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
>             )
> }
@skydoves
Copy link
Owner

Hi @davidsal,
Does the CoilImage face the same issue?
I think that seems to happen on the GlideImage only from now, I will check into the requests.
Thank you for your issue :)

@madhurgupta10
Copy link

@davidsal Same Issue for me, I am using Glide for Firebase Storage Reference!

@skydoves
Copy link
Owner

Hi @madhurgupta10,
Thanks for sharing your issue :)
I'm working on this issue and it will be included in the next release probably today.
Thanks!

@skydoves
Copy link
Owner

@davidsal @madhurgupta10
Released a new stable 1.2.8!

@skydoves skydoves self-assigned this Jul 16, 2021
@skydoves skydoves added the bug Something isn't working label Jul 16, 2021
@madhurgupta10
Copy link

@skydoves Thanks a lot, the issue is fixed for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants