mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-29 21:49:33 +00:00
Defer hiding the dock and going back/forward when Pane is on the stack
This commit is contained in:
parent
e3b2407ebf
commit
780ece551e
2 changed files with 18 additions and 10 deletions
|
@ -1645,9 +1645,11 @@ impl Pane {
|
||||||
cx,
|
cx,
|
||||||
|this, cx| {
|
|this, cx| {
|
||||||
if let Some(workspace) = this.workspace.upgrade(cx) {
|
if let Some(workspace) = this.workspace.upgrade(cx) {
|
||||||
workspace.update(cx, |workspace, cx| {
|
cx.window_context().defer(move |cx| {
|
||||||
Dock::hide_dock(workspace, &Default::default(), cx)
|
workspace.update(cx, |workspace, cx| {
|
||||||
})
|
Dock::hide_dock(workspace, &Default::default(), cx)
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
None,
|
None,
|
||||||
|
|
|
@ -138,10 +138,13 @@ impl View for Toolbar {
|
||||||
.upgrade(cx)
|
.upgrade(cx)
|
||||||
.and_then(|pane| pane.read(cx).workspace().upgrade(cx))
|
.and_then(|pane| pane.read(cx).workspace().upgrade(cx))
|
||||||
{
|
{
|
||||||
workspace.update(cx, |workspace, cx| {
|
let pane = pane.clone();
|
||||||
Pane::go_back(workspace, Some(pane.clone()), cx)
|
cx.window_context().defer(move |cx| {
|
||||||
.detach_and_log_err(cx);
|
workspace.update(cx, |workspace, cx| {
|
||||||
});
|
Pane::go_back(workspace, Some(pane.clone()), cx)
|
||||||
|
.detach_and_log_err(cx);
|
||||||
|
});
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -163,9 +166,12 @@ impl View for Toolbar {
|
||||||
.upgrade(cx)
|
.upgrade(cx)
|
||||||
.and_then(|pane| pane.read(cx).workspace().upgrade(cx))
|
.and_then(|pane| pane.read(cx).workspace().upgrade(cx))
|
||||||
{
|
{
|
||||||
workspace.update(cx, |workspace, cx| {
|
let pane = pane.clone();
|
||||||
Pane::go_forward(workspace, Some(pane.clone()), cx)
|
cx.window_context().defer(move |cx| {
|
||||||
.detach_and_log_err(cx);
|
workspace.update(cx, |workspace, cx| {
|
||||||
|
Pane::go_forward(workspace, Some(pane.clone()), cx)
|
||||||
|
.detach_and_log_err(cx);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue