mark as unread if comment is in notifications working
This commit is contained in:
parent
b99f7c81dd
commit
65a2bbaa8d
4 changed files with 36 additions and 3 deletions
|
|
@ -7,7 +7,7 @@
|
|||
v-for="(comment, commentIndex) in Object.values(page)"
|
||||
:key="pageIndex + commentIndex"
|
||||
class="comment | flow"
|
||||
data-status="unread"
|
||||
:data-status="setStatus(comment)"
|
||||
>
|
||||
<header>
|
||||
<p>
|
||||
|
|
@ -131,4 +131,12 @@ function closeAddField() {
|
|||
isAddOpen.value = false;
|
||||
newCommentText.value = "";
|
||||
}
|
||||
|
||||
function setStatus(comment) {
|
||||
if (user?.notifications?.comments.hasOwnProperty(comment.id)) {
|
||||
return "unread";
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue