Minor fixes

This commit is contained in:
Christian Pauly 2020-01-02 22:31:39 +01:00
commit de29800f29
19 changed files with 156 additions and 104 deletions

View file

@ -39,8 +39,9 @@ class _ChatListState extends State<ChatList> {
Future<bool> waitForFirstSync(BuildContext context) async {
Client client = Matrix.of(context).client;
if (client.prevBatch?.isEmpty ?? true)
if (client.prevBatch?.isEmpty ?? true) {
await client.onFirstSync.stream.first;
}
sub ??= client.onSync.stream.listen((s) => setState(() => null));
return true;
}
@ -121,10 +122,11 @@ class _ChatListState extends State<ChatList> {
activeChat: widget.activeChat == rooms[i].id,
),
);
} else
} else {
return Center(
child: CircularProgressIndicator(),
);
}
},
),
);