summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authortargetakhil <targetakhil@gmail.com>2021-04-18 11:43:02 +0530
committertargetakhil <targetakhil@gmail.com>2021-04-18 11:43:02 +0530
commitab83c7c3a86f2567b6517d6ac713c490e8b65012 (patch)
tree5a6a95f3c331db8f5bd214163019a775f6654604 /src
parentSet a title for the room settings (diff)
downloadnheko-ab83c7c3a86f2567b6517d6ac713c490e8b65012.tar.xz
change display name wording
Diffstat (limited to 'src')
-rw-r--r--src/timeline/TimelineModel.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index 8e96cb3e..1148985b 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -1463,8 +1463,9 @@ TimelineModel::formatMemberEvent(QString id)
                 }
         }
 
-        QString user = QString::fromStdString(event->state_key);
-        QString name = utils::replaceEmoji(displayName(user));
+        QString user    = QString::fromStdString(event->state_key);
+        QString name    = utils::replaceEmoji(displayName(user));
+        QString oldName = QString::fromStdString(prevEvent->content.display_name);
         QString rendered;
 
         // 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;
 
                         if (displayNameChanged && avatarChanged)
-                                rendered =
-                                  tr("%1 changed their display name and avatar.").arg(name);
+                                rendered = tr("%1 has changed their avatar and changed their "
+                                              "display name to %2.")
+                                             .arg(oldName, name);
                         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)
                                 rendered = tr("%1 changed their avatar.").arg(name);
                         else