[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-android] 01/02: [wallet] Use global navigation to handle Ta
From: |
gnunet |
Subject: |
[taler-taler-android] 01/02: [wallet] Use global navigation to handle Taler URIs |
Date: |
Wed, 17 Aug 2022 20:40:29 +0200 |
This is an automated email from the git hooks/post-receive script.
torsten-grote pushed a commit to branch master
in repository taler-android.
commit 326b1bdf62a687aa40d32994c14c792fcbf113fc
Author: Torsten Grote <t@grobox.de>
AuthorDate: Wed Aug 17 14:59:20 2022 -0300
[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(-)
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">
- <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
@@ -231,6 +225,10 @@
android:id="@+id/action_global_promptPayment"
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" />
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.