Skip to content

Commit

Permalink
Fix latest comment update issue on comment adding.
Browse files Browse the repository at this point in the history
  • Loading branch information
kabalin committed Dec 1, 2023
1 parent db0b1ac commit 10047ba
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions public/js/module/comment/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -1248,14 +1248,12 @@ define([
comment.can.edit = true;
comment.can.del = true;

self.commentsHash[comment.cid] = comment;

// New comment is the latest, remove previous latest comment highlight.
comment.latest = true;
$('.badge-latest', self.$cmts).prev('.dotDelimeter').remove();
$('.badge-latest', self.$cmts).remove();
$('.latest', self.$cmts).removeClass('latest');
self.latestCommentStamp(comment.stamp);

self.commentsHash[comment.cid] = comment;
self.latestCommentCid(comment.cid);

const $c = $(tplCommentAuth(comment, {
reply: self.canReply(),
Expand Down

0 comments on commit 10047ba

Please sign in to comment.