Open ashleyhenderson opened 6 years ago
Hi, I am also facing the same issues, I got this issue only after updating to the latest version, before it was working fine (before some versions), please help me if any one have any solution.
Hi! Thanks for the detailed issue report. I agree, it's reasonable to trigger the image load earlier than when scrolling has finished. For activity indicator it's really a must.
I attempted to address this problem in 311a45e, branch image-preload-improvement
. Could you please give it a try? It triggers the load even during the scrolling, when primaryVisiblePage
changes, thus the majority of screen content is covered by a new page. I think already this is an improvement, I can, however, imagine the load being triggered even sooner, when a new page appears. But this would require slightly bigger changes.
Thanks for getting back to me so soon, I've tried the fix (with a preload setting of 0 again) but the ActivityIndicator still has a noticeable delay before appearing in some cases when downloading images. Kingfisher's in-built activity indicator without the slideshow displays instantly. The slideshow indicator also only appears when images aren't cached in Kingfisher and have to be downloaded? Maybe this is the intended effect?
I can see that the image load is triggered halfway between each image. With a preload setting of 0, this causes the images to flicker in and out abruptly when quickly dragging over the halfway mark and back between two images. With a realistic preload setting (of 4) however, the preload works much better than before and looks to be fixed
When scrolling through a slideshow, image preload is only triggered when the slideshow scrollview has finished scrolling. To replicate:
Set preload to 0 (to easily display the effect)
Load images into the slideshow (we use Kingfisher and typically load between 10-30 images into each slideshow)
After the slideshow loads in, begin dragging to an adjacent image
The activity indicator & image preload for the adjacent image is only triggered when the drag/scroll to the adjacent cell has finished (resulting in an ugly delay)
This issue is also present when rapidly scrolling through a slideshow with a preload of > 0
Ideally, this should perform more like a collectionview's cellforitemat, where the preloading is triggered when the adjacent image is called by the slideshow (before the image appears on-screen). This issue would likely be fixed by basing preloading on the slideshow's willBeginDragging (or something similar), thus triggering the activity indicator & preload before the next image appears.