@@ -47,7 +47,7 @@ export const loadComents = (args = {}) => {
47
47
sr71$ . query ( S . pagedComments , args )
48
48
}
49
49
50
- const markLoading = fresh => {
50
+ const markLoading = ( fresh ) => {
51
51
if ( fresh ) {
52
52
return store . mark ( { loadingFresh :true } )
53
53
}
@@ -64,7 +64,7 @@ export const createComment = curry((cb, e) => {
64
64
body :store . editContent ,
65
65
thread :store . activeThread ,
66
66
community :store . communityRaw ,
67
- mentionUsers :store . referUsersData . map ( user => ( { id :user . id } ) ) ,
67
+ mentionUsers :store . referUsersData . map ( ( user ) => ( { id :user . id } ) ) ,
68
68
}
69
69
70
70
log ( 'createComment args: ' , args )
@@ -84,7 +84,7 @@ export const backToEditor = () =>
84
84
showInputPreview :false ,
85
85
} )
86
86
87
- export const previewReply = data => {
87
+ export const previewReply = ( data ) => {
88
88
log ( 'previewReply --> : ' , data )
89
89
}
90
90
@@ -132,25 +132,25 @@ export const createReplyComment = () => {
132
132
body :store . replyContent ,
133
133
community :store . curCommunity . raw ,
134
134
thread :store . activeThread ,
135
- mentionUsers :store . referUsersData . map ( user => ( { id :user . id } ) ) ,
135
+ mentionUsers :store . referUsersData . map ( ( user ) => ( { id :user . id } ) ) ,
136
136
} )
137
137
}
138
138
139
- export const onCommentInputChange = editContent =>
139
+ export const onCommentInputChange = ( editContent ) =>
140
140
store . mark ( {
141
141
countCurrent :countWords ( editContent ) ,
142
142
extractMentions :extractMentions ( editContent ) ,
143
143
editContent,
144
144
} )
145
145
146
- export const onReplyInputChange = replyContent =>
146
+ export const onReplyInputChange = ( replyContent ) =>
147
147
store . mark ( {
148
148
countCurrent :countWords ( replyContent ) ,
149
149
extractMentions :extractMentions ( replyContent ) ,
150
150
replyContent,
151
151
} )
152
152
153
- export const openUpdateEditor = data =>
153
+ export const openUpdateEditor = ( data ) =>
154
154
store . mark ( {
155
155
isEdit :true ,
156
156
showReplyBox :true ,
@@ -160,7 +160,7 @@ export const openUpdateEditor = data =>
160
160
replyContent :data . body ,
161
161
} )
162
162
163
- export const openReplyEditor = data => {
163
+ export const openReplyEditor = ( data ) => {
164
164
if ( ! store . isLogin ) return store . authWarning ( )
165
165
166
166
initDraftTimmer ( )
@@ -194,7 +194,7 @@ export const closeReplyBox = () => {
194
194
} )
195
195
}
196
196
197
- export const onFilterChange = filterType => {
197
+ export const onFilterChange = ( filterType ) => {
198
198
store . mark ( { filterType} )
199
199
loadComents ( { filter :{ page :1 , sort :filterType } } )
200
200
}
@@ -206,7 +206,7 @@ export const onFilterChange = filterType => {
206
206
*@param {comment.id } string
207
207
*@returns
208
208
*/
209
- export const toggleLikeComment = comment => {
209
+ export const toggleLikeComment = ( comment ) => {
210
210
if ( ! store . isLogin ) return store . authWarning ( )
211
211
log ( 'likeComment: ' , comment )
212
212
@@ -220,7 +220,7 @@ export const toggleLikeComment = comment => {
220
220
} )
221
221
}
222
222
223
- export const onUploadImageDone = url =>
223
+ export const onUploadImageDone = ( url ) =>
224
224
send ( EVENT . DRAFT_INSERT_SNIPPET , { data :`` } )
225
225
226
226
export const insertQuote = ( ) =>
@@ -233,8 +233,8 @@ export const insertCode = () => {
233
233
send ( EVENT . DRAFT_INSERT_SNIPPET , { data} )
234
234
}
235
235
236
- export const onMention = user => store . addReferUser ( user )
237
- export const onMentionSearch = name => {
236
+ export const onMention = ( user ) => store . addReferUser ( user )
237
+ export const onMentionSearch = ( name ) => {
238
238
if ( name && name . length >= 1 ) {
239
239
sr71$ . query ( S . searchUsers , { name} )
240
240
} else {
@@ -249,7 +249,7 @@ export const deleteComment = () =>
249
249
} )
250
250
251
251
// show delete confirm
252
- export const onDelete = comment => store . mark ( { tobeDeleteId :comment . id } )
252
+ export const onDelete = ( comment ) => store . mark ( { tobeDeleteId :comment . id } )
253
253
export const cancelDelete = ( ) => store . mark ( { tobeDeleteId :null } )
254
254
255
255
export const pageChange = ( page = 1 ) => {
@@ -265,7 +265,7 @@ export const onReplyEditorClose = () => {
265
265
onCommentInputBlur ( )
266
266
}
267
267
268
- const saveDraftIfNeed = content => {
268
+ const saveDraftIfNeed = ( content ) => {
269
269
if ( isEmpty ( content ) ) return false
270
270
const curDraftContent = BStore . get ( 'recentDraft' )
271
271