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