Open vbsteven opened 2 years ago
Hi @vbsteven, Thank you for reporting this issue with a very detailed explanation!
I just checked a few things about your reports below.
Multiple invoking of the onBindViewHolder
method breaks the image - I built this on another branch and it works fine and it's hard to reproduce to me. So could you check out this branch is the same as your codebase?
onStart
and onComplete
listeners are being called twice - I guess this is because the library has an internal image loader and it fires the onStart
and onComplete
listeners twice while loading an image. I'll look into it more for this.
Thanks!
I am also facing the same issue, Still not resolved. tried same as your approach
I am also facing the same issue. It is still not resolved. I was using io.getstream:avatarview-coil:1.0.3 then I updated the version to io.getstream:avatarview-coil:1.0.4 now but issue is same.
Hi @ShivaniWani I fixed with one hacky Solution for now First set the initials="" then set the new Image url it works
I'm trying to use AvatarView-Coil to load images inside of a ListAdapter with a ViewHolder and I'm seeing weird behavior.
Essentially in
onBindViewHolder
I useloadImage
to load a profile picture with a String url in an AvatarView. The initial load runs fine and displays the images. Once I reload data in the adapteronBindViewHolder
gets called again, but then the images are not loaded or displayed anymore.The first time it runs it outputs this:
The
Loading image from...
statements are from the ImageLoader requestInterceptorThen, a bit later when reloading the data it outputs this:
The weird behavior I'm seeing is this:
onStart
seems to be fired twice when I callloadImage
onComplete
fires twice as well, once immediately after the firstonStart
, and a second time afteronSuccess
.onStart
is fired twice againonComplete
fires twice again, both immediately after theonStart
Loading image from
on the second run, presumably because of caching in the ImageLoaderonSuccess
is never called (also because of caching?)Am I misunderstanding the api or could this be a bug? I expected each call to
loadImage
to result in only one call toonStart
and one call toonComplete
/onSuccess
and the images to be displayed afteronComplete
.I'm using
io.getstream:avatarview-coil:1.0.3