Skip to content
Snippets Groups Projects
Commit f993009c authored by Pierre Lamot's avatar Pierre Lamot Committed by Steve Lhomme
Browse files

qml: don't show fallback image immediately while loading MediaCover

Showing a blank rectangle (which is already drawn behind the image) is cheaper
than loading the fallback image. The fallback image is still displayed if the
regular image fails to load or takes more time to load than a `humanMoment`

* When the image starts loading: `root.isImageReady` is false (`Image.Loading`),
  timer is running, no image is visible, the background is drawn

* If the image finish loading successfully: `root.isImageReady` becomes true the
  fallback is not loaded

* If the image finish fails to load: `root.isImageReady` remains false and
  `timer.running` becomes false (`Image.Error`), the fallback image becomes
  visible

* If the image takes a long time to load: `root.isImageReady` remains false, timer
  times out so `timer.running` becomes false, the fallback image is loaded
parent 05ba33bc
No related branches found
No related tags found
Loading
Pipeline #495888 passed with stage
in 11 minutes and 57 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment