Remove focus side effects from toggle dock commands

co-authored-by: max <max@zed.dev>
This commit is contained in:
Mikayla Maki 2023-05-30 12:32:00 -07:00
parent 1a23fe91b4
commit 9c9af5ed94
No known key found for this signature in database
2 changed files with 70 additions and 14 deletions

View file

@ -201,7 +201,7 @@ impl Dock {
self.active_panel_index
}
pub fn set_open(&mut self, open: bool, cx: &mut ViewContext<Self>) {
pub(crate) fn set_open(&mut self, open: bool, cx: &mut ViewContext<Self>) {
if open != self.is_open {
self.is_open = open;
if let Some(active_panel) = self.panel_entries.get(self.active_panel_index) {
@ -212,11 +212,6 @@ impl Dock {
}
}
pub fn toggle_open(&mut self, cx: &mut ViewContext<Self>) {
self.set_open(!self.is_open, cx);
cx.notify();
}
pub fn set_panel_zoomed(
&mut self,
panel: &AnyViewHandle,