Fix avatar URLs for rooms
Room avatar URLs don't specify the new mxc:// format the user avatars use, so we need to carve out a workaround for them.
This commit is contained in:
@@ -87,7 +87,7 @@ QVariant CompletionModel::data(const QModelIndex &index, int role) const
|
||||
return m_filterModel->data(filterIndex, RoomListModel::CanonicalAliasRole);
|
||||
}
|
||||
if (role == IconNameRole) {
|
||||
return m_filterModel->data(filterIndex, RoomListModel::AvatarRole);
|
||||
return QStringLiteral("image://mxc//%1").arg(m_filterModel->data(filterIndex, RoomListModel::AvatarRole).toString());
|
||||
}
|
||||
}
|
||||
if (m_autoCompletionType == Emoji) {
|
||||
|
||||
@@ -71,7 +71,7 @@ QQC2.Popup {
|
||||
visible: completionDelegate.iconName !== "invalid"
|
||||
Layout.preferredWidth: Kirigami.Units.iconSizes.medium
|
||||
Layout.preferredHeight: Kirigami.Units.iconSizes.medium
|
||||
source: completionDelegate.iconName === "invalid" ? "" : ("image://" + completionDelegate.iconName)
|
||||
source: completionDelegate.iconName === "invalid" ? "" : completionDelegate.iconName
|
||||
name: completionDelegate.text
|
||||
}
|
||||
Delegates.SubtitleContentItem {
|
||||
|
||||
Reference in New Issue
Block a user