summary refs log tree commit diff
path: root/src/timeline/TimelineViewManager.h
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-10-15 02:44:48 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-10-17 17:18:14 +0200
commita5030bdd4da4ca054343f2af758103aaf1f6f73f (patch)
tree61b531fbb3c25539edf467a35cef4b7c92eb490e /src/timeline/TimelineViewManager.h
parentMove voip and encryption stuff into their own directories (diff)
downloadnheko-a5030bdd4da4ca054343f2af758103aaf1f6f73f.tar.xz
move device verification management to its own file
Diffstat (limited to 'src/timeline/TimelineViewManager.h')
-rw-r--r--src/timeline/TimelineViewManager.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/timeline/TimelineViewManager.h b/src/timeline/TimelineViewManager.h
index 723282d6..6696b1c4 100644
--- a/src/timeline/TimelineViewManager.h
+++ b/src/timeline/TimelineViewManager.h
@@ -9,7 +9,6 @@
 #include <QQuickTextDocument>
 #include <QQuickView>
 #include <QQuickWidget>
-#include <QSharedPointer>
 #include <QWidget>
 
 #include <mtx/common.hpp>
@@ -23,6 +22,7 @@
 #include "Utils.h"
 #include "emoji/EmojiModel.h"
 #include "emoji/Provider.h"
+#include "encryption/VerificationManager.h"
 #include "timeline/CommunitiesModel.h"
 #include "timeline/RoomlistModel.h"
 #include "voip/CallManager.h"
@@ -33,7 +33,6 @@ class BlurhashProvider;
 class ColorImageProvider;
 class UserSettings;
 class ChatPage;
-class DeviceVerificationFlow;
 class ImagePackListModel;
 
 class TimelineViewManager : public QObject
@@ -53,6 +52,7 @@ public:
 
     MxcImageProvider *imageProvider() { return imgProvider; }
     CallManager *callManager() { return callManager_; }
+    VerificationManager *verificationManager() { return verificationManager_; }
 
     void clearAll() { rooms_->clear(); }
 
@@ -73,19 +73,14 @@ public:
     Q_INVOKABLE void openGlobalUserProfile(QString userId);
 
     Q_INVOKABLE void focusMessageInput();
-    Q_INVOKABLE void removeVerificationFlow(DeviceVerificationFlow *flow);
 
     Q_INVOKABLE void fixImageRendering(QQuickTextDocument *t, QQuickItem *i);
 
-    void verifyUser(QString userid);
-    void verifyDevice(QString userid, QString deviceid);
-
 signals:
     void activeTimelineChanged(TimelineModel *timeline);
     void initialSyncChanged(bool isInitialSync);
     void replyingEventChanged(QString replyingEvent);
     void replyClosed();
-    void newDeviceVerificationRequest(DeviceVerificationFlow *flow);
     void inviteUsers(QString roomId, QStringList users);
     void showRoomList();
     void narrowViewChanged();
@@ -142,17 +137,17 @@ private:
     BlurhashProvider *blurhashProvider;
     JdenticonProvider *jdenticonProvider;
 
-    CallManager *callManager_ = nullptr;
-
     bool isInitialSync_   = true;
     bool isWindowFocused_ = false;
 
     RoomlistModel *rooms_          = nullptr;
     CommunitiesModel *communities_ = nullptr;
 
-    QHash<QString, QColor> userColors;
+    // don't move this above the rooms_
+    CallManager *callManager_                 = nullptr;
+    VerificationManager *verificationManager_ = nullptr;
 
-    QHash<QString, QSharedPointer<DeviceVerificationFlow>> dvList;
+    QHash<QString, QColor> userColors;
 };
 Q_DECLARE_METATYPE(mtx::events::msg::KeyVerificationAccept)
 Q_DECLARE_METATYPE(mtx::events::msg::KeyVerificationCancel)