Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix re-docking chat panel
Conrad Irwinfee369bca157
diff --git a/crates/collab_ui/src/chat_panel.rs b/crates/collab_ui/src/chat_panel.rsindex ee0241eb120..13b217eec48 100644--- a/crates/collab_ui/src/chat_panel.rs+++ b/crates/collab_ui/src/chat_panel.rs@@ -70,13 +70,6 @@ struct SerializedChatPanel {width: Option<Pixels>,}-#[derive(Debug)]-pub enum Event {- DockPositionChanged,- Focus,- Dismissed,-}-actions!(chat_panel, [ToggleFocus]);impl ChatPanel {@@ -140,7 +133,7 @@ impl ChatPanel {let new_dock_position = this.position(cx);if new_dock_position != old_dock_position {old_dock_position = new_dock_position;- cx.emit(Event::DockPositionChanged);+ cx.emit(PanelEvent::ChangePosition);}cx.notify();},@@ -541,8 +534,6 @@ impl ChatPanel {}}-impl EventEmitter<Event> for ChatPanel {}-impl Render for ChatPanel {fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {v_stack()@@ -662,7 +653,7 @@ impl Panel for ChatPanel {if active {self.acknowledge_last_message(cx);if !is_channels_feature_enabled(cx) {- cx.emit(Event::Dismissed);+ cx.emit(PanelEvent::Close);}}}