2019-07-07 14:24:23 +10:00
|
|
|
import QtQuick 2.7
|
|
|
|
|
|
|
|
HAvatar {
|
|
|
|
property string roomId: ""
|
|
|
|
|
2019-07-08 12:19:17 +10:00
|
|
|
// roomInfo ? → Avoid error messages when a room is forgotten
|
2019-07-07 14:24:23 +10:00
|
|
|
readonly property var roomInfo: rooms.getWhere({"roomId": roomId}, 1)[0]
|
2019-07-08 12:19:17 +10:00
|
|
|
readonly property var dname: roomInfo ? roomInfo.displayName : ""
|
|
|
|
|
2019-07-07 14:24:23 +10:00
|
|
|
name: dname[0] == "#" && dname.length > 1 ? dname.substring(1) : dname
|
2019-07-08 12:19:17 +10:00
|
|
|
imageUrl: roomInfo ? roomInfo.avatarUrl : null
|
2019-07-07 14:24:23 +10:00
|
|
|
}
|