thumbnail() and download() were remaining. Use a direct and carefully chosen MatrixClient's methods instead to avoid problems mentioned in the previous commit 7502c1.
52 lines
1.4 KiB
QML
52 lines
1.4 KiB
QML
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
import QtQuick 2.12
|
|
import QtQuick.Layouts 1.12
|
|
import "../../../Base"
|
|
import "../../../Base/HTile"
|
|
|
|
HTile {
|
|
id: root
|
|
|
|
property bool colorName: hovered
|
|
|
|
backgroundColor: "transparent"
|
|
contentItem: ContentRow {
|
|
tile: root
|
|
|
|
HUserAvatar {
|
|
id: avatar
|
|
clientUserId: chat.userId
|
|
userId: model.id
|
|
displayName: model.display_name
|
|
mxc: model.avatar_url
|
|
compact: root.compact
|
|
radius: theme.chat.userAutoCompletion.avatarsRadius
|
|
|
|
implicitHeight:
|
|
compact ?
|
|
theme.controls.avatar.compactSize :
|
|
theme.controls.avatar.size / 1.5
|
|
}
|
|
|
|
TitleLabel {
|
|
textFormat: TitleLabel.StyledText
|
|
text:
|
|
(model.display_name || model.id) + (
|
|
model.display_name ?
|
|
" ".repeat(2) + utils.htmlColorize(
|
|
model.id, theme.chat.userAutoCompletion.userIds,
|
|
) :
|
|
""
|
|
)
|
|
|
|
color:
|
|
root.colorName ?
|
|
utils.nameColor(model.display_name || model.id.substring(1)) :
|
|
theme.chat.userAutoCompletion.displayNames
|
|
|
|
Behavior on color { HColorAnimation {} }
|
|
}
|
|
}
|
|
}
|