comment counter now refreshed for each deletion or addition of comment
This commit is contained in:
@@ -1105,6 +1105,14 @@ function loadComments(contributionId) {
|
||||
});
|
||||
|
||||
listContainer.innerHTML = html;
|
||||
|
||||
const count = response.comments.length;
|
||||
const header = document.querySelector('#comments-toggle-' + contributionId)?.closest('.popup-comments-header');
|
||||
if (header) {
|
||||
header.innerHTML = '<i class="fa-solid fa-comments"></i> Kommentare (' + count + ')' +
|
||||
' <i class="fa-solid fa-chevron-down popup-comments-toggle" id="comments-toggle-' + contributionId + '"></i>';
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user