mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-06-25 17:12:16 +00:00
DEV: Add condition for force-conversations-sidebar AppEvent (#1418)
This commit is contained in:
parent
98afd7f8c3
commit
cb94fa5e1c
@ -86,13 +86,15 @@ export default class AiConversationsSidebarManager extends Service {
|
||||
|
||||
forceCustomSidebar() {
|
||||
document.body.classList.add("has-ai-conversations-sidebar");
|
||||
if (!this.sidebarState.isForcingSidebar) {
|
||||
this.appEvents.trigger("discourse-ai:force-conversations-sidebar");
|
||||
}
|
||||
|
||||
this.sidebarState.isForcingSidebar = true;
|
||||
|
||||
// calling this before fetching data
|
||||
// helps avoid flash of main sidebar mode
|
||||
this.sidebarState.setPanel(AI_CONVERSATIONS_PANEL);
|
||||
|
||||
this.appEvents.trigger("discourse-ai:force-conversations-sidebar");
|
||||
this.sidebarState.setSeparatedMode();
|
||||
this.sidebarState.hideSwitchPanelButtons();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user