Don't capture Workspace
handle in defer
when rendering Dock
GPUI already provides a mutable reference to the `Workspace` in the `defer` callback.
This commit is contained in:
parent
136e599051
commit
eee39b4c5c
1 changed files with 2 additions and 7 deletions
|
@ -362,13 +362,8 @@ impl Dock {
|
|||
);
|
||||
|
||||
let size = resizable.current_size();
|
||||
let workspace = cx.handle().downgrade();
|
||||
cx.defer(move |_, cx| {
|
||||
if let Some(workspace) = workspace.upgrade(cx) {
|
||||
workspace.update(cx, |workspace, _| {
|
||||
cx.defer(move |workspace, _| {
|
||||
workspace.dock.panel_sizes.insert(anchor, size);
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
if anchor == DockAnchor::Right {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue