Make app notifications appear in new workspaces + dismiss on all workspaces (#23432)

The keymap error notifications got convoluted to support displaying the
notification on startup. This change addresses it systemically for all
future app notifications.

Reverts most of #20531, while keeping the fix to handle keyboard layout
switching. This is a better fix for #20531

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2025-01-21 22:39:04 -07:00 committed by GitHub
parent 1e1997c97b
commit 1769bc957b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 200 additions and 190 deletions

View file

@ -368,6 +368,7 @@ fn prompt_and_open_paths(
pub fn init(app_state: Arc<AppState>, cx: &mut AppContext) {
init_settings(cx);
notifications::init(cx);
theme_preview::init(cx);
cx.on_action(Workspace::close_global);
@ -1056,6 +1057,7 @@ impl Workspace {
cx.defer(|this, cx| {
this.update_window_title(cx);
this.show_initial_notifications(cx);
});
Workspace {
weak_self: weak_handle.clone(),