File tree 1 file changed +0
-25
lines changed
assets/javascripts/discourse/initializers
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" ;
2
1
import { iconNode } from "discourse/lib/icon-library" ;
3
2
import { withPluginApi } from "discourse/lib/plugin-api" ;
4
3
import { showUserNotes } from "discourse/plugins/discourse-user-notes/discourse-user-notes/lib/user-notes" ;
5
4
6
- const PLUGIN_ID = "discourse-user-notes" ;
7
-
8
5
export default {
9
6
name : "enable-user-notes" ,
10
7
initialize ( container ) {
@@ -38,28 +35,6 @@ export default {
38
35
this . model . set ( "user_custom_fields" , cfs ) ;
39
36
} ) ;
40
37
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
-
63
38
const mobileView = api . container . lookup ( "service:site" ) . mobileView ;
64
39
const loc = mobileView ? "before" : "after" ;
65
40
api . decorateWidget ( `poster-name:${ loc } ` , ( dec ) => {
You can’t perform that action at this time.
0 commit comments