Rename Chat "sender" prop to "senderInfo"

This commit is contained in:
miruka 2019-07-06 23:46:06 -04:00
parent 03d9079d63
commit 1ec660807e
2 changed files with 3 additions and 4 deletions

View File

@ -10,13 +10,12 @@ HColumnLayout {
property string category: "" property string category: ""
property string roomId: "" property string roomId: ""
readonly property var senderInfo: users.getUser(userId)
readonly property var roomInfo: rooms.getWhere( readonly property var roomInfo: rooms.getWhere(
{"userId": userId, "roomId": roomId, "category": category}, 1 {"userId": userId, "roomId": roomId, "category": category}, 1
)[0] )[0]
readonly property var sender: //TODO: info$
users.getUser(userId)
readonly property bool hasUnknownDevices: false readonly property bool hasUnknownDevices: false
//category == "Rooms" ? //category == "Rooms" ?
//Backend.clients.get(userId).roomHasUnknownDevices(roomId) : false //Backend.clients.get(userId).roomHasUnknownDevices(roomId) : false

View File

@ -19,7 +19,7 @@ HRectangle {
HAvatar { HAvatar {
id: avatar id: avatar
name: chatPage.sender.displayName || name: chatPage.senderInfo.displayName ||
Utils.stripUserId(chatPage.userId) Utils.stripUserId(chatPage.userId)
dimension: sendBox.Layout.minimumHeight dimension: sendBox.Layout.minimumHeight
} }