attempt to use a cache for user-defined avatars. Should reduce memory footprint. to be tested

This commit is contained in:
csoler 2019-06-03 23:52:29 +02:00
parent 807bbedd5a
commit e66fb923fb
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
25 changed files with 163 additions and 113 deletions

View file

@ -22,6 +22,7 @@
#include <QFileInfo>
#include <QStyle>
#include "gui/gxs/GxsIdDetails.h"
#include "rshare.h"
#include "GxsChannelPostItem.h"
#include "ui_GxsChannelPostItem.h"
@ -392,7 +393,7 @@ void GxsChannelPostItem::fill()
if(mPost.mThumbnail.mData != NULL)
{
QPixmap thumbnail;
thumbnail.loadFromData(mPost.mThumbnail.mData, mPost.mThumbnail.mSize, "PNG");
GxsIdDetails::loadPixmapFromData(mPost.mThumbnail.mData, mPost.mThumbnail.mSize, thumbnail);
// Wiping data - as its been passed to thumbnail.
ui->logoLabel->setPixmap(thumbnail);
}