aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r--lib/connection.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 6d1763ee..22fa2f15 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -268,6 +268,9 @@ void Connection::reloadCapabilities()
}
Q_ASSERT(!d->capabilities.roomVersions.omitted());
emit capabilitiesLoaded();
+ for (auto* r: d->roomMap)
+ if (r->joinState() == JoinState::Join && r->successorId().isEmpty())
+ r->checkVersion();
});
}
@@ -383,8 +386,14 @@ void Connection::onSyncSuccess(SyncData &&data, bool fromCache) {
d->pendingStateRoomIds.removeOne(roomData.roomId);
r->updateData(std::move(roomData), fromCache);
if (d->firstTimeRooms.removeOne(r))
+ {
emit loadedRoomState(r);
+ if (!d->capabilities.roomVersions.omitted())
+ r->checkVersion();
+ // Otherwise, the version will be checked in reloadCapabilities()
+ }
}
+ // Let UI update itself after updating each room
QCoreApplication::processEvents();
}
for (auto&& accountEvent: data.takeAccountData())