Fix wrong avatar for unamed rooms
This commit is contained in:
parent
4c0b947d1a
commit
f5d747cbc4
1
TODO.md
1
TODO.md
|
@ -20,7 +20,6 @@
|
||||||
- Room Sidepane
|
- Room Sidepane
|
||||||
|
|
||||||
- Bug fixes
|
- Bug fixes
|
||||||
- Wrong avatar for group rooms
|
|
||||||
- Past events loading (limit 100) freezes the GUI - need to move upsert func
|
- Past events loading (limit 100) freezes the GUI - need to move upsert func
|
||||||
to a WorkerScript
|
to a WorkerScript
|
||||||
- `MessageDelegate.qml:63: TypeError: 'reloadPreviousItem' not a function`
|
- `MessageDelegate.qml:63: TypeError: 'reloadPreviousItem' not a function`
|
||||||
|
|
|
@ -4,10 +4,13 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
|
|
||||||
HAvatar {
|
HAvatar {
|
||||||
|
property string userId: ""
|
||||||
property string roomId: ""
|
property string roomId: ""
|
||||||
|
|
||||||
|
readonly property var roomInfo:
|
||||||
|
rooms.getWhere({"userId": userId, "roomId": roomId}, 1)[0]
|
||||||
|
|
||||||
// roomInfo ? → Avoid error messages when a room is forgotten
|
// roomInfo ? → Avoid error messages when a room is forgotten
|
||||||
readonly property var roomInfo: rooms.getWhere({"roomId": roomId}, 1)[0]
|
|
||||||
readonly property var dname: roomInfo ? roomInfo.displayName : ""
|
readonly property var dname: roomInfo ? roomInfo.displayName : ""
|
||||||
|
|
||||||
name:
|
name:
|
||||||
|
|
|
@ -29,6 +29,7 @@ HRectangle {
|
||||||
|
|
||||||
HRoomAvatar {
|
HRoomAvatar {
|
||||||
id: avatar
|
id: avatar
|
||||||
|
userId: chatPage.userId
|
||||||
roomId: chatPage.roomId
|
roomId: chatPage.roomId
|
||||||
Layout.alignment: Qt.AlignTop
|
Layout.alignment: Qt.AlignTop
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,6 @@ function onRoomUpdated(
|
||||||
} else {
|
} else {
|
||||||
rooms.set(replace, item)
|
rooms.set(replace, item)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ HInteractiveRectangle {
|
||||||
|
|
||||||
HRoomAvatar {
|
HRoomAvatar {
|
||||||
id: roomAvatar
|
id: roomAvatar
|
||||||
|
userId: model.userId
|
||||||
roomId: model.roomId
|
roomId: model.roomId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user