From e6bbb8f980dc461806239c268c73259639eb0638 Mon Sep 17 00:00:00 2001 From: Krille Date: Fri, 12 Jan 2024 16:29:47 +0100 Subject: [PATCH] fix: Wait for user device keys before start verification --- lib/pages/bootstrap/bootstrap_dialog.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/pages/bootstrap/bootstrap_dialog.dart b/lib/pages/bootstrap/bootstrap_dialog.dart index fc31b897..4cb276ba 100644 --- a/lib/pages/bootstrap/bootstrap_dialog.dart +++ b/lib/pages/bootstrap/bootstrap_dialog.dart @@ -353,9 +353,12 @@ class BootstrapDialogState extends State { : () async { final req = await showFutureLoadingDialog( context: context, - future: () => widget.client - .userDeviceKeys[widget.client.userID!]! - .startVerification(), + future: () async { + await widget.client.updateUserDeviceKeys(); + return widget.client + .userDeviceKeys[widget.client.userID!]! + .startVerification(); + }, ); if (req.error != null) return; await KeyVerificationDialog(request: req.result!)