Skip to content
Snippets Groups Projects
Commit 2b49d271 authored by Ming Rui Zhang's avatar Ming Rui Zhang
Browse files

avatar: generic placeholder should be used if only account uri is available

Gitlab: #203
Change-Id: Ia98d4f67cbb3c12d96384f2f3a8e851eeb83750a
parent 0de0f6ec
Branches
Tags
No related merge requests found
......@@ -19,6 +19,7 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Window 2.14
import net.jami.Adapters 1.0
import net.jami.Constants 1.0
Item {
......
......@@ -735,7 +735,9 @@ Utils::accountPhoto(const lrc::api::account::Info& accountInfo, const QSize& siz
} else {
auto bestId = LRCInstance::accountModel().bestIdForAccount(accountInfo.id);
auto bestName = LRCInstance::accountModel().bestNameForAccount(accountInfo.id);
QString letterStr = bestId == bestName ? QString() : bestName;
QString letterStr = (bestId == bestName || bestName == accountInfo.profileInfo.uri)
? QString()
: bestName;
QString prefix = accountInfo.profileInfo.type == lrc::api::profile::Type::RING ? "ring:"
: "sip:";
photo = fallbackAvatar(prefix + accountInfo.profileInfo.uri, letterStr, size);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment