Ensure that on_release callbacks are called even if view outlives its window

This commit is contained in:
Max Brunsfeld
2023-12-20 16:01:52 -08:00
parent e1a4e8ea16
commit 5e7c74c7b6
5 changed files with 27 additions and 19 deletions
+1 -1
View File
@@ -642,7 +642,7 @@ impl Workspace {
this.serialize_workspace(cx);
cx.notify();
}),
cx.on_release(|this, cx| {
cx.on_release(|this, _, cx| {
this.app_state.workspace_store.update(cx, |store, _| {
store.workspaces.remove(&this.window_self);
})