commit 326b1bdf62a687aa40d32994c14c792fcbf113fc
parent 86b16475d4c198abca49d07edf8585c7e7e76d04
Author: Torsten Grote <t@grobox.de>
Date: Wed, 17 Aug 2022 14:59:20 -0300
[wallet] Use global navigation to handle Taler URIs
so it works from whichever fragment we are currently in
Diffstat:
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git 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
@@ -26,17 +26,11 @@
android:label="@string/balances_title"
tools:layout="@layout/fragment_balances">
<action
- android:id="@+id/action_nav_main_to_promptPayment"
- app:destination="@id/promptPayment" />
- <action
android:id="@+id/action_nav_main_to_nav_transactions"
app:destination="@id/nav_transactions" />
<action
android:id="@+id/action_nav_main_to_nav_uri_input"
app:destination="@id/nav_uri_input" />
- <action
- android:id="@+id/action_nav_main_to_promptTip"
- app:destination="@id/promptTip" />
</fragment>
<fragment
@@ -232,6 +226,10 @@
app:destination="@id/promptPayment" />
<action
+ android:id="@+id/action_global_promptTip"
+ app:destination="@id/promptTip" />
+
+ <action
android:id="@+id/action_global_pending_operations"
app:destination="@id/nav_pending_operations" />