Skip to content

Commit

Permalink
修复查看回复不显示昵称的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
adlered committed Nov 11, 2024
1 parent 298a238 commit 4bcee31
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ public JSONObject getOriginalComment(final String currentUserId, final int comme
}

ret.put(Comment.COMMENT_T_AUTHOR_NAME, comment.optString(Comment.COMMENT_T_AUTHOR_NAME));
ret.put("commentAuthorNickName", comment.optString("commentAuthorNickName"));
ret.put(Comment.COMMENT_T_AUTHOR_THUMBNAIL_URL, comment.optString(Comment.COMMENT_T_AUTHOR_THUMBNAIL_URL));
ret.put(Common.TIME_AGO, comment.optString(Common.TIME_AGO));
ret.put(Comment.COMMENT_CREATE_TIME_STR, comment.optString(Comment.COMMENT_CREATE_TIME_STR));
Expand Down Expand Up @@ -309,6 +310,7 @@ public List<JSONObject> getReplies(final String currentUserId, final int comment
}

reply.put(Comment.COMMENT_T_AUTHOR_NAME, comment.optString(Comment.COMMENT_T_AUTHOR_NAME));
reply.put("commentAuthorNickName", comment.optString("commentAuthorNickName"));
reply.put(Comment.COMMENT_T_AUTHOR_THUMBNAIL_URL, comment.optString(Comment.COMMENT_T_AUTHOR_THUMBNAIL_URL));
reply.put(Common.TIME_AGO, comment.optString(Common.TIME_AGO));
reply.put(Comment.COMMENT_CREATE_TIME_STR, comment.optString(Comment.COMMENT_CREATE_TIME_STR));
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/js/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ var Comment = {

template += '<div class="fn-flex-1"><div class="comment-info ft-smaller">'
template += '<a class="ft-gray" rel="nofollow" href="/member/' + data.commentAuthorName + '">'
template += data.commentAuthorName
template += data.commentAuthorNickName + ' (' + data.commentAuthorName + ')'
template += '</a>'

template += '<span class="ft-fade"> • ' + data.timeAgo
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/js/article.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/js/m-article.js
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ var Comment = {
+ '<div class="comment-info ft-smaller">'
template += '<a class="ft-gray" rel="nofollow" href="/member/' +
data.commentAuthorName + '">'
template += data.commentAuthorName
template += data.commentAuthorNickName + ' (' + data.commentAuthorName + ')'
template += '</a>'

template += '<span class="ft-fade"> • ' + data.timeAgo
Expand Down
Loading

0 comments on commit 4bcee31

Please sign in to comment.