Update lobby name correctly when editing network

This commit is contained in:
Pavel Djundik 2018-07-16 15:57:44 +03:00 committed by Pavel Djundik
parent c42fc55c6f
commit 86ddce974d

View File

@ -49,9 +49,10 @@ socket.on("network:info", function(data) {
const uuid = $(this).find("input[name=uuid]").val(); const uuid = $(this).find("input[name=uuid]").val();
const newName = $(this).find("#connect\\:name").val(); const newName = $(this).find("#connect\\:name").val();
const network = vueApp.networks.find((n) => n.uuid === uuid);
network.name = network.channels[0].name = newName;
sidebar.find(`.network[data-uuid="${uuid}"] .chan.lobby .name`) sidebar.find(`.network[data-uuid="${uuid}"] .chan.lobby .name`)
.attr("title", newName)
.text(newName)
.click(); .click();
}); });