Merge pull request #2530 from thelounge/xpaw/fix-2529

Fix adding a new network expanding collapsed networks incorrectly
This commit is contained in:
Jérémie Astori 2018-06-09 01:39:26 -04:00 committed by GitHub
commit 213586be95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -205,15 +205,15 @@ function renderNetworks(data, singleNetwork) {
}).trim() }).trim()
); );
collapsed.forEach((key) => {
collapseNetwork($(`.network[data-uuid="${key}"] button.collapse-network`));
});
// Add keyboard handlers to the "Join a channel…" form inputs/button // Add keyboard handlers to the "Join a channel…" form inputs/button
JoinChannel.handleKeybinds(data.networks); JoinChannel.handleKeybinds(data.networks);
let newChannels; let newChannels;
const channels = $.map(data.networks, function(n) { const channels = $.map(data.networks, function(n) {
if (collapsed.has(n.uuid)) {
collapseNetwork($(`.network[data-uuid="${n.uuid}"] button.collapse-network`));
}
return n.channels; return n.channels;
}); });