A platform for community discussion. Free, open, simple.
FIX: show update banner only once on categories with subcategory lists (#17782)
Jean8ab6b17c36c6
diff --git a/app/assets/javascripts/discourse/app/controllers/discovery/categories.js b/app/assets/javascripts/discourse/app/controllers/discovery/categories.jsindex a80ce60bcfc..c46f41c1c82 100644--- a/app/assets/javascripts/discourse/app/controllers/discovery/categories.js+++ b/app/assets/javascripts/discourse/app/controllers/discovery/categories.js@@ -23,6 +23,10 @@ export default DiscoveryController.extend({category: null,canEdit: reads("currentUser.staff"),+ @discourseComputed+ isCategoriesRoute() {+ return this.router.currentRouteName === "discovery.categories";+ },@discourseComputed("model.parentCategory")categoryPageStyle(parentCategory) {let style = this.siteSettings.desktop_category_page_style;diff --git a/app/assets/javascripts/discourse/app/templates/discovery/categories.hbs b/app/assets/javascripts/discourse/app/templates/discovery/categories.hbsindex a9cde049366..4187cda09d5 100644--- a/app/assets/javascripts/discourse/app/templates/discovery/categories.hbs+++ b/app/assets/javascripts/discourse/app/templates/discovery/categories.hbs@@ -1,7 +1,7 @@<PluginOutlet @name="above-discovery-categories" @connectorTagName="div" @args={{hash categories=this.model.categories categoryPageStyle=this.categoryPageStyle topics=this.model.topics}} /><DiscoveryCategories @refresh={{action "refresh"}}>- {{#if this.topicTrackingState.hasIncoming}}+ {{#if (and this.topicTrackingState.hasIncoming this.isCategoriesRoute)}}<div class="show-more {{if this.hasTopics "has-topics"}}"><div role="button" class="alert alert-info clickable" {{action "showInserted"}}><CountI18n @key="topic_count_" @suffix={{this.topicTrackingState.filter}} @count={{this.topicTrackingState.incomingCount}} />