fix: Wait for user device keys before start verification

This commit is contained in:
Krille 2024-01-12 16:29:47 +01:00
parent 23fe757599
commit e6bbb8f980
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -353,9 +353,12 @@ class BootstrapDialogState extends State<BootstrapDialog> {
: () async { : () async {
final req = await showFutureLoadingDialog( final req = await showFutureLoadingDialog(
context: context, context: context,
future: () => widget.client future: () async {
.userDeviceKeys[widget.client.userID!]! await widget.client.updateUserDeviceKeys();
.startVerification(), return widget.client
.userDeviceKeys[widget.client.userID!]!
.startVerification();
},
); );
if (req.error != null) return; if (req.error != null) return;
await KeyVerificationDialog(request: req.result!) await KeyVerificationDialog(request: req.result!)