DEV: Replace a full computed prop with readOnly
This commit is contained in:
parent
44de03e409
commit
883da89c70
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue