diff --git a/lib/pages/new_private_chat/new_private_chat.dart b/lib/pages/new_private_chat/new_private_chat.dart index 7cb177afce..dc03785e33 100644 --- a/lib/pages/new_private_chat/new_private_chat.dart +++ b/lib/pages/new_private_chat/new_private_chat.dart @@ -83,8 +83,14 @@ class NewPrivateChatController extends State { } await showAdaptiveBottomSheet( context: context, - builder: (_) => QrScannerModal( - onScan: (link) => UrlLauncher(context, link).openMatrixToUrl(), + builder: (_) => PopScope( + canPop: false, + onPopInvokedWithResult: (didPop, result) { + Navigator.of(context).pop(); + }, + child: QrScannerModal( + onScan: (link) => UrlLauncher(context, link).openMatrixToUrl(), + ), ), ); }