Skip to content
Snippets Groups Projects
Commit 0adc815a authored by Sébastien Blin's avatar Sébastien Blin Committed by Kateryna Kostiuk
Browse files

profiles: do not cache avatars in LRC

This reduces memory usage.

Change-Id: Iddb54a844ffacfc96b7758b2a9317e68e04750c4
parent af0ae356
No related branches found
No related tags found
No related merge requests found
......@@ -315,6 +315,7 @@ MainApplication::loadTranslations()
void
MainApplication::initLrc(const QString& downloadUrl, ConnectivityMonitor* cm, bool logDaemon)
{
lrc::api::Lrc::cacheAvatars.store(false);
/*
* Init mainwindow and finish splash when mainwindow shows up.
*/
......
......@@ -357,7 +357,7 @@ Utils::contactPhoto(LRCInstance* instance,
auto& accInfo = instance->accountModel().getAccountInfo(
accountId.isEmpty() ? instance->get_currentAccountId() : accountId);
auto contactInfo = accInfo.contactModel->getContact(contactUri);
auto contactPhoto = contactInfo.profileInfo.avatar;
auto contactPhoto = accInfo.contactModel->avatar(contactUri);
auto bestName = accInfo.contactModel->bestNameForContact(contactUri);
if (accInfo.profileInfo.type == profile::Type::SIP
&& contactInfo.profileInfo.type == profile::Type::TEMPORARY) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment