mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 20:43:08 +00:00
Merge pull request #2480 from thelounge/xpaw/fix-2478
Show connect window when last network is removed
This commit is contained in:
commit
24b9b93c3e
2 changed files with 9 additions and 4 deletions
|
@ -202,7 +202,7 @@ function renderNetworks(data, singleNetwork) {
|
|||
sidebar.find(".networks").append(
|
||||
templates.network({
|
||||
networks: data.networks,
|
||||
})
|
||||
}).trim()
|
||||
);
|
||||
|
||||
collapsed.forEach((key) => {
|
||||
|
|
|
@ -16,11 +16,16 @@ socket.on("quit", function(data) {
|
|||
|
||||
network.remove();
|
||||
|
||||
const chan = sidebar.find(".chan")
|
||||
.eq(0)
|
||||
.trigger("click");
|
||||
const chan = sidebar.find(".chan");
|
||||
|
||||
if (chan.length === 0) {
|
||||
sidebar.find(".empty").show();
|
||||
|
||||
// Open the connect window
|
||||
$("#footer .connect").trigger("click", {
|
||||
pushState: false,
|
||||
});
|
||||
} else {
|
||||
chan.eq(0).trigger("click");
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue