Filter out the deleted comments of the comment counter

This commit is contained in:
Hannes Heine 2020-08-03 15:09:33 +02:00
parent 9be480add2
commit fe999776c0

View File

@ -1,7 +1,7 @@
<template> <template>
<div id="comments" class="comment-list"> <div id="comments" class="comment-list">
<h3 class="title"> <h3 class="title">
<counter-icon icon="comments" :count="postComments.length" /> <counter-icon icon="comments" :count="postComments.filter(comment => !comment.deleted).length" />
{{ $t('common.comment', null, 0) }} {{ $t('common.comment', null, 0) }}
</h3> </h3>
<div v-if="postComments" id="comments" class="comments"> <div v-if="postComments" id="comments" class="comments">