2019-07-08 13:52:41 +10:00
|
|
|
// Copyright 2019 miruka
|
|
|
|
// This file is part of harmonyqml, licensed under LGPLv3.
|
|
|
|
|
2019-07-13 19:39:01 +10:00
|
|
|
import QtQuick 2.12
|
2019-07-07 14:24:23 +10:00
|
|
|
|
|
|
|
HAvatar {
|
2019-07-18 16:36:08 +10:00
|
|
|
property string userId: ""
|
2019-07-07 14:24:23 +10:00
|
|
|
property string roomId: ""
|
|
|
|
|
2019-07-18 18:17:35 +10:00
|
|
|
readonly property var roomInfo: rooms.getWhere({userId, roomId}, 1)[0]
|
2019-07-18 16:36:08 +10:00
|
|
|
|
2019-07-08 12:19:17 +10:00
|
|
|
// roomInfo ? → Avoid error messages when a room is forgotten
|
|
|
|
readonly property var dname: roomInfo ? roomInfo.displayName : ""
|
|
|
|
|
2019-07-10 11:54:53 +10:00
|
|
|
name:
|
|
|
|
dname[0] == "#" && dname.length > 1 ? dname.substring(1) : dname
|
|
|
|
|
|
|
|
imageUrl:
|
2019-07-14 10:15:20 +10:00
|
|
|
roomInfo.avatarUrl ? ("image://python/" + roomInfo.avatarUrl) : null
|
2019-07-10 12:48:59 +10:00
|
|
|
|
|
|
|
toolTipImageUrl:
|
2019-07-14 10:15:20 +10:00
|
|
|
roomInfo.avatarUrl ? ("image://python/" + roomInfo.avatarUrl) : null
|
2019-07-07 14:24:23 +10:00
|
|
|
}
|