mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 20:43:08 +00:00
Merge pull request #2039 from thelounge/xpaw/fix-1721
Fix duplicate chat containers and unread markers when reconnecting
This commit is contained in:
commit
572c93d06b
1 changed files with 13 additions and 11 deletions
|
@ -228,19 +228,21 @@ function renderNetworks(data, singleNetwork) {
|
|||
newChannels = channels;
|
||||
}
|
||||
|
||||
chat.append(
|
||||
templates.chat({
|
||||
channels: channels,
|
||||
})
|
||||
);
|
||||
if (newChannels.length > 0) {
|
||||
chat.append(
|
||||
templates.chat({
|
||||
channels: newChannels,
|
||||
})
|
||||
);
|
||||
|
||||
newChannels.forEach((channel) => {
|
||||
renderChannel(channel);
|
||||
newChannels.forEach((channel) => {
|
||||
renderChannel(channel);
|
||||
|
||||
if (channel.type === "channel") {
|
||||
chat.find("#chan-" + channel.id).data("needsNamesRefresh", true);
|
||||
}
|
||||
});
|
||||
if (channel.type === "channel") {
|
||||
chat.find("#chan-" + channel.id).data("needsNamesRefresh", true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
utils.confirmExit();
|
||||
sorting();
|
||||
|
|
Loading…
Reference in a new issue