diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-05-07 12:19:46 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-05-07 17:01:57 +0200 |
commit | 0d0709ccd37ef2f689c9d22a20994ce8d423e18b (patch) | |
tree | 110a1e0692184d34a3535dce1f8d3d99c1d70194 /src/ui | |
parent | Translated using Weblate (Spanish) (diff) | |
download | nheko-0d0709ccd37ef2f689c9d22a20994ce8d423e18b.tar.xz |
Show verification status next to messages
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/UserProfile.cpp | 2 | ||||
-rw-r--r-- | src/ui/UserProfile.h | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/ui/UserProfile.cpp b/src/ui/UserProfile.cpp index b5feb353..0f330964 100644 --- a/src/ui/UserProfile.cpp +++ b/src/ui/UserProfile.cpp @@ -135,7 +135,7 @@ UserProfile::isGlobalUserProfile() const return roomid_ == ""; } -bool +crypto::Trust UserProfile::getUserStatus() { return isUserVerified; diff --git a/src/ui/UserProfile.h b/src/ui/UserProfile.h index aa7266ab..bf71d0de 100644 --- a/src/ui/UserProfile.h +++ b/src/ui/UserProfile.h @@ -11,6 +11,8 @@ #include <mtx/responses.hpp> #include <mtx/responses/common.hpp> +#include "CacheCryptoStructs.h" + namespace verification { Q_NAMESPACE @@ -90,7 +92,7 @@ class UserProfile : public QObject Q_PROPERTY(QString avatarUrl READ avatarUrl NOTIFY avatarUrlChanged) Q_PROPERTY(DeviceInfoModel *deviceList READ deviceList CONSTANT) Q_PROPERTY(bool isGlobalUserProfile READ isGlobalUserProfile CONSTANT) - Q_PROPERTY(bool isUserVerified READ getUserStatus NOTIFY userStatusChanged) + Q_PROPERTY(int userVerified READ getUserStatus NOTIFY userStatusChanged) Q_PROPERTY(bool isLoading READ isLoading NOTIFY loadingChanged) Q_PROPERTY( bool userVerificationEnabled READ userVerificationEnabled NOTIFY userStatusChanged) @@ -108,7 +110,7 @@ public: QString displayName(); QString avatarUrl(); bool isGlobalUserProfile() const; - bool getUserStatus(); + crypto::Trust getUserStatus(); bool userVerificationEnabled() const; bool isSelf() const; bool isLoading() const; @@ -147,9 +149,9 @@ private: QString globalUsername; QString globalAvatarUrl; DeviceInfoModel deviceList_; - bool isUserVerified = false; - bool hasMasterKey = false; - bool isLoading_ = false; + crypto::Trust isUserVerified = crypto::Trust::Unverified; + bool hasMasterKey = false; + bool isLoading_ = false; TimelineViewManager *manager; TimelineModel *model; }; |