Skip to content

Commit aa9d623

Browse files
DEV: Remove unused modifyClass (#119)
The controller customizations are unused since 8996279
1 parent f99d2ec commit aa9d623

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

assets/javascripts/discourse/initializers/enable-user-notes.js

-25
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
import { observes, on } from "discourse/lib/decorators";
21
import { iconNode } from "discourse/lib/icon-library";
32
import { withPluginApi } from "discourse/lib/plugin-api";
43
import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes";
54

6-
const PLUGIN_ID = "discourse-user-notes";
7-
85
export default {
96
name: "enable-user-notes",
107
initialize(container) {
@@ -38,28 +35,6 @@ export default {
3835
this.model.set("user_custom_fields", cfs);
3936
});
4037

41-
api.modifyClass("controller:user", {
42-
pluginId: PLUGIN_ID,
43-
userNotesCount: null,
44-
45-
@on("init")
46-
@observes("model")
47-
_modelChanged: function () {
48-
this.set(
49-
"userNotesCount",
50-
this.get("model.custom_fields.user_notes_count") || 0
51-
);
52-
},
53-
54-
actions: {
55-
showUserNotes() {
56-
showUserNotes(store, this.model.id, (count) =>
57-
this.set("userNotesCount", count)
58-
);
59-
},
60-
},
61-
});
62-
6338
const mobileView = api.container.lookup("service:site").mobileView;
6439
const loc = mobileView ? "before" : "after";
6540
api.decorateWidget(`poster-name:${loc}`, (dec) => {

0 commit comments

Comments
 (0)