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:
parent
f8715df328
commit
843afe7aa4
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue