Remove RemoveWorktreeFromProject internal action

This commit is contained in:
Antonio Scandurra 2023-04-28 12:11:59 +02:00
parent 71a4bc7905
commit 6857426b78
2 changed files with 5 additions and 22 deletions

View file

@ -301,10 +301,10 @@ impl ProjectPanel {
workspace::AddFolderToProject,
));
if is_root {
menu_entries.push(ContextMenuItem::action(
"Remove from Project",
workspace::RemoveWorktreeFromProject(worktree_id),
));
let project = self.project.clone();
menu_entries.push(ContextMenuItem::handler("Remove from Project", move |cx| {
project.update(cx, |project, cx| project.remove_worktree(worktree_id, cx));
}));
}
}
menu_entries.push(ContextMenuItem::action("New File", NewFile));