aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/connection.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 3b8da6d1..0562d416 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -131,6 +131,7 @@ public:
#ifdef Quotient_E2EE_ENABLED
std::unique_ptr<QOlmAccount> olmAccount;
bool isUploadingKeys = false;
+ bool firstSync = true;
#endif // Quotient_E2EE_ENABLED
QPointer<GetWellknownJob> resolverJob = nullptr;
@@ -769,10 +770,9 @@ void Connection::onSyncSuccess(SyncData&& data, bool fromCache)
connect(job, &BaseJob::result, this,
[this] { d->isUploadingKeys = false; });
}
- static bool first = true;
- if(first) {
+ if(d->firstSync) {
d->loadDevicesList();
- first = false;
+ d->firstSync = false;
}
d->consumeDevicesList(data.takeDevicesList());