mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
change display name wording
This commit is contained in:
parent
663c3b0014
commit
ab83c7c3a8
1 changed files with 8 additions and 5 deletions
|
@ -1463,8 +1463,9 @@ TimelineModel::formatMemberEvent(QString id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString user = QString::fromStdString(event->state_key);
|
QString user = QString::fromStdString(event->state_key);
|
||||||
QString name = utils::replaceEmoji(displayName(user));
|
QString name = utils::replaceEmoji(displayName(user));
|
||||||
|
QString oldName = QString::fromStdString(prevEvent->content.display_name);
|
||||||
QString rendered;
|
QString rendered;
|
||||||
|
|
||||||
// see table https://matrix.org/docs/spec/client_server/latest#m-room-member
|
// see table https://matrix.org/docs/spec/client_server/latest#m-room-member
|
||||||
|
@ -1481,10 +1482,12 @@ TimelineModel::formatMemberEvent(QString id)
|
||||||
prevEvent->content.avatar_url != event->content.avatar_url;
|
prevEvent->content.avatar_url != event->content.avatar_url;
|
||||||
|
|
||||||
if (displayNameChanged && avatarChanged)
|
if (displayNameChanged && avatarChanged)
|
||||||
rendered =
|
rendered = tr("%1 has changed their avatar and changed their "
|
||||||
tr("%1 changed their display name and avatar.").arg(name);
|
"display name to %2.")
|
||||||
|
.arg(oldName, name);
|
||||||
else if (displayNameChanged)
|
else if (displayNameChanged)
|
||||||
rendered = tr("%1 changed their display name.").arg(name);
|
rendered =
|
||||||
|
tr("%1 has changed their display name to %2.").arg(oldName, name);
|
||||||
else if (avatarChanged)
|
else if (avatarChanged)
|
||||||
rendered = tr("%1 changed their avatar.").arg(name);
|
rendered = tr("%1 changed their avatar.").arg(name);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue