mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-13 03:55:23 +02:00
avatar: generic placeholder should be used if only account uri is available
Gitlab: #203 Change-Id: Ia98d4f67cbb3c12d96384f2f3a8e851eeb83750a
This commit is contained in:
parent
0de0f6ecb0
commit
2b49d271be
2 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue