Move settings subscription to dock
Reduces likelihood of panels being unable to move themselves
This commit is contained in:
parent
fee369bca1
commit
898645681f
6 changed files with 13 additions and 62 deletions
|
@ -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
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue