Persist project and terminal panel sizes
This commit is contained in:
parent
146809eef0
commit
10e947cb5f
8 changed files with 139 additions and 54 deletions
|
@ -335,8 +335,12 @@ pub fn initialize_workspace(
|
|||
}
|
||||
false
|
||||
});
|
||||
})?;
|
||||
|
||||
let project_panel = ProjectPanel::new(workspace, cx);
|
||||
let project_panel = ProjectPanel::load(workspace_handle.clone(), cx.clone());
|
||||
let terminal_panel = TerminalPanel::load(workspace_handle.clone(), cx.clone());
|
||||
let (project_panel, terminal_panel) = futures::try_join!(project_panel, terminal_panel)?;
|
||||
workspace_handle.update(&mut cx, |workspace, cx| {
|
||||
let project_panel_position = project_panel.position(cx);
|
||||
workspace.add_panel(project_panel, cx);
|
||||
if !was_deserialized
|
||||
|
@ -352,10 +356,7 @@ pub fn initialize_workspace(
|
|||
{
|
||||
workspace.toggle_dock(project_panel_position, cx);
|
||||
}
|
||||
})?;
|
||||
|
||||
let terminal_panel = TerminalPanel::load(workspace_handle.clone(), cx.clone()).await?;
|
||||
workspace_handle.update(&mut cx, |workspace, cx| {
|
||||
workspace.add_panel(terminal_panel, cx)
|
||||
})?;
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue