chore: Wait for secrets after bootstrap verification

This commit is contained in:
Christian Kußowski 2025-11-23 09:36:28 +01:00
commit 02b0fcb8a6
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
2 changed files with 37 additions and 8 deletions

View file

@ -14,7 +14,7 @@ import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/future_loading_dialog.dart';
class KeyVerificationDialog extends StatefulWidget {
Future<void> show(BuildContext context) => showAdaptiveDialog(
Future<bool?> show(BuildContext context) => showAdaptiveDialog<bool>(
context: context,
builder: (context) => this,
barrierDismissible: false,
@ -186,9 +186,9 @@ class KeyVerificationPageState extends State<KeyVerificationDialog> {
);
buttons.add(
AdaptiveDialogAction(
onPressed: () => widget.request
.rejectVerification()
.then((_) => Navigator.of(context, rootNavigator: false).pop()),
onPressed: () => widget.request.rejectVerification().then(
(_) => Navigator.of(context, rootNavigator: false).pop(false),
),
child: Text(
L10n.of(context).reject,
style: TextStyle(color: theme.colorScheme.error),
@ -318,7 +318,8 @@ class KeyVerificationPageState extends State<KeyVerificationDialog> {
child: Text(
L10n.of(context).close,
),
onPressed: () => Navigator.of(context, rootNavigator: false).pop(),
onPressed: () =>
Navigator.of(context, rootNavigator: false).pop(true),
),
);
break;
@ -342,7 +343,8 @@ class KeyVerificationPageState extends State<KeyVerificationDialog> {
child: Text(
L10n.of(context).close,
),
onPressed: () => Navigator.of(context, rootNavigator: false).pop(),
onPressed: () =>
Navigator.of(context, rootNavigator: false).pop(false),
),
);
break;