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

@ -254,19 +254,6 @@ impl CollabPanel {
this.update_entries(false, cx);
// Update the dock position when the setting changes.
let mut old_dock_position = this.position(cx);
this.subscriptions.push(cx.observe_global::<SettingsStore>(
move |this: &mut Self, 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();
},
));
let active_call = ActiveCall::global(cx);
this.subscriptions
.push(cx.observe(&this.user_store, |this, _, cx| {