From cdce40f31f775e609b2ec7dbda685ac6a9b9cde3 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 28 Sep 2021 08:41:06 +0200 Subject: SyncData: drop a shortcut that led to ignoring invites Fixes #510. --- lib/syncdata.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/syncdata.cpp b/lib/syncdata.cpp index 70c4a15f..a3809469 100644 --- a/lib/syncdata.cpp +++ b/lib/syncdata.cpp @@ -184,11 +184,7 @@ void SyncData::parseJson(const QJsonObject& json, const QString& baseDir) auto rooms = json.value("rooms"_ls).toObject(); auto totalRooms = 0; auto totalEvents = 0; - // The first comparison shortcuts the loop when not all states are there - // in the response (anything except "join" is only occasional, and "join" - // intentionally comes first in the enum). - for (size_t i = 0; int(i) < rooms.size() && i < JoinStateStrings.size(); - ++i) { + for (size_t i = 0; i < JoinStateStrings.size(); ++i) { // This assumes that JoinState values go over powers of 2: 1,2,4,... const auto joinState = JoinState(1U << i); const auto rs = rooms.value(JoinStateStrings[i]).toObject(); -- cgit v1.2.3