From c5418bc52fa8b7451f262df2a32036357916e782 Mon Sep 17 00:00:00 2001 From: hawkbee1 Date: Wed, 30 Oct 2024 16:53:39 +0000 Subject: [PATCH] fix pop issues --- lib/dashboard/connection/operation/view/operation_page.dart | 3 +++ lib/dashboard/src/view/dashboard_page.dart | 5 ++++- lib/scan/cubit/scan_cubit.dart | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/dashboard/connection/operation/view/operation_page.dart b/lib/dashboard/connection/operation/view/operation_page.dart index 5aa67d419..d32cb6063 100644 --- a/lib/dashboard/connection/operation/view/operation_page.dart +++ b/lib/dashboard/connection/operation/view/operation_page.dart @@ -139,6 +139,9 @@ class _OperationViewState extends State { return PopScope( onPopInvoked: (didPop) { + if (didPop) { + return; + } context.read().rejectOperation( connectionBridgeType: widget.connectionBridgeType, ); diff --git a/lib/dashboard/src/view/dashboard_page.dart b/lib/dashboard/src/view/dashboard_page.dart index 453bf50fe..09a1f8c5c 100644 --- a/lib/dashboard/src/view/dashboard_page.dart +++ b/lib/dashboard/src/view/dashboard_page.dart @@ -178,7 +178,10 @@ class _DashboardViewState extends State { return PopScope( canPop: false, - onPopInvoked: (_) async { + onPopInvoked: (didPop) async { + if (didPop) { + return; + } if (scaffoldKey.currentState!.isDrawerOpen) { // Navigator.of(context).pop(); } diff --git a/lib/scan/cubit/scan_cubit.dart b/lib/scan/cubit/scan_cubit.dart index 4cee6e3f6..d687820fc 100644 --- a/lib/scan/cubit/scan_cubit.dart +++ b/lib/scan/cubit/scan_cubit.dart @@ -940,7 +940,8 @@ class ScanCubit extends Cubit { final String responseOrRedirectUri = uri.queryParameters['redirect_uri'] ?? - uri.queryParameters['response_uri']!; + uri.queryParameters['response_uri'] ?? + uri.origin; await activityLogManager.saveLog( LogData(