From 7792ca71490197a3c055ce23378ee569494936c0 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Tue, 16 Jan 2018 21:02:29 +0200 Subject: [PATCH] Fix emoji as avatars issue for the receipts --- src/dialogs/ReadReceipts.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dialogs/ReadReceipts.cc b/src/dialogs/ReadReceipts.cc index 51470c67..be79c7aa 100644 --- a/src/dialogs/ReadReceipts.cc +++ b/src/dialogs/ReadReceipts.cc @@ -7,6 +7,7 @@ #include #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) == '@')