Fix emoji as avatars issue for the receipts

This commit is contained in:
Konstantinos Sideris 2018-01-16 21:02:29 +02:00
parent caf5b70994
commit 7792ca7149
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@
#include <QVBoxLayout>
#include "Config.h"
#include "Utils.h"
#include "Avatar.h"
#include "AvatarProvider.h"
@ -32,7 +33,7 @@ ReceiptItem::ReceiptItem(QWidget *parent, const QString &user_id, uint64_t times
avatar_ = new Avatar(this);
avatar_->setSize(40);
avatar_->setLetter(QChar(displayName[0]));
avatar_->setLetter(utils::firstChar(displayName));
// If it's a matrix id we use the second letter.
if (displayName.size() > 1 && displayName.at(0) == '@')