From bd4e8216141832929edf41483e06792d9ce73d1a Mon Sep 17 00:00:00 2001 From: Nachtalb Date: Sat, 1 May 2021 01:36:44 +0200 Subject: [PATCH] Improve readability of more.js --- client/js/socket-events/more.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/js/socket-events/more.js b/client/js/socket-events/more.js index 5acaa3cb..78970430 100644 --- a/client/js/socket-events/more.js +++ b/client/js/socket-events/more.js @@ -6,17 +6,17 @@ import socket from "../socket"; import store from "../store"; socket.on("more", function (data) { - const channel = store.getters.findChannel(data.chan); + const channel = store.getters.findChannel(data.chan).channel; if (!channel) { return; } - channel.channel.moreHistoryAvailable = - data.totalMessages > channel.channel.messages.length + data.messages.length; - channel.channel.messages.unshift(...data.messages); + channel.moreHistoryAvailable = + data.totalMessages > channel.messages.length + data.messages.length; + channel.messages.unshift(...data.messages); Vue.nextTick(() => { - channel.channel.historyLoading = false; + channel.historyLoading = false; }); });