mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-05 23:51:08 +00:00
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 fs::FakeFs;
|
||||
use futures::{channel::oneshot, StreamExt as _};
|
||||
use gpui::{
|
||||
elements::*, executor::Deterministic, AnyElement, Entity, ModelHandle, Task, TestAppContext,
|
||||
View, ViewContext, ViewHandle, WeakViewHandle,
|
||||
};
|
||||
use gpui::{executor::Deterministic, ModelHandle, Task, TestAppContext, WindowHandle};
|
||||
use language::LanguageRegistry;
|
||||
use parking_lot::Mutex;
|
||||
use project::{Project, WorktreeId};
|
||||
|
@ -541,50 +538,8 @@ impl TestClient {
|
|||
&self,
|
||||
project: &ModelHandle<Project>,
|
||||
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> {
|
||||
cx.add_window(|cx| Workspace::test_new(project.clone(), cx))
|
||||
// >>>>>>> main
|
||||
cx.add_window(|cx| Workspace::new(0, project.clone(), self.app_state.clone(), cx))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue