ThreePIDModel Updates

There is no need for NeochatConnection to depend on ThreePIdModel and also this means it's not in memory when not needed.

Also a little cleanup to make sure only a single job can run at a time.
This commit is contained in:
James Graham
2025-03-09 12:31:14 +00:00
parent 3f0843647c
commit f9c53ee3b0
10 changed files with 108 additions and 50 deletions

View File

@@ -14,7 +14,6 @@
#include "enums/messagetype.h"
#include "linkpreviewer.h"
#include "models/threepidmodel.h"
class NeoChatConnection : public Quotient::Connection
{
@@ -37,11 +36,6 @@ class NeoChatConnection : public Quotient::Connection
*/
Q_PROPERTY(bool globalUrlPreviewEnabled READ globalUrlPreviewEnabled WRITE setGlobalUrlPreviewEnabled NOTIFY globalUrlPreviewEnabledChanged)
/**
* @brief The model with the account's 3PIDs.
*/
Q_PROPERTY(ThreePIdModel *threePIdModel READ threePIdModel CONSTANT)
/**
* @brief Whether an identity server is configured.
*/
@@ -144,8 +138,6 @@ public:
Q_INVOKABLE void deactivateAccount(const QString &password, bool erase);
ThreePIdModel *threePIdModel() const;
bool hasIdentityServer() const;
/**
@@ -234,8 +226,6 @@ private:
bool m_isOnline = true;
void setIsOnline(bool isOnline);
ThreePIdModel *m_threePIdModel;
void connectSignals();
int m_badgeNotificationCount = 0;