Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
sidebar: Fix removed projects not immediately disappearing from the UI (#53974)
Danilo Lealab936157166e
diff --git a/crates/sidebar/src/sidebar.rs b/crates/sidebar/src/sidebar.rsindex 0a00102fcc3..c7b1c6fc8e1 100644--- a/crates/sidebar/src/sidebar.rs+++ b/crates/sidebar/src/sidebar.rs@@ -408,7 +408,8 @@ impl Sidebar {this.subscribe_to_workspace(workspace, window, cx);this.update_entries(cx);}- MultiWorkspaceEvent::WorkspaceRemoved(_) => {+ MultiWorkspaceEvent::WorkspaceRemoved(_)+ | MultiWorkspaceEvent::ProjectGroupsChanged => {this.update_entries(cx);}},diff --git a/crates/workspace/src/multi_workspace.rs b/crates/workspace/src/multi_workspace.rsindex 504f1f3543b..228597971e5 100644--- a/crates/workspace/src/multi_workspace.rs+++ b/crates/workspace/src/multi_workspace.rs@@ -105,6 +105,7 @@ pub enum MultiWorkspaceEvent {ActiveWorkspaceChanged,WorkspaceAdded(Entity<Workspace>),WorkspaceRemoved(EntityId),+ ProjectGroupsChanged,}pub enum SidebarEvent {@@ -854,6 +855,7 @@ impl MultiWorkspace {// Now remove the group.self.project_groups.retain(|group| group.key != *group_key);+ cx.emit(MultiWorkspaceEvent::ProjectGroupsChanged);let excluded_workspaces = workspaces.clone();self.remove(