Support room avatars

This commit is contained in:
miruka 2019-07-09 21:54:53 -04:00
parent 2ced310ce1
commit 9af9e88b0d

View File

@ -10,6 +10,11 @@ HAvatar {
readonly property var roomInfo: rooms.getWhere({"roomId": roomId}, 1)[0] 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: dname[0] == "#" && dname.length > 1 ? dname.substring(1) : dname name:
imageUrl: roomInfo ? roomInfo.avatarUrl : null dname[0] == "#" && dname.length > 1 ? dname.substring(1) : dname
imageUrl:
roomInfo.avatarUrl ?
("image://python/crop/" + roomInfo.avatarUrl) :
null
} }