Finish refactoring of how editors are opened

This commit is contained in:
Antonio Scandurra
2022-03-17 11:29:46 +01:00
parent 728c708150
commit aced1e2315
12 changed files with 96 additions and 260 deletions
+2 -2
View File
@@ -391,7 +391,7 @@ impl ProjectSearchView {
workspace.activate_item(&existing, cx);
} else {
let model = cx.add_model(|cx| ProjectSearch::new(workspace.project().clone(), cx));
workspace.open_item(
workspace.add_item(
Box::new(cx.add_view(|cx| ProjectSearchView::new(model, cx))),
cx,
);
@@ -429,7 +429,7 @@ impl ProjectSearchView {
model.search(new_query, cx);
model
});
workspace.open_item(
workspace.add_item(
Box::new(cx.add_view(|cx| ProjectSearchView::new(model, cx))),
cx,
);