Checkpoint

This commit is contained in:
Nathan Sobo
2023-10-05 00:13:17 -06:00
parent 1c70ca2214
commit ed20397a2b
3 changed files with 10 additions and 4 deletions
+3 -4
View File
@@ -75,12 +75,11 @@ 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 {
cx.spawn(|view, mut cx| async move {
cx.spawn(|_, mut cx| async move {
if image_future.await.log_err().is_some() {
view.update(&mut cx, |_, cx| {
cx.on_next_frame(|cx| {
cx.notify();
})
.ok();
});
}
})
.detach()