fix: Sort rooms after updating the UI on web

FluffyBox behaves different on
web transactions which leads
to the result that _sortRooms()
is performed before the
rooms UI can be there. This
leads to an unsorted room list
on web.
This commit is contained in:
Christian Pauly 2022-02-14 09:30:33 +01:00
parent f8715df328
commit 843afe7aa4
1 changed files with 1 additions and 1 deletions

View File

@ -1260,6 +1260,7 @@ class Client extends MatrixApi {
() async => await _currentTransaction,
syncResp.itemCount,
);
_sortRooms();
onSyncStatus.add(SyncStatusUpdate(SyncStatus.cleaningUp));
} else {
await _handleSync(syncResp);
@ -1331,7 +1332,6 @@ class Client extends MatrixApi {
if (leave != null) {
await _handleRooms(leave, sortAtTheEnd: sortAtTheEnd);
}
_sortRooms();
}
for (final newPresence in sync.presence ?? []) {
presences[newPresence.senderId] = newPresence;