DEV: Replace a full computed prop with readOnly

This commit is contained in:
Jarek Radosz 2020-11-11 11:17:44 +01:00 committed by Robin Ward
parent 44de03e409
commit 883da89c70
1 changed files with 3 additions and 5 deletions

View File

@ -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";