fix: sortRooms should be triggered right before onSync is called

This commit is contained in:
Christian Pauly 2022-02-18 12:11:10 +01:00
parent f967f02487
commit c0ec4c3990
1 changed files with 1 additions and 1 deletions

View File

@ -1255,7 +1255,6 @@ class Client extends MatrixApi {
() async => await _currentTransaction,
syncResp.itemCount,
);
_sortRooms();
onSyncStatus.add(SyncStatusUpdate(SyncStatus.cleaningUp));
} else {
await _handleSync(syncResp);
@ -1349,6 +1348,7 @@ class Client extends MatrixApi {
encryption?.handleDeviceOneTimeKeysCount(
sync.deviceOneTimeKeysCount, sync.deviceUnusedFallbackKeyTypes);
}
_sortRooms();
onSync.add(sync);
}