Skip to content

Commit

Permalink
Fix disappearing avatars in infodlg on refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed Jun 13, 2024
1 parent f0d8e29 commit e8f4323
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/infodlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,14 @@ void InfoWidget::setData(const VCard4::VCard &i)

auto pix = d->pa->avatarFactory()->getAvatar(d->jid);
if (pix.isNull()) {
clearPhoto();
d->photo = i.photo();
if (d->photo.isEmpty()) {
clearPhoto();
} else {
// FIXME ideally we should come here after avatar factory is updated
// the this code would be unnecessary
updatePhoto();
}
} else {
// yes we could use pixmap directly. let's keep it for future code optimization
QByteArray ba;
Expand Down

0 comments on commit e8f4323

Please sign in to comment.