When room changes category, affect the Chat too

This commit is contained in:
miruka
2019-07-07 02:35:22 -04:00
parent be152c3acf
commit a47e6b5c07
5 changed files with 33 additions and 29 deletions

View File

@@ -6,16 +6,14 @@ import "Timeline"
import "RoomSidePane"
HColumnLayout {
property string userId: ""
property string category: ""
property string roomId: ""
property var roomInfo: null
readonly property string userId: roomInfo.userId
readonly property string category: roomInfo.category
readonly property string roomId: roomInfo.roomId
readonly property var senderInfo: users.getUser(userId)
readonly property var roomInfo: rooms.getWhere(
{"userId": userId, "roomId": roomId, "category": category}, 1
)[0]
readonly property bool hasUnknownDevices: false
//category == "Rooms" ?
//Backend.clients.get(userId).roomHasUnknownDevices(roomId) : false
@@ -23,14 +21,6 @@ HColumnLayout {
id: chatPage
onFocusChanged: sendBox.setFocus()
//Component.onCompleted: Backend.signals.roomCategoryChanged.connect(
//function(forUserId, forRoomId, previous, now) {
//if (chatPage && forUserId == userId && forRoomId == roomId) {
//chatPage.category = now
//}
//}
//)
RoomHeader {
id: roomHeader
displayName: roomInfo.displayName

View File

@@ -34,7 +34,7 @@ HRectangle {
// Keep x scroll pages cached, to limit images having to be
// reloaded from network.
cacheBuffer: height * 6
cacheBuffer: height * 4
// Declaring this as "alias" provides the on... signal
property real yPos: visibleArea.yPosition