From 3a2319be2b1a22b53adecbf104e702410c6b33d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Saquetim?= <1108771+megothss@users.noreply.github.com> Date: Tue, 28 May 2024 21:48:55 -0300 Subject: [PATCH] Revert "DEV: Update how we determine the presence of a topic in the header (#27138)" (#27234) This reverts commit caa29ec97351f1443f7be9560187116f045b820b. --- .../javascripts/discourse/app/components/discourse-topic.js | 4 ++-- app/assets/javascripts/discourse/app/components/header.gjs | 2 +- .../discourse/app/components/header/auth-buttons.gjs | 2 +- .../javascripts/discourse/app/components/header/contents.gjs | 4 ++-- .../javascripts/discourse/app/routes/topic-from-params.js | 3 --- app/assets/javascripts/discourse/app/services/header.js | 1 - 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/discourse-topic.js b/app/assets/javascripts/discourse/app/components/discourse-topic.js index 2a3a0161c31..4253cbb8034 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.inTopic = false; + this.header.topic = null; this._lastShowTopic = false; }, @@ -65,7 +65,7 @@ export default Component.extend(Scrolling, MobileScrollDirection, { return; } this.appEvents.trigger("header:show-topic", topic); - this.header.inTopic = true; + this.header.topic = topic; this._lastShowTopic = true; }, diff --git a/app/assets/javascripts/discourse/app/components/header.gjs b/app/assets/javascripts/discourse/app/components/header.gjs index 0a030e181b5..54b33121332 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 72f58757440..713e8b44bc3 100644 --- a/app/assets/javascripts/discourse/app/components/header/auth-buttons.gjs +++ b/app/assets/javascripts/discourse/app/components/header/auth-buttons.gjs @@ -8,7 +8,7 @@ export default class AuthButtons extends Component {