From 843afe7aa41f43033fa7e0230f55ea9c8f2ef86d Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Mon, 14 Feb 2022 09:30:33 +0100 Subject: [PATCH] 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. --- lib/src/client.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index 7b489318..0bdcedaa 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -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;