DEV: Remove unused modifyClass (#119)

The controller customizations are unused since 89962793d0
This commit is contained in:
David Taylor 2025-03-05 10:12:04 +00:00 committed by GitHub
parent f99d2ec473
commit aa9d623db3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 25 deletions

View File

@ -1,10 +1,7 @@
import { observes, on } from "discourse/lib/decorators";
import { iconNode } from "discourse/lib/icon-library";
import { withPluginApi } from "discourse/lib/plugin-api";
import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes";
const PLUGIN_ID = "discourse-user-notes";
export default {
name: "enable-user-notes",
initialize(container) {
@ -38,28 +35,6 @@ export default {
this.model.set("user_custom_fields", cfs);
});
api.modifyClass("controller:user", {
pluginId: PLUGIN_ID,
userNotesCount: null,
@on("init")
@observes("model")
_modelChanged: function () {
this.set(
"userNotesCount",
this.get("model.custom_fields.user_notes_count") || 0
);
},
actions: {
showUserNotes() {
showUserNotes(store, this.model.id, (count) =>
this.set("userNotesCount", count)
);
},
},
});
const mobileView = api.container.lookup("service:site").mobileView;
const loc = mobileView ? "before" : "after";
api.decorateWidget(`poster-name:${loc}`, (dec) => {