summary refs log tree commit diff
path: root/src/dialogs/UserProfile.cpp
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2019-08-30 23:15:09 +0000
committerGitHub <noreply@github.com>2019-08-30 23:15:09 +0000
commit5be967fb1df73fa495f9336f60fd409a011ff4ec (patch)
treeb42e8bd533279f428de3791ae5bab953137e7add /src/dialogs/UserProfile.cpp
parentFix themeing issues on mentions (diff)
parentFix usage of deprecated find (diff)
downloadnheko-5be967fb1df73fa495f9336f60fd409a011ff4ec.tar.xz
Merge pull request #86 from Nheko-Reborn/avatar-memory-usage
Try to reduce memory usage by reusing avatar pixmaps
Diffstat (limited to 'src/dialogs/UserProfile.cpp')
-rw-r--r--src/dialogs/UserProfile.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dialogs/UserProfile.cpp b/src/dialogs/UserProfile.cpp

index 6aea96a8..5ad3afa2 100644 --- a/src/dialogs/UserProfile.cpp +++ b/src/dialogs/UserProfile.cpp
@@ -114,9 +114,8 @@ UserProfile::UserProfile(QWidget *parent) btnLayout->setSpacing(8); btnLayout->setMargin(0); - avatar_ = new Avatar(this); + avatar_ = new Avatar(this, 128); avatar_->setLetter("X"); - avatar_->setSize(128); QFont font; font.setPointSizeF(font.pointSizeF() * 2); @@ -210,8 +209,7 @@ UserProfile::init(const QString &userId, const QString &roomId) displayNameLabel_->setText(displayName); avatar_->setLetter(utils::firstChar(displayName)); - AvatarProvider::resolve( - roomId, userId, this, [this](const QImage &img) { avatar_->setImage(img); }); + avatar_->setImage(roomId, userId); auto localUser = utils::localUser();