Don't bother trying to count unreads

This commit is contained in:
Pavel Djundik 2018-07-18 22:38:39 +03:00 committed by Pavel Djundik
parent a10ac4e7da
commit 5452d26c17

View file

@ -63,8 +63,8 @@
@click="jumpToBottom()">
<div class="scroll-down-arrow"/>
<div
v-if="unreadMessages > 0"
class="scroll-down-number">{{ unreadMessages }}</div>
v-if="channel.unread > 0"
class="scroll-down-number">{{ channel.unread }}</div>
</div>
</transition>
</div>
@ -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"() {