summary refs log tree commit diff
path: root/src/ui/UserProfile.cpp
diff options
context:
space:
mode:
authorJedi18 <targetakhil@gmail.com>2021-01-29 11:55:24 +0530
committerJedi18 <targetakhil@gmail.com>2021-01-29 11:55:24 +0530
commit9b5a287d14a18b1bef012a348dd77350fdb70ba3 (patch)
tree24ee09eb496c46a7b38b38a9921e6ff43ef975a7 /src/ui/UserProfile.cpp
parentfix linting 2 (diff)
downloadnheko-9b5a287d14a18b1bef012a348dd77350fdb70ba3.tar.xz
made requeste changes
Diffstat (limited to 'src/ui/UserProfile.cpp')
-rw-r--r--src/ui/UserProfile.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/UserProfile.cpp b/src/ui/UserProfile.cpp

index e2adffcd..9e8d45b5 100644 --- a/src/ui/UserProfile.cpp +++ b/src/ui/UserProfile.cpp
@@ -116,7 +116,7 @@ UserProfile::userid() QString UserProfile::displayName() { - return globalUserProfile() ? globalUsername : cache::displayName(roomid_, userid_); + return isGlobalUserProfile() ? globalUsername : cache::displayName(roomid_, userid_); } QString @@ -126,9 +126,9 @@ UserProfile::avatarUrl() } bool -UserProfile::globalUserProfile() const +UserProfile::isGlobalUserProfile() const { - return (roomid_ == "") && isSelf(); + return roomid_ == ""; } bool @@ -241,7 +241,7 @@ UserProfile::startChat() void UserProfile::changeUsername(QString username) { - if (globalUserProfile()) { + if (isGlobalUserProfile()) { // change global http::client()->set_displayname( username.toStdString(), [this](mtx::http::RequestErr err) {