Skip to content
Snippets Groups Projects
Commit 597f829c authored by Konstantinos Sideris's avatar Konstantinos Sideris
Browse files

Remove '#' from the room avatars

parent 67418e11
No related branches found
No related tags found
No related merge requests found
......@@ -123,8 +123,13 @@ utils::getMessageDescription(const TimelineEvent &event, const QString &localUse
QString
utils::firstChar(const QString &input)
{
if (!input.isEmpty())
return QString::fromUcs4(&input.toUcs4().at(0), 1);
if (input.isEmpty())
return input;
return input;
for (auto const &c : input.toUcs4()) {
if (QString::fromUcs4(&c, 1) != QString("#"))
return QString::fromUcs4(&c, 1).toUpper();
}
return QString::fromUcs4(&input.toUcs4().at(0), 1).toUpper();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment