Fix bad merge
This commit is contained in:
parent
707e41ce1f
commit
eed49a88bd
1 changed files with 2 additions and 47 deletions
|
@ -13,10 +13,7 @@ use client::{
|
||||||
use collections::{HashMap, HashSet};
|
use collections::{HashMap, HashSet};
|
||||||
use fs::FakeFs;
|
use fs::FakeFs;
|
||||||
use futures::{channel::oneshot, StreamExt as _};
|
use futures::{channel::oneshot, StreamExt as _};
|
||||||
use gpui::{
|
use gpui::{executor::Deterministic, ModelHandle, Task, TestAppContext, WindowHandle};
|
||||||
elements::*, executor::Deterministic, AnyElement, Entity, ModelHandle, Task, TestAppContext,
|
|
||||||
View, ViewContext, ViewHandle, WeakViewHandle,
|
|
||||||
};
|
|
||||||
use language::LanguageRegistry;
|
use language::LanguageRegistry;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use project::{Project, WorktreeId};
|
use project::{Project, WorktreeId};
|
||||||
|
@ -541,50 +538,8 @@ impl TestClient {
|
||||||
&self,
|
&self,
|
||||||
project: &ModelHandle<Project>,
|
project: &ModelHandle<Project>,
|
||||||
cx: &mut TestAppContext,
|
cx: &mut TestAppContext,
|
||||||
// <<<<<<< HEAD
|
|
||||||
// ) -> ViewHandle<Workspace> {
|
|
||||||
// struct WorkspaceContainer {
|
|
||||||
// workspace: Option<WeakViewHandle<Workspace>>,
|
|
||||||
// }
|
|
||||||
|
|
||||||
// impl Entity for WorkspaceContainer {
|
|
||||||
// type Event = ();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// impl View for WorkspaceContainer {
|
|
||||||
// fn ui_name() -> &'static str {
|
|
||||||
// "WorkspaceContainer"
|
|
||||||
// }
|
|
||||||
|
|
||||||
// fn render(&mut self, cx: &mut ViewContext<Self>) -> AnyElement<Self> {
|
|
||||||
// if let Some(workspace) = self
|
|
||||||
// .workspace
|
|
||||||
// .as_ref()
|
|
||||||
// .and_then(|workspace| workspace.upgrade(cx))
|
|
||||||
// {
|
|
||||||
// ChildView::new(&workspace, cx).into_any()
|
|
||||||
// } else {
|
|
||||||
// Empty::new().into_any()
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // We use a workspace container so that we don't need to remove the window in order to
|
|
||||||
// // drop the workspace and we can use a ViewHandle instead.
|
|
||||||
// let window = cx.add_window(|_| WorkspaceContainer { workspace: None });
|
|
||||||
// let container = window.root(cx);
|
|
||||||
// let workspace = window.add_view(cx, |cx| {
|
|
||||||
// Workspace::new(0, project.clone(), self.app_state.clone(), cx)
|
|
||||||
// });
|
|
||||||
// container.update(cx, |container, cx| {
|
|
||||||
// container.workspace = Some(workspace.downgrade());
|
|
||||||
// cx.notify();
|
|
||||||
// });
|
|
||||||
// workspace
|
|
||||||
// =======
|
|
||||||
) -> WindowHandle<Workspace> {
|
) -> WindowHandle<Workspace> {
|
||||||
cx.add_window(|cx| Workspace::test_new(project.clone(), cx))
|
cx.add_window(|cx| Workspace::new(0, project.clone(), self.app_state.clone(), cx))
|
||||||
// >>>>>>> main
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue