chore: update gpui

This commit is contained in:
2025-03-25 20:53:22 +07:00
parent 4c9533bfe4
commit 42d6328d82
28 changed files with 255 additions and 211 deletions

View File

@@ -193,7 +193,7 @@ impl Notification {
cx.notify();
// Dismiss the notification after 0.15s to show the animation.
cx.spawn(|view, cx| async move {
cx.spawn(async move |view, cx| {
Timer::after(Duration::from_secs_f32(0.15)).await;
cx.update(|cx| {
if let Some(view) = view.upgrade() {
@@ -339,9 +339,9 @@ impl NotificationList {
self.notifications.push_back(notification.clone());
if autohide {
// Sleep for 3 seconds to autohide the notification
cx.spawn_in(window, |_, mut cx| async move {
cx.spawn_in(window, async move |_, cx| {
Timer::after(Duration::from_secs(3)).await;
_ = notification.update_in(&mut cx, |note, window, cx| {
_ = notification.update_in(cx, |note, window, cx| {
note.dismiss(&ClickEvent::default(), window, cx)
});
})