diff --git a/.discourse-compatibility b/.discourse-compatibility index 628d3dc..473ff8d 100644 --- a/.discourse-compatibility +++ b/.discourse-compatibility @@ -1,3 +1,4 @@ +<= 3.5.0.beta9-dev: b52439ff8c4b7629a693a9b2d9546c15678c7a8a < 3.5.0.beta5-dev: f4ef4a41587d75d062b4fc7841d8f78e7726ea59 < 3.5.0.beta1-dev: 5fda8d63def631692e8780c6b8bc2457eae55a29 < 3.4.0.beta1-dev: 471a797e05f9b55df90ef71145420ec001f9f48d diff --git a/javascripts/discourse/components/category-topics.gjs b/javascripts/discourse/components/category-topics.gjs index bec60da..280a5fd 100644 --- a/javascripts/discourse/components/category-topics.gjs +++ b/javascripts/discourse/components/category-topics.gjs @@ -1,10 +1,8 @@ import Component from "@glimmer/component"; import { tracked } from "@glimmer/tracking"; import { service } from "@ember/service"; +import TopicLink from "discourse/components/topic-list/topic-link"; import categoryLink from "discourse/helpers/category-link"; -import htmlSafe from "discourse/helpers/html-safe"; -import replaceEmoji from "discourse/helpers/replace-emoji"; -import getURL from "discourse/lib/get-url"; import Category from "discourse/models/category"; export default class CategoryTopics extends Component { @@ -26,16 +24,7 @@ export default class CategoryTopics extends Component { this.category = Category.findById(categoryId); this.store.findFiltered("topicList", { filter }).then((result) => { - const results = result.topic_list.topics; - - results.forEach((topic) => { - topic.url = `${getURL("/t/")}${topic.slug}/${topic.id}`; - if (topic.last_read_post_number > 0) { - topic.url += `/${topic.last_read_post_number}`; - } - }); - - this.topics = results.slice(0, count); + this.topics = result.topics.slice(0, count); }); } @@ -49,12 +38,11 @@ export default class CategoryTopics extends Component {
{{#each this.topics as |topic|}} - - {{htmlSafe (replaceEmoji topic.fancy_title)}} + ({{topic.posts_count}}) - + {{/each}}