Dismiss update notification when viewing releases notes (#7297)
After updating zed, a notification is shown in the bottom right with the new version number, a link to the release notes, and an 'x' to dismiss the dialog. Before this PR, clicking the link to the release notes would not dismiss the modal. So, a user returning to the IDE after viewing the notes in the browser would still see the notification. With this change, clicking 'View release notes' also dismisses the notification. Co-authored-by: tomholford <tomholford@users.noreply.github.com> Release Notes: - Made update notification to dismiss when viewing releases notes
This commit is contained in:
parent
2d58226a9b
commit
f2ba969d5b
1 changed files with 4 additions and 3 deletions
|
@ -40,10 +40,11 @@ impl Render for UpdateNotification {
|
||||||
.id("notes")
|
.id("notes")
|
||||||
.child(Label::new("View the release notes"))
|
.child(Label::new("View the release notes"))
|
||||||
.cursor_pointer()
|
.cursor_pointer()
|
||||||
.on_click(|_, cx| {
|
.on_click(cx.listener(|this, _, cx| {
|
||||||
crate::view_release_notes(&Default::default(), cx);
|
crate::view_release_notes(&Default::default(), cx);
|
||||||
}),
|
this.dismiss(&menu::Cancel, cx)
|
||||||
)
|
})),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue