From 0d0709ccd37ef2f689c9d22a20994ce8d423e18b Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 7 May 2021 12:19:46 +0200 Subject: Show verification status next to messages --- src/ui/UserProfile.cpp | 2 +- src/ui/UserProfile.h | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/ui') 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 #include +#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; }; -- cgit 1.4.1