From e7e80f8791160b612b0e07e96e4341140431f96b Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Sat, 8 Jun 2024 01:25:06 -0400 Subject: [PATCH] Bug fix, resolve issue with Leave Room button not removing the room from the sidebar --- app.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app.js b/app.js index 6b39416..d6feafc 100644 --- a/app.js +++ b/app.js @@ -200,6 +200,11 @@ function switchRoom(topic) { function leaveRoom() { if (currentRoom) { + const topic = b4a.toString(currentRoom.topic, 'hex'); + const roomItem = document.querySelector(`li[data-topic="${topic}"]`); + if (roomItem) { + roomItem.remove(); + } currentRoom.destroy(); currentRoom = null; }