From 86ddce974d638e807f774f8423b0df8696b9ef65 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Mon, 16 Jul 2018 15:57:44 +0300 Subject: [PATCH] Update lobby name correctly when editing network --- client/js/socket-events/network.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/js/socket-events/network.js b/client/js/socket-events/network.js index 26d39f1d..e5c1d80c 100644 --- a/client/js/socket-events/network.js +++ b/client/js/socket-events/network.js @@ -49,9 +49,10 @@ socket.on("network:info", function(data) { const uuid = $(this).find("input[name=uuid]").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`) - .attr("title", newName) - .text(newName) .click(); });