You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 use loadImage 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 adapter onBindViewHolder gets called again, but then the images are not loaded or displayed anymore.
the onStart seems to be fired twice when I call loadImage
the onComplete fires twice as well, once immediately after the first onStart, and a second time after onSuccess.
on the second run after rebinding the data, onStart is fired twice again
onComplete fires twice again, both immediately after the onStart
no Loading image from on the second run, presumably because of caching in the ImageLoader
on this second run onSuccess is never called (also because of caching?)
on this second run no images are displayed.
Am I misunderstanding the api or could this be a bug? I expected each call to loadImage to result in only one call to onStart and one call to onComplete/onSuccess and the images to be displayed after onComplete.
I'm using io.getstream:avatarview-coil:1.0.3
The text was updated successfully, but these errors were encountered:
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.
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.
Uh oh!
There was an error while loading. Please reload this page.
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
The text was updated successfully, but these errors were encountered: