don't showLoading on fusion cancel or close if not running

This commit is contained in:
sneurlax 2023-10-20 13:23:46 -05:00
parent a4891d8a64
commit 27f8f86b8a

View file

@ -40,7 +40,12 @@ class FusionDialogView extends ConsumerStatefulWidget {
class _FusionDialogViewState extends ConsumerState<FusionDialogView> { class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
Future<bool> _requestAndProcessCancel() async { Future<bool> _requestAndProcessCancel() async {
final shouldCancel = await showDialog<bool?>( if (!ref
.read(fusionProgressUIStateProvider(widget.walletId).notifier)
.running) {
return true;
} else {
bool? shouldCancel = await showDialog<bool?>(
context: context, context: context,
barrierDismissible: false, barrierDismissible: false,
builder: (_) => DesktopDialog( builder: (_) => DesktopDialog(
@ -136,6 +141,7 @@ class _FusionDialogViewState extends ConsumerState<FusionDialogView> {
return false; return false;
} }
} }
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {