From cc6693af8aa97c113b1abbc05fe5a18b09759bac Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Mon, 9 Aug 2021 19:24:46 -0400 Subject: [PATCH] Close currently open room when it is tapped again --- resources/qml/RoomList.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml index 98532606..cee4b30e 100644 --- a/resources/qml/RoomList.qml +++ b/resources/qml/RoomList.qml @@ -190,7 +190,12 @@ Page { TapHandler { margin: -Nheko.paddingSmall - onSingleTapped: Rooms.setCurrentRoom(roomId) + onSingleTapped: { + if (!Rooms.currentRoom || Rooms.currentRoom.roomId !== roomId) + Rooms.setCurrentRoom(roomId); + else + Rooms.resetCurrentRoom(); + } onLongPressed: { if (!isInvite) roomContextMenu.show(roomId, tags);