DEV: Remove legacy topic-list code (#718)

This commit is contained in:
David Taylor 2025-04-14 14:39:00 +01:00 committed by GitHub
parent 8d09cf8503
commit f10b3a399a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 23 deletions

View File

@ -1,3 +1,4 @@
< 3.5.0.beta3-dev: 8d09cf8503b78f4c72b47a7319c0f4b9ad0247e7
< 3.5.0.beta2-dev: c1031224a552ea01958d153350c2d1254b323579
< 3.5.0.beta1-dev: fdf3ad927744a9dbb826cc46e489cca8ad469044
< 3.4.0.beta2-dev: 5f6942c1f3616d43eec18a71d76baa0e55e1340b

View File

@ -1,5 +1,3 @@
import discourseComputed from "discourse/lib/decorators";
import { withSilencedDeprecations } from "discourse/lib/deprecated";
import { withPluginApi } from "discourse/lib/plugin-api";
export default {
@ -7,27 +5,6 @@ export default {
initialize(container) {
withPluginApi("0.8", (api) => {
// TODO: cvx - remove after the glimmer topic list transition
withSilencedDeprecations("discourse.hbr-topic-list-overrides", () => {
api.modifyClass(
"component:topic-list",
(Superclass) =>
class extends Superclass {
@discourseComputed(
"category",
"siteSettings.disable_resorting_on_categories_enabled"
)
sortable(category, disable_resorting_on_categories_enabled) {
const disableSort =
disable_resorting_on_categories_enabled &&
!!category?.custom_fields?.disable_topic_resorting;
return super.sortable && !disableSort;
}
}
);
});
api.registerValueTransformer(
"topic-list-header-sortable-column",
({ value, context }) => {