Fix adding a new expanding collapsed networks incorrectly

Fixes #2529
This commit is contained in:
Pavel Djundik 2018-06-08 12:11:00 +03:00
parent 56de773614
commit e5954ec0d8

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;
}); });