From b7cfd4e146e6c6e5bcd03bbb54253d0642259d2e Mon Sep 17 00:00:00 2001 From: David Battersby Date: Thu, 5 Sep 2024 19:01:12 +0400 Subject: [PATCH] FIX: toggle chat drawer on channel thread list (#28759) Chat toggle relies on using a height: auto to collapse drawer, however in channel threads we should be only displaying threads when drawer is expanded. Displaying threads conditionally based on drawer toggle status fixes this. --- .../chat/drawer-routes/channel-threads.gjs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/drawer-routes/channel-threads.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/drawer-routes/channel-threads.gjs index 861b9742ccb..e2e1b0c7e92 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat/drawer-routes/channel-threads.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat/drawer-routes/channel-threads.gjs @@ -12,6 +12,7 @@ import ChatThreadList from "discourse/plugins/chat/discourse/components/chat-thr export default class ChatDrawerRoutesChannelThreads extends Component { @service chat; @service chatChannelsManager; + @service chatStateManager; backLinkTitle = I18n.t("chat.return_to_list"); @@ -57,14 +58,16 @@ export default class ChatDrawerRoutesChannelThreads extends Component { {{/if}} -
- {{#if this.chat.activeChannel}} - - {{/if}} -
+ {{#if this.chatStateManager.isDrawerExpanded}} +
+ {{#if this.chat.activeChannel}} + + {{/if}} +
+ {{/if}} }