From 5452d26c17ad9525c07b45fe8c727d325fe9b42f Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Wed, 18 Jul 2018 22:38:39 +0300 Subject: [PATCH] Don't bother trying to count unreads --- client/components/MessageList.vue | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/client/components/MessageList.vue b/client/components/MessageList.vue index da23b1b0..bc59dfcf 100644 --- a/client/components/MessageList.vue +++ b/client/components/MessageList.vue @@ -63,8 +63,8 @@ @click="jumpToBottom()">
{{ unreadMessages }}
+ v-if="channel.unread > 0" + class="scroll-down-number">{{ channel.unread }}
@@ -137,19 +137,6 @@ export default { return condensed; }, - unreadMessages() { - let unread = 0; - - for (let id = this.condensedMessages.length - 1; id > 0; id--) { - if (this.channel.firstUnread >= this.condensedMessages[id].id) { - break; - } - - unread++; - } - - return unread; - }, }, watch: { "channel.id"() {