diff --git a/assets/i18n/en.json b/assets/i18n/en.json index 03f1d4a..dc03130 100644 --- a/assets/i18n/en.json +++ b/assets/i18n/en.json @@ -87,7 +87,8 @@ "paste_invite_here": "Paste your contact invite here:", "paste": "Paste", "message_from_contact": "Message from contact", - "validating": "Validating..." + "validating": "Validating...", + "invalid_invitation": "Invalid invitation" }, "enter_pin_dialog": { "enter_pin": "Enter PIN", diff --git a/lib/components/paste_invite_dialog.dart b/lib/components/paste_invite_dialog.dart index 973b2cd..a045ff4 100644 --- a/lib/components/paste_invite_dialog.dart +++ b/lib/components/paste_invite_dialog.dart @@ -216,8 +216,8 @@ class PasteInviteDialogState extends ConsumerState { if (_isAccepting) { return SizedBox(height: 400, child: waitingPage(context)); } - return SizedBox( - height: 400, + return ConstrainedBox( + constraints: const BoxConstraints(maxHeight: 400), child: SingleChildScrollView( padding: const EdgeInsets.all(8), child: Column( @@ -250,6 +250,13 @@ class PasteInviteDialogState extends ConsumerState { Text(translate('paste_invite_dialog.validating')), buildProgressIndicator(context), ]), + if (_validInvitation == null && + !_validatingPaste && + _pasteTextController.text.isNotEmpty) + Column(children: [ + Text(translate('paste_invite_dialog.invalid_invitation')), + const Icon(Icons.error) + ]).paddingAll(16).toCenter(), if (_validInvitation != null && !_validatingPaste) Column(children: [ ProfileWidget( @@ -275,7 +282,7 @@ class PasteInviteDialogState extends ConsumerState { ], ), ), - ).withModalHUD(context, _isAccepting); + ); } @override