A platform for community discussion. Free, open, simple.
DEV: Replace a full computed prop with readOnly
Jarek Radosz883da89c7055
diff --git a/app/assets/javascripts/discourse/app/components/d-navigation.js b/app/assets/javascripts/discourse/app/components/d-navigation.jsindex b75ba8ee18b..080581cb4cc 100644--- a/app/assets/javascripts/discourse/app/components/d-navigation.js+++ b/app/assets/javascripts/discourse/app/components/d-navigation.js@@ -4,12 +4,15 @@ import { inject as service } from "@ember/service";import Component from "@ember/component";import FilterModeMixin from "discourse/mixins/filter-mode";import bootbox from "bootbox";+import { readOnly } from "@ember/object/computed";export default Component.extend(FilterModeMixin, {router: service(),tagName: "",+ categories: readOnly("site.categoriesList"),+@discourseComputed("category")showCategoryNotifications(category) {return category && this.currentUser;@@ -53,11 +56,6 @@ export default Component.extend(FilterModeMixin, {}},- @discourseComputed()- categories() {- return this.site.get("categoriesList");- },-@discourseComputed("hasDraft")createTopicLabel(hasDraft) {return hasDraft ? "topic.open_draft" : "topic.create";