From c091bb5c18cbfe66010b926eab71b9c40443560c Mon Sep 17 00:00:00 2001 From: Dain Nilsson Date: Fri, 10 Jun 2022 16:24:33 +0200 Subject: [PATCH] Listen for cahnges to data instead of node to handle NFC correctly. --- lib/app/views/main_page.dart | 2 +- lib/oath/views/account_dialog.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/app/views/main_page.dart b/lib/app/views/main_page.dart index 885ad718..36f87eea 100755 --- a/lib/app/views/main_page.dart +++ b/lib/app/views/main_page.dart @@ -21,7 +21,7 @@ class MainPage extends ConsumerWidget { }, ); // If the current device changes, we need to pop any open dialogs. - ref.listen(currentDeviceProvider, (_, __) { + ref.listen(currentDeviceDataProvider, (_, __) { Navigator.of(context).popUntil((route) { return route.isFirst || [ diff --git a/lib/oath/views/account_dialog.dart b/lib/oath/views/account_dialog.dart index de359218..ce4974c2 100755 --- a/lib/oath/views/account_dialog.dart +++ b/lib/oath/views/account_dialog.dart @@ -94,7 +94,7 @@ class AccountDialog extends ConsumerWidget with AccountMixin { @override Widget build(BuildContext context, WidgetRef ref) { // TODO: Solve this in a cleaner way - if (ref.watch(currentDeviceProvider) == null) { + if (ref.watch(currentDeviceDataProvider) == null) { // The rest of this method assumes there is a device, and will throw an exception if not. // This will never be shown, as the dialog will be immediately closed return const SizedBox();