feat: Speed up app start

This commit is contained in:
Krille Fear 2021-11-09 13:06:41 +01:00
commit db22f311e1
4 changed files with 16 additions and 5 deletions

View file

@ -386,6 +386,8 @@ class ChatListController extends State<ChatList> {
Future<void> waitForFirstSync() async {
final client = Matrix.of(context).client;
await client.roomsLoading;
await client.accountDataLoading;
if (client.prevBatch?.isEmpty ?? true) {
await client.onFirstSync.stream.first;
}