diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-thread.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-thread.gjs index 250ef05e875..090ed48b0a7 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-thread.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat-thread.gjs @@ -150,6 +150,7 @@ export default class ChatThread extends Component { this.isScrolling = false; this.resetIdle(); this.atBottom = state.atBottom; + this.args.setFullTitle?.(state.atTop); if (state.atBottom) { this.fetchMoreMessages({ direction: FUTURE }); diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/drawer-routes/channel-thread.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/drawer-routes/channel-thread.gjs index 91279181580..fea5228ee38 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat/drawer-routes/channel-thread.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat/drawer-routes/channel-thread.gjs @@ -1,4 +1,5 @@ import Component from "@glimmer/component"; +import { tracked } from "@glimmer/tracking"; import { array } from "@ember/helper"; import { action } from "@ember/object"; import didInsert from "@ember/render-modifiers/modifiers/did-insert"; @@ -15,6 +16,12 @@ export default class ChatDrawerRoutesChannelThread extends Component { @service chatChannelsManager; @service chatHistory; + @tracked showThreadFullTitle = false; + + get showfullTitle() { + return this.chatStateManager.isDrawerExpanded && this.showThreadFullTitle; + } + get backButton() { const link = { models: this.chat.activeChannel?.routeModels, @@ -65,8 +72,17 @@ export default class ChatDrawerRoutesChannelThread extends Component { } } + @action + setFullTitle(value) { + this.showThreadFullTitle = value; + } +