Keep scrolledToBottom on reconnect
This commit is contained in:
parent
2303a02839
commit
0ba6200bb7
@ -29,6 +29,7 @@ socket.on("init", function(data) {
|
|||||||
const currentChannel = currentNetwork.channels.find((c) => c.id === channel.id);
|
const currentChannel = currentNetwork.channels.find((c) => c.id === channel.id);
|
||||||
|
|
||||||
if (currentChannel && currentChannel.messages) {
|
if (currentChannel && currentChannel.messages) {
|
||||||
|
channel.scrolledToBottom = currentChannel.scrolledToBottom;
|
||||||
channel.messages = currentChannel.messages.concat(channel.messages);
|
channel.messages = currentChannel.messages.concat(channel.messages);
|
||||||
|
|
||||||
if (currentChannel.moreHistoryAvailable) {
|
if (currentChannel.moreHistoryAvailable) {
|
||||||
|
Loading…
Reference in New Issue
Block a user