DEV: Fix imports (#192)

This commit is contained in:
Jarek Radosz
2022-03-06 21:33:24 +01:00
committed by GitHub
parent 6007395cfb
commit 7c50330e04
5 changed files with 12 additions and 10 deletions
@@ -9,6 +9,7 @@ import { ajax } from "discourse/lib/ajax";
import PostCooked from "discourse/widgets/post-cooked";
import { formatUsername } from "discourse/lib/utilities";
import { iconHTML, iconNode } from "discourse-common/lib/icon-library";
import { computed } from "@ember/object";
function clearAccepted(topic) {
const posts = topic.get("postStream.posts");
@@ -216,7 +217,7 @@ export default {
initialize() {
Topic.reopen({
// keeping this here cause there is complex localization
acceptedAnswerHtml: Ember.computed("accepted_answer", "id", function () {
acceptedAnswerHtml: computed("accepted_answer", "id", function () {
const username = this.get("accepted_answer.username");
const postNumber = this.get("accepted_answer.post_number");
@@ -236,7 +237,7 @@ export default {
});
TopicStatus.reopen({
statuses: Ember.computed(function () {
statuses: computed(function () {
const results = this._super(...arguments);
if (this.topic.has_accepted_answer) {
@@ -1,4 +1,5 @@
import Category from "discourse/models/category";
import { computed } from "@ember/object";
export default {
name: "extend-category-for-solved",
@@ -7,11 +8,11 @@ export default {
initialize() {
Category.reopen({
enable_accepted_answers: Ember.computed(
enable_accepted_answers: computed(
"custom_fields.enable_accepted_answers",
{
get(fieldName) {
return Ember.get(this.custom_fields, fieldName) === "true";
return this.get(this.custom_fields, fieldName) === "true";
},
}
),