Skip to content
Snippets Groups Projects
Unverified Commit 21b2db67 authored by Joe Donofry's avatar Joe Donofry Committed by GitHub
Browse files

Merge pull request #678 from LorenDB/closeRoom

Close currently open room when it is tapped again
parents 58039f7f 9a0c1c27
No related branches found
No related tags found
No related merge requests found
Pipeline #1581 passed
......@@ -33,8 +33,8 @@ Page {
Connections {
function onCurrentRoomChanged() {
roomlist.positionViewAtIndex(Rooms.roomidToIndex(Rooms.currentRoom.roomId), ListView.Contain);
console.log("Test" + Rooms.currentRoom.roomId + " " + Rooms.roomidToIndex(Rooms.currentRoom.roomId));
if (Rooms.currentRoom)
roomlist.positionViewAtIndex(Rooms.roomidToIndex(Rooms.currentRoom.roomId), ListView.Contain);
}
target: Rooms
......@@ -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);
......
......@@ -85,9 +85,13 @@ Item {
target: timelineView
}
MessageView {
Loader {
active: room || roomPreview
Layout.fillWidth: true
implicitHeight: msgView.height - typingIndicator.height
sourceComponent: MessageView {
implicitHeight: msgView.height - typingIndicator.height
}
}
Loader {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment