Browse Source

fix(identicon): don't set identicon as an avatar

Do not save user's identicon to a file like a normal avatar. This allows
'Use identicons' setting to affect user's own identicon.
pull/4818/head
tox-user 8 years ago
parent
commit
676be5f625
  1. 3
      src/persistence/profile.cpp

3
src/persistence/profile.cpp

@ -477,9 +477,6 @@ void Profile::setAvatar(QByteArray pic, const ToxPk& owner) @@ -477,9 +477,6 @@ void Profile::setAvatar(QByteArray pic, const ToxPk& owner)
// with IDENTICON_ROWS=5 this gives a 160x160 image file
const QImage identicon = Identicon(owner.getKey()).toImage(32);
pixmap = QPixmap::fromImage(identicon);
QBuffer buf(&avatarData);
buf.open(QIODevice::WriteOnly);
identicon.save(&buf, "png");
} else {
pixmap.load(":/img/contact_dark.svg");

Loading…
Cancel
Save