diff --git a/app/assets/javascripts/discourse/app/components/discourse-topic.js b/app/assets/javascripts/discourse/app/components/discourse-topic.js
index 4253cbb8034..2e14817089e 100644
--- a/app/assets/javascripts/discourse/app/components/discourse-topic.js
+++ b/app/assets/javascripts/discourse/app/components/discourse-topic.js
@@ -56,7 +56,7 @@ export default Component.extend(Scrolling, MobileScrollDirection, {
_hideTopicInHeader() {
this.appEvents.trigger("header:hide-topic");
- this.header.topic = null;
+ this.header.topicInfoVisible = false;
this._lastShowTopic = false;
},
@@ -65,7 +65,7 @@ export default Component.extend(Scrolling, MobileScrollDirection, {
return;
}
this.appEvents.trigger("header:show-topic", topic);
- this.header.topic = topic;
+ this.header.topicInfoVisible = true;
this._lastShowTopic = true;
},
diff --git a/app/assets/javascripts/discourse/app/components/header.gjs b/app/assets/javascripts/discourse/app/components/header.gjs
index 54b33121332..3fd93d5d158 100644
--- a/app/assets/javascripts/discourse/app/components/header.gjs
+++ b/app/assets/javascripts/discourse/app/components/header.gjs
@@ -242,7 +242,7 @@ export default class GlimmerHeader extends Component {
diff --git a/app/assets/javascripts/discourse/app/components/header/auth-buttons.gjs b/app/assets/javascripts/discourse/app/components/header/auth-buttons.gjs
index 007c684314e..fb3a576a0c7 100644
--- a/app/assets/javascripts/discourse/app/components/header/auth-buttons.gjs
+++ b/app/assets/javascripts/discourse/app/components/header/auth-buttons.gjs
@@ -9,7 +9,7 @@ export default class AuthButtons extends Component {
return (
this.args.canSignUp &&
!this.header.headerButtonsHidden.includes("signup") &&
- !this.header.topic
+ !this.header.topicInfoVisible
);
}
diff --git a/app/assets/javascripts/discourse/app/components/header/contents.gjs b/app/assets/javascripts/discourse/app/components/header/contents.gjs
index dbf71bc705e..4e6d8943235 100644
--- a/app/assets/javascripts/discourse/app/components/header/contents.gjs
+++ b/app/assets/javascripts/discourse/app/components/header/contents.gjs
@@ -15,10 +15,6 @@ export default class Contents extends Component {
@service header;
@service sidebarState;
- get topicPresent() {
- return !!this.header.topic;
- }
-
get sidebarIcon() {
if (this.sidebarState.adminSidebarAllowedWithLegacyNavigationMenu) {
return "discourse-sidebar";
@@ -31,7 +27,11 @@ export default class Contents extends Component {
{{#if this.site.desktopView}}
{{#if @sidebarEnabled}}
@@ -45,12 +45,12 @@ export default class Contents extends Component {
- {{#if this.header.topic}}
-
+ {{#if this.header.topicInfoVisible}}
+
{{else if
(and
this.siteSettings.bootstrap_mode_enabled
@@ -66,19 +66,31 @@ export default class Contents extends Component {
{{yield}}
diff --git a/app/assets/javascripts/discourse/app/components/header/topic/featured-link.gjs b/app/assets/javascripts/discourse/app/components/header/topic/featured-link.gjs
index 2cc09d928dc..31d0c405fb4 100644
--- a/app/assets/javascripts/discourse/app/components/header/topic/featured-link.gjs
+++ b/app/assets/javascripts/discourse/app/components/header/topic/featured-link.gjs
@@ -7,7 +7,7 @@ export default class FeaturedLink extends Component {
@service header;
get meta() {
- return extractLinkMeta(this.header.topic);
+ return extractLinkMeta(this.header.topicInfo);
}