From 65879670ad15612dc7d3aa72e7ac686d789af361 Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 13 Jun 2024 17:35:40 -0600 Subject: [PATCH] desktop swap navigation fix --- lib/pages/exchange_view/confirm_change_now_send.dart | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/pages/exchange_view/confirm_change_now_send.dart b/lib/pages/exchange_view/confirm_change_now_send.dart index 09aac4df9..1b52dfdbe 100644 --- a/lib/pages/exchange_view/confirm_change_now_send.dart +++ b/lib/pages/exchange_view/confirm_change_now_send.dart @@ -147,17 +147,15 @@ class _ConfirmChangeNowSendViewState ); // pop back to wallet - if (mounted) { + if (context.mounted) { if (Util.isDesktop) { + // pop sending dialog Navigator.of(context, rootNavigator: true).pop(); - // stupid hack + // one day we'll do routing right + Navigator.of(context, rootNavigator: true).pop(); if (widget.fromDesktopStep4) { Navigator.of(context, rootNavigator: true).pop(); - Navigator.of(context, rootNavigator: true).pop(); - Navigator.of(context, rootNavigator: true).pop(); - Navigator.of(context, rootNavigator: true).pop(); - Navigator.of(context, rootNavigator: true).pop(); } }