diff options
author | CH Chethan Reddy <40890937+Chethan2k1@users.noreply.github.com> | 2020-07-05 21:33:27 +0530 |
---|---|---|
committer | CH Chethan Reddy <40890937+Chethan2k1@users.noreply.github.com> | 2020-07-30 22:10:27 +0530 |
commit | 1103cc15cfe59b35e540855090af381b0f2e5f8e (patch) | |
tree | c838d383d8221eb5387abcacf7c885b2c2dd686f /src/ui | |
parent | Refactor UserProfile (diff) | |
download | nheko-1103cc15cfe59b35e540855090af381b0f2e5f8e.tar.xz |
Adding icons to UserProfile
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/UserProfile.cpp | 11 | ||||
-rw-r--r-- | src/ui/UserProfile.h | 4 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/ui/UserProfile.cpp b/src/ui/UserProfile.cpp index fde0044b..b4938e8d 100644 --- a/src/ui/UserProfile.cpp +++ b/src/ui/UserProfile.cpp @@ -1,6 +1,7 @@ #include "UserProfile.h" #include "Cache.h" #include "ChatPage.h" +#include "DeviceVerificationFlow.h" #include "Logging.h" #include "Utils.h" #include "mtx/responses/crypto.hpp" @@ -122,10 +123,10 @@ UserProfile::callback_fn(const mtx::responses::QueryKeys &res, verified}); } - // std::sort( - // deviceInfo.begin(), deviceInfo.end(), [](const DeviceInfo &a, const DeviceInfo &b) { - // return a.device_id > b.device_id; - // }); + std::sort( + deviceInfo.begin(), deviceInfo.end(), [](const DeviceInfo &a, const DeviceInfo &b) { + return a.device_id > b.device_id; + }); this->deviceList_.queueReset(std::move(deviceInfo)); } @@ -176,4 +177,4 @@ UserProfile::startChat() if (utils::localUser() != this->userid_) req.invite = {this->userid_.toStdString()}; emit ChatPage::instance()->createRoom(req); -} +} \ No newline at end of file diff --git a/src/ui/UserProfile.h b/src/ui/UserProfile.h index 38002fff..99c6a755 100644 --- a/src/ui/UserProfile.h +++ b/src/ui/UserProfile.h @@ -19,6 +19,8 @@ enum Status Q_ENUM_NS(Status) } +class DeviceVerificationFlow; + class DeviceInfo { public: @@ -88,7 +90,7 @@ public: QString displayName(); QString avatarUrl(); - void fetchDeviceList(const QString &userID); + Q_INVOKABLE void fetchDeviceList(const QString &userID); Q_INVOKABLE void banUser(); // Q_INVOKABLE void ignoreUser(); Q_INVOKABLE void kickUser(); |