1 files changed, 6 insertions, 3 deletions
diff --git a/src/RoomInfoListItem.cpp b/src/RoomInfoListItem.cpp
index e2204ceb..5b41794b 100644
--- a/src/RoomInfoListItem.cpp
+++ b/src/RoomInfoListItem.cpp
@@ -22,6 +22,7 @@
#include <QtGlobal>
#include <QSettings>
+#include "AvatarProvider.h"
#include "Cache.h"
#include "Config.h"
#include "RoomInfoListItem.h"
@@ -442,10 +443,12 @@ RoomInfoListItem::mousePressEvent(QMouseEvent *event)
}
void
-RoomInfoListItem::setAvatar(const QImage &img)
+RoomInfoListItem::setAvatar(const QString &avatar_url)
{
- roomAvatar_ = utils::scaleImageToPixmap(img, IconSize);
- update();
+ AvatarProvider::resolve(avatar_url, IconSize, this, [this](const QPixmap &img) {
+ roomAvatar_ = img;
+ update();
+ });
}
void
|