This repository was archived by the owner on Jul 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed
assets/javascripts/discourse/initializers Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change 1- import { observes , on } from "discourse/lib/decorators" ;
21import { iconNode } from "discourse/lib/icon-library" ;
32import { withPluginApi } from "discourse/lib/plugin-api" ;
43import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes" ;
54
6- const PLUGIN_ID = "discourse-user-notes" ;
7-
85export 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 ) => {
You can’t perform that action at this time.
0 commit comments