Load images in the background

This commit is contained in:
Antonio Scandurra 2024-01-24 13:15:31 +01:00
parent e3157f7212
commit 92b0184036
2 changed files with 37 additions and 40 deletions

View file

@ -104,7 +104,7 @@ impl Element for Img {
cx.with_z_index(1, |cx| {
match source {
ImageSource::Uri(uri) => {
let image_future = cx.image_cache.get(uri.clone());
let image_future = cx.image_cache.get(uri.clone(), cx);
if let Some(data) = image_future
.clone()
.now_or_never()