mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-03 14:25:38 +02:00
conv-avatar: show a placeholder avatar when base64 data won't load
This does not fix the issue, it's a workaround in case the image data can't load. This may be related to loading large PNGs directly from base 64 strings. Gitlab: #1329 Change-Id: I45729d10a33b8c8ad0adffb339dbcae40c4b18f9
This commit is contained in:
parent
f605cfce81
commit
2371f0c09f
1 changed files with 3 additions and 4 deletions
|
@ -459,11 +459,10 @@ Utils::conversationAvatar(LRCInstance* instance,
|
|||
auto avatarb64 = convModel->avatar(convId);
|
||||
if (!avatarb64.isEmpty()) {
|
||||
auto photo = imageFromBase64String(avatarb64, true);
|
||||
if (photo.isNull()) {
|
||||
qWarning() << "Invalid image for conversation " << convId;
|
||||
return photo;
|
||||
if (!photo.isNull()) {
|
||||
return scaleAndFrame(photo, size);
|
||||
}
|
||||
return scaleAndFrame(photo, size);
|
||||
qWarning() << "Couldn't load image from base 64 data for conversation " << convId;
|
||||
}
|
||||
// Else, generate an avatar
|
||||
auto members = convModel->peersForConversation(convId);
|
||||
|
|
Loading…
Add table
Reference in a new issue