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()"> @click="jumpToBottom()">
<div class="scroll-down-arrow"/> <div class="scroll-down-arrow"/>
<div <div
v-if="unreadMessages > 0" v-if="channel.unread > 0"
class="scroll-down-number">{{ unreadMessages }}</div> class="scroll-down-number">{{ channel.unread }}</div>
</div> </div>
</transition> </transition>
</div> </div>
@ -137,19 +137,6 @@ export default {
return condensed; 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: { watch: {
"channel.id"() { "channel.id"() {