fix: Wait for first sync on bootstrap

This commit is contained in:
Christian Pauly 2021-08-01 15:48:27 +02:00
parent 0135780f65
commit a6ab9a2ab0

View File

@ -158,6 +158,7 @@ class ChatListController extends State<ChatList> {
_initReceiveSharingIntent();
WidgetsBinding.instance.addPostFrameCallback((_) async {
if (!Matrix.of(context).client.encryptionEnabled) return;
await waitForFirstSync();
if ((Matrix.of(context).client.database as FlutterMatrixHiveStore)
.get(SettingKeys.dontAskForBootstrapKey) ==
true) {
@ -173,6 +174,7 @@ class ChatListController extends State<ChatList> {
firstRunBootstrapAction();
}
});
super.initState();
}