2 files changed, 10 insertions, 1 deletions
diff --git a/src/ui/UserProfile.cpp b/src/ui/UserProfile.cpp
index 3d9c4b6a..a3f42671 100644
--- a/src/ui/UserProfile.cpp
+++ b/src/ui/UserProfile.cpp
@@ -409,7 +409,8 @@ UserProfile::getGlobalProfileData()
userid_.toStdString(),
[this](const mtx::responses::Profile &res, mtx::http::RequestErr err) {
if (err) {
- nhlog::net()->warn("failed to retrieve own profile info");
+ nhlog::net()->warn("failed to retrieve profile info for {}",
+ userid_.toStdString());
return;
}
@@ -418,3 +419,10 @@ UserProfile::getGlobalProfileData()
emit avatarUrlChanged();
});
}
+
+void
+UserProfile::openGlobalProfile()
+{
+ UserProfile *userProfile = new UserProfile("", userid_, manager, model);
+ emit manager->openProfile(userProfile);
+}
diff --git a/src/ui/UserProfile.h b/src/ui/UserProfile.h
index 721d7230..fd8772d5 100644
--- a/src/ui/UserProfile.h
+++ b/src/ui/UserProfile.h
@@ -125,6 +125,7 @@ public:
Q_INVOKABLE void startChat();
Q_INVOKABLE void changeUsername(QString username);
Q_INVOKABLE void changeAvatar();
+ Q_INVOKABLE void openGlobalProfile();
signals:
void userStatusChanged();
|