From 326b1bdf62a687aa40d32994c14c792fcbf113fc Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Wed, 17 Aug 2022 14:59:20 -0300 Subject: [wallet] Use global navigation to handle Taler URIs so it works from whichever fragment we are currently in --- wallet/src/main/java/net/taler/wallet/MainActivity.kt | 4 ++-- wallet/src/main/res/navigation/nav_graph.xml | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'wallet/src/main') diff --git a/wallet/src/main/java/net/taler/wallet/MainActivity.kt b/wallet/src/main/java/net/taler/wallet/MainActivity.kt index 0e04f44..1ba05ac 100644 --- a/wallet/src/main/java/net/taler/wallet/MainActivity.kt +++ b/wallet/src/main/java/net/taler/wallet/MainActivity.kt @@ -217,12 +217,12 @@ class MainActivity : AppCompatActivity(), OnNavigationItemSelectedListener, when { action.startsWith("pay/") -> { Log.v(TAG, "navigating!") - nav.navigate(R.id.action_nav_main_to_promptPayment) + nav.navigate(R.id.action_global_promptPayment) model.paymentManager.preparePay(url) } action.startsWith("tip/") -> { Log.v(TAG, "navigating!") - nav.navigate(R.id.action_nav_main_to_promptTip) + nav.navigate(R.id.action_global_promptTip) model.tipManager.prepareTip(url) } action.startsWith("withdraw/") -> { diff --git a/wallet/src/main/res/navigation/nav_graph.xml b/wallet/src/main/res/navigation/nav_graph.xml index f0048d9..724fd93 100644 --- a/wallet/src/main/res/navigation/nav_graph.xml +++ b/wallet/src/main/res/navigation/nav_graph.xml @@ -25,18 +25,12 @@ android:name="net.taler.wallet.MainFragment" android:label="@string/balances_title" tools:layout="@layout/fragment_balances"> - - + + -- cgit v1.2.3