Merge branch 'krille/sort-rooms-fix' into 'main'

fix: Sort rooms after updating the UI on web

See merge request famedly/company/frontend/famedlysdk!958
This commit is contained in:
Lanna Michalke 2022-02-14 08:39:33 +00:00
commit 18409be280
1 changed files with 1 additions and 1 deletions

View File

@ -1260,6 +1260,7 @@ 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);
@ -1331,7 +1332,6 @@ class Client extends MatrixApi {
if (leave != null) { if (leave != null) {
await _handleRooms(leave, sortAtTheEnd: sortAtTheEnd); await _handleRooms(leave, sortAtTheEnd: sortAtTheEnd);
} }
_sortRooms();
} }
for (final newPresence in sync.presence ?? []) { for (final newPresence in sync.presence ?? []) {
presences[newPresence.senderId] = newPresence; presences[newPresence.senderId] = newPresence;