We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18daf17 commit 7aa6f47Copy full SHA for 7aa6f47
crates/project/src/worktree_store.rs
@@ -96,7 +96,15 @@ impl WorktreeStore {
96
pub fn remove_worktree(&mut self, id_to_remove: WorktreeId, cx: &mut ModelContext<Self>) {
97
self.worktrees.retain(|worktree| {
98
if let Some(worktree) = worktree.upgrade() {
99
- worktree.read(cx).id() != id_to_remove
+ if worktree.read(cx).id() == id_to_remove {
100
+ cx.emit(WorktreeStoreEvent::WorktreeRemoved(
101
+ worktree.entity_id(),
102
+ id_to_remove,
103
+ ));
104
+ false
105
+ } else {
106
+ true
107
+ }
108
} else {
109
false
110
}
0 commit comments