diff --git a/plugins/chat/assets/javascripts/discourse/components/channel-icon/index.gjs b/plugins/chat/assets/javascripts/discourse/components/channel-icon/index.gjs index a014679d985..e704540ce84 100644 --- a/plugins/chat/assets/javascripts/discourse/components/channel-icon/index.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/channel-icon/index.gjs @@ -19,6 +19,10 @@ export default class ChatChannelIcon extends Component { return htmlSafe(`color: #${this.args.channel.chatable.color}`); } + get isThreadsList() { + return this.args.thread ?? false; + } + } diff --git a/plugins/chat/assets/javascripts/discourse/components/chat/thread/header.gjs b/plugins/chat/assets/javascripts/discourse/components/chat/thread/header.gjs index 48181cbb782..c654b0d7605 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat/thread/header.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat/thread/header.gjs @@ -24,14 +24,14 @@ export default class ChatThreadHeader extends Component { route = "chat.channel.threads"; title = I18n.t("chat.return_to_threads_list"); models = this.channel?.routeModels; - } else if (!this.currentUser.isInDoNotDisturb() && this.unreadCount > 0) { - route = "chat.channel.threads"; - title = I18n.t("chat.return_to_threads_list"); - models = this.channel?.routeModels; } else if (prevPage === "chat.threads") { route = "chat.threads"; title = I18n.t("chat.my_threads.title"); models = []; + } else if (!this.currentUser.isInDoNotDisturb() && this.unreadCount > 0) { + route = "chat.channel.threads"; + title = I18n.t("chat.return_to_threads_list"); + models = this.channel?.routeModels; } else { route = "chat.channel.index"; title = I18n.t("chat.return_to_channel"); @@ -53,6 +53,12 @@ export default class ChatThreadHeader extends Component { return this.channel?.threadsManager?.unreadThreadCount; } + get showThreadUnreadIndicator() { + return ( + this.backLink.route === "chat.channel.threads" && this.unreadCount > 0 + ); + } +