From b30d92a5169110f513a10897a2ffafc76f3558e5 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Tue, 16 Oct 2018 18:43:07 +0800 Subject: [PATCH] Set currentRoom when clicked. It should resolve #86. --- imports/Spectral/Page/Room.qml | 1 - imports/Spectral/Panel/RoomListDelegate.qml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/imports/Spectral/Page/Room.qml b/imports/Spectral/Page/Room.qml index ffdd3a7..bd55905 100644 --- a/imports/Spectral/Page/Room.qml +++ b/imports/Spectral/Page/Room.qml @@ -2,5 +2,4 @@ import QtQuick 2.9 RoomForm { roomListModel.onNewMessage: if (!window.active) spectralController.showMessage(roomName, content, icon) - roomListModel.onRoomAdded: if (room) room.getPreviousContent(5) } diff --git a/imports/Spectral/Panel/RoomListDelegate.qml b/imports/Spectral/Panel/RoomListDelegate.qml index 00177cf..ecabadb 100644 --- a/imports/Spectral/Panel/RoomListDelegate.qml +++ b/imports/Spectral/Panel/RoomListDelegate.qml @@ -25,6 +25,7 @@ Rectangle { inviteDialog.currentRoom = currentRoom inviteDialog.open() } else { + listView.currentIndex = index enteredRoom = currentRoom } }