Checkpoint

This commit is contained in:
Nathan Sobo
2023-10-04 15:08:04 -06:00
parent 02d6b91b73
commit c8bc68c267
4 changed files with 2 additions and 7 deletions
-3
View File
@@ -75,12 +75,9 @@ impl<S: Send + Sync + 'static> Element for Img<S> {
let corner_radii = style.corner_radii.to_pixels(bounds, cx.rem_size());
cx.paint_image(bounds, corner_radii, order, data, self.grayscale)?;
} else {
dbg!("not loaded");
cx.spawn(|view, mut cx| async move {
dbg!("awaiting image future");
if image_future.await.log_err().is_some() {
view.update(&mut cx, |_, cx| {
dbg!("image future loaded");
cx.notify();
})
.ok();