mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-03 00:21:32 +03:00
Make project dropdown exclusive wrt git menu
This commit is contained in:
parent
888d3b3fd6
commit
818ddbc703
@ -439,6 +439,7 @@ impl CollabTitlebarItem {
|
|||||||
cx.notify();
|
cx.notify();
|
||||||
})
|
})
|
||||||
.detach();
|
.detach();
|
||||||
|
self.project_popover.take();
|
||||||
self.branch_popover = Some(view);
|
self.branch_popover = Some(view);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -447,7 +448,6 @@ impl CollabTitlebarItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn toggle_project_menu(&mut self, _: &ToggleProjectMenu, cx: &mut ViewContext<Self>) {
|
pub fn toggle_project_menu(&mut self, _: &ToggleProjectMenu, cx: &mut ViewContext<Self>) {
|
||||||
log::error!("Toggling project menu");
|
|
||||||
if self.project_popover.take().is_none() {
|
if self.project_popover.take().is_none() {
|
||||||
let view = cx.add_view(|cx| build_recent_projects(self.workspace.clone(), cx));
|
let view = cx.add_view(|cx| build_recent_projects(self.workspace.clone(), cx));
|
||||||
cx.subscribe(&view, |this, _, event, cx| {
|
cx.subscribe(&view, |this, _, event, cx| {
|
||||||
@ -460,6 +460,7 @@ impl CollabTitlebarItem {
|
|||||||
cx.notify();
|
cx.notify();
|
||||||
})
|
})
|
||||||
.detach();
|
.detach();
|
||||||
|
self.branch_popover.take();
|
||||||
self.project_popover = Some(view);
|
self.project_popover = Some(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user