Keep scrolledToBottom on reconnect

This commit is contained in:
Pavel Djundik 2018-07-16 19:51:57 +03:00 committed by Pavel Djundik
parent 2303a02839
commit 0ba6200bb7

View File

@ -29,6 +29,7 @@ socket.on("init", function(data) {
const currentChannel = currentNetwork.channels.find((c) => c.id === channel.id);
if (currentChannel && currentChannel.messages) {
channel.scrolledToBottom = currentChannel.scrolledToBottom;
channel.messages = currentChannel.messages.concat(channel.messages);
if (currentChannel.moreHistoryAvailable) {