read comment working

This commit is contained in:
isUnknown 2024-11-18 09:36:15 +01:00
parent 583daa1759
commit 39fc379541
12 changed files with 125 additions and 78 deletions

View file

@ -12,10 +12,7 @@
:comment="comment"
:commentIndex="comments.length - commentIndex"
:key="comment.id"
@click="
readNotification(comment);
openComment(comment);
"
@click="openComment(comment)"
@update:file="changeFile"
@close:comment="closeComment"
/>
@ -248,16 +245,6 @@ function handleCommentPositionClick(event) {
toggleCommentPositionMode(false);
}
function readNotification(comment) {
const correspondingNotification = user.notifications.find(
(notification) => notification.id === comment.id
);
if (correspondingNotification) {
correspondingNotification.isRead = true;
}
}
function openComment(comment) {
if (comment.replies.length) {
openedComment.value = comment;