summary refs log tree commit diff
path: root/src/RoomInfoListItem.cpp
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2019-09-03 21:16:16 -0400
committerJoseph Donofry <joedonofry@gmail.com>2019-09-03 21:16:16 -0400
commit8e04197d5650faee90a69fdc94f8c9a10c700b7f (patch)
tree7e47c9d27a15a015d4f2cf33984d20f93efd8b5f /src/RoomInfoListItem.cpp
parentMinor tweak to one instance of QSettings not necessarily using the same setti... (diff)
parentMerge pull request #86 from Nheko-Reborn/avatar-memory-usage (diff)
downloadnheko-8e04197d5650faee90a69fdc94f8c9a10c700b7f.tar.xz
Merge branch '0.7.0-dev' of ssh://github.com/Nheko-Reborn/nheko into 0.7.0-dev
Diffstat (limited to 'src/RoomInfoListItem.cpp')
-rw-r--r--src/RoomInfoListItem.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/RoomInfoListItem.cpp b/src/RoomInfoListItem.cpp

index 9bcce134..dbcd6806 100644 --- a/src/RoomInfoListItem.cpp +++ b/src/RoomInfoListItem.cpp
@@ -21,6 +21,7 @@ #include <QPainter> #include <QtGlobal> +#include "AvatarProvider.h" #include "Cache.h" #include "Config.h" #include "RoomInfoListItem.h" @@ -434,10 +435,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