Move settings subscription to dock

Reduces likelihood of panels being unable to move themselves
This commit is contained in:
Conrad Irwin 2024-01-13 22:35:33 -07:00
parent fee369bca1
commit 898645681f
6 changed files with 13 additions and 62 deletions

View file

@ -192,17 +192,6 @@ impl AssistantPanel {
retrieve_context_in_next_inline_assist: false,
};
let mut old_dock_position = this.position(cx);
this.subscriptions =
vec![cx.observe_global::<SettingsStore>(move |this, cx| {
let new_dock_position = this.position(cx);
if new_dock_position != old_dock_position {
old_dock_position = new_dock_position;
cx.emit(PanelEvent::ChangePosition);
}
cx.notify();
})];
this
})
})