Bug fix, resolve issue with Leave Room button not removing the room from the sidebar
This commit is contained in:
parent
24ffe2a977
commit
e7e80f8791
5
app.js
5
app.js
@ -200,6 +200,11 @@ function switchRoom(topic) {
|
|||||||
|
|
||||||
function leaveRoom() {
|
function leaveRoom() {
|
||||||
if (currentRoom) {
|
if (currentRoom) {
|
||||||
|
const topic = b4a.toString(currentRoom.topic, 'hex');
|
||||||
|
const roomItem = document.querySelector(`li[data-topic="${topic}"]`);
|
||||||
|
if (roomItem) {
|
||||||
|
roomItem.remove();
|
||||||
|
}
|
||||||
currentRoom.destroy();
|
currentRoom.destroy();
|
||||||
currentRoom = null;
|
currentRoom = null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user