hyperoslo / Imaginary

:unicorn: Remote images, as easy as one, two, three.
https://www.hyper.no
Other
614 stars 63 forks source link

Placeholder is assigned to view before checking cache if present #88

Closed ndizazzo closed 5 years ago

ndizazzo commented 5 years ago

In the View+Imaginary.swift extension, the image view sets the image property with the placeholder immediately before checking the cache to see if the requested image is present.

https://github.com/hyperoslo/Imaginary/blob/e595d343f475ada6b22849e901bd56aec5f6e663/Sources/Shared/Extensions/View%2BImaginary.swift#L17

This results in some flickering behaviour when rebuilding a data source:

bug

In my opinion, the behaviour should be to check the storage for the image first, then assign the placeholder if it doesn't exist.