Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Dismiss update notification when viewing releases notes (#7297)

tomholfordf2ba969d5b40
diff --git a/crates/auto_update/src/update_notification.rs b/crates/auto_update/src/update_notification.rs
index eece0c105a1..1dbee718061 100644
--- a/crates/auto_update/src/update_notification.rs
+++ b/crates/auto_update/src/update_notification.rs
@@ -40,10 +40,11 @@ impl Render for UpdateNotification {
.id("notes")
.child(Label::new("View the release notes"))
.cursor_pointer()
- .on_click(|_, cx| {
+ .on_click(cx.listener(|this, _, cx| {
crate::view_release_notes(&Default::default(), cx);
- }),
- )
+ this.dismiss(&menu::Cancel, cx)
+ })),
+ );
}
}