summary refs log tree commit diff
path: root/src/ui/UserProfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/UserProfile.cpp')
-rw-r--r--src/ui/UserProfile.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/UserProfile.cpp b/src/ui/UserProfile.cpp

index 4b7f054d..a53d25f4 100644 --- a/src/ui/UserProfile.cpp +++ b/src/ui/UserProfile.cpp
@@ -12,12 +12,14 @@ UserProfile::UserProfile(QString roomid, QString userid, TimelineViewManager *manager_, - TimelineModel *parent) + TimelineModel *parent, + QString globalUsername) : QObject(parent) , roomid_(roomid) , userid_(userid) , manager(manager_) , model(parent) + , globalUsername(globalUsername) { fetchDeviceList(this->userid_); @@ -98,7 +100,7 @@ UserProfile::userid() QString UserProfile::displayName() { - return cache::displayName(roomid_, userid_); + return globalUserProfile() ? globalUsername : cache::displayName(roomid_, userid_); } QString