Close currently open room when it is tapped again

This commit is contained in:
Loren Burkholder 2021-08-09 19:24:46 -04:00
parent 9f742fe23d
commit cc6693af8a

View file

@ -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);