From dabd9a159a0ebf92a925aea6f6f740e1e5b7a874 Mon Sep 17 00:00:00 2001 From: Jordan Vidrine <30537603+jordanvidrine@users.noreply.github.com> Date: Mon, 24 Mar 2025 12:05:10 -0500 Subject: [PATCH] DEV: Use new is_hot_topic serializer (#73) --- about.json | 3 ++- .../discourse/components/card/topic-status-column.gjs | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/about.json b/about.json index f61b186..c2fb8bf 100644 --- a/about.json +++ b/about.json @@ -9,7 +9,8 @@ "maximum_discourse_version": null, "assets": {}, "modifiers": { - "svg_icons": ["fire"] + "svg_icons": ["fire"], + "serialize_topic_is_hot": true }, "components": [ "https://github.com/discourse/discourse-sidebar-new-topic-button.git", diff --git a/javascripts/discourse/components/card/topic-status-column.gjs b/javascripts/discourse/components/card/topic-status-column.gjs index b508190..003fe10 100644 --- a/javascripts/discourse/components/card/topic-status-column.gjs +++ b/javascripts/discourse/components/card/topic-status-column.gjs @@ -6,12 +6,8 @@ import { i18n } from "discourse-i18n"; export default class TopicStatusColumn extends Component { @service siteSettings; - get heatMap() { - return this.args.topic.views > this.siteSettings.topic_views_heat_medium; - } - get badge() { - if (this.heatMap) { + if (this.args.topic.is_hot) { return { icon: "fire", text: "topic_hot",