From 41d286986bb055780da7c397eed8eaa442431f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 31 Jan 2020 13:22:43 +0100 Subject: [PATCH] Update read marker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/card/CardSidebarTabComments.vue | 3 +++ src/components/cards/CardBadges.vue | 5 ++++- src/helpers/xml.js | 1 + src/services/CommentApi.js | 17 +++++++++++++++++ src/store/comment.js | 11 ++++++++++- 5 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/components/card/CardSidebarTabComments.vue b/src/components/card/CardSidebarTabComments.vue index a4c403625..4235e2c61 100644 --- a/src/components/card/CardSidebarTabComments.vue +++ b/src/components/card/CardSidebarTabComments.vue @@ -88,6 +88,9 @@ export default { this.isLoading = true await this.$store.dispatch('fetchComments', { cardId: this.card.id }) this.isLoading = false + if (this.card.commentsUnread > 0) { + await this.$store.dispatch('markCommentsAsRead', this.card.id) + } }, async createComment(content) { const commentObj = { diff --git a/src/components/cards/CardBadges.vue b/src/components/cards/CardBadges.vue index a816ce81f..4f5abe70c 100644 --- a/src/components/cards/CardBadges.vue +++ b/src/components/cards/CardBadges.vue @@ -22,7 +22,10 @@