Put context parameter last in toggle_modal callback
This is more consistent with our treatment of context params everywhere else.
This commit is contained in:
parent
6b5cab5db1
commit
9c68c3e8a9
8 changed files with 9 additions and 9 deletions
|
@ -943,7 +943,7 @@ impl Workspace {
|
|||
) -> Option<ViewHandle<V>>
|
||||
where
|
||||
V: 'static + View,
|
||||
F: FnOnce(&mut ViewContext<Self>, &mut Self) -> ViewHandle<V>,
|
||||
F: FnOnce(&mut Self, &mut ViewContext<Self>) -> ViewHandle<V>,
|
||||
{
|
||||
cx.notify();
|
||||
// Whatever modal was visible is getting clobbered. If its the same type as V, then return
|
||||
|
@ -953,7 +953,7 @@ impl Workspace {
|
|||
cx.focus_self();
|
||||
Some(already_open_modal)
|
||||
} else {
|
||||
let modal = add_view(cx, self);
|
||||
let modal = add_view(self, cx);
|
||||
cx.focus(&modal);
|
||||
self.modal = Some(modal.into());
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue