Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit ae01ad3

Browse files
DEV: Remove legacy topic-list code (#362)
1 parent 4f0234f commit ae01ad3

File tree

2 files changed

+1
-53
lines changed

2 files changed

+1
-53
lines changed

.discourse-compatibility

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
< 3.5.0.beta3-dev: 4f0234f5be3aaa77db277e0f224cd9750d2713cd
12
< 3.5.0.beta2-dev: e82c6ae1ca38ccebb34669148f8de93a3028906e
23
< 3.5.0.beta1-dev: 5450a5ef4e2ae35185320fc6af9678621026e148
34
< 3.4.0.beta4-dev: 3f724bf3114cc7877fa757bc8035f13a7390c739

assets/javascripts/discourse/initializers/extend-for-solved-button.js

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import { computed } from "@ember/object";
2-
import discourseComputed from "discourse/lib/decorators";
3-
import { withSilencedDeprecations } from "discourse/lib/deprecated";
42
import { iconHTML } from "discourse/lib/icon-library";
53
import { withPluginApi } from "discourse/lib/plugin-api";
64
import { formatUsername } from "discourse/lib/utilities";
@@ -156,57 +154,6 @@ export default {
156154
}),
157155
});
158156

159-
withPluginApi("2.0.0", (api) => {
160-
withSilencedDeprecations("discourse.hbr-topic-list-overrides", () => {
161-
let topicStatusIcons;
162-
try {
163-
topicStatusIcons =
164-
require("discourse/helpers/topic-status-icons").default;
165-
} catch {}
166-
167-
topicStatusIcons?.addObject([
168-
"has_accepted_answer",
169-
"far-square-check",
170-
"solved",
171-
]);
172-
173-
api.modifyClass(
174-
"raw-view:topic-status",
175-
(Superclass) =>
176-
class extends Superclass {
177-
@discourseComputed(
178-
"topic.{has_accepted_answer,accepted_answer,can_have_answer}"
179-
)
180-
statuses() {
181-
const results = super.statuses;
182-
183-
if (
184-
this.topic.has_accepted_answer ||
185-
this.topic.accepted_answer
186-
) {
187-
results.push({
188-
openTag: "span",
189-
closeTag: "span",
190-
title: i18n("topic_statuses.solved.help"),
191-
icon: "far-square-check",
192-
key: "solved",
193-
});
194-
} else if (this.topic.can_have_answer) {
195-
results.push({
196-
openTag: "span",
197-
closeTag: "span",
198-
title: i18n("solved.has_no_accepted_answer"),
199-
icon: "far-square",
200-
});
201-
}
202-
203-
return results;
204-
}
205-
}
206-
);
207-
});
208-
});
209-
210157
withPluginApi("1.34.0", initializeWithApi);
211158

212159
withPluginApi("0.8.10", (api) => {

0 commit comments

Comments
 (0)