Remove '#' from the room avatars
This commit is contained in:
parent
67418e11b1
commit
597f829c57
11
src/Utils.cc
11
src/Utils.cc
|
@ -123,8 +123,13 @@ utils::getMessageDescription(const TimelineEvent &event, const QString &localUse
|
||||||
QString
|
QString
|
||||||
utils::firstChar(const QString &input)
|
utils::firstChar(const QString &input)
|
||||||
{
|
{
|
||||||
if (!input.isEmpty())
|
if (input.isEmpty())
|
||||||
return QString::fromUcs4(&input.toUcs4().at(0), 1);
|
|
||||||
|
|
||||||
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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue