summary refs log tree commit diff
path: root/src/ui
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-05-07 12:19:46 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-05-07 17:01:57 +0200
commit0d0709ccd37ef2f689c9d22a20994ce8d423e18b (patch)
tree110a1e0692184d34a3535dce1f8d3d99c1d70194 /src/ui
parentTranslated using Weblate (Spanish) (diff)
downloadnheko-0d0709ccd37ef2f689c9d22a20994ce8d423e18b.tar.xz
Show verification status next to messages
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/UserProfile.cpp2
-rw-r--r--src/ui/UserProfile.h12
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;
 };