read comment working
This commit is contained in:
parent
583daa1759
commit
39fc379541
12 changed files with 125 additions and 78 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue