feat: Speed up app start
This commit is contained in:
parent
7e832ae872
commit
db22f311e1
4 changed files with 16 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue