Allow modals to override their dismissal

Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
This commit is contained in:
Joseph T. Lyons
2023-12-08 15:29:44 -05:00
co-authored by Mikayla Maki
parent 1c850f495c
commit 113c7287df
13 changed files with 118 additions and 46 deletions
+1 -1
View File
@@ -3414,7 +3414,7 @@ impl Workspace {
self.modal_layer.read(cx).active_modal()
}
pub fn toggle_modal<V: ManagedView, B>(&mut self, cx: &mut ViewContext<Self>, build: B)
pub fn toggle_modal<V: ModalView, B>(&mut self, cx: &mut ViewContext<Self>, build: B)
where
B: FnOnce(&mut ViewContext<V>) -> V,
{