aboutsummaryrefslogtreecommitdiff
path: root/wallet/src/main
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2022-08-17 14:59:20 -0300
committerTorsten Grote <t@grobox.de>2022-08-17 14:59:20 -0300
commit326b1bdf62a687aa40d32994c14c792fcbf113fc (patch)
tree7bb900293bd9d397ff269c12276d7397927b6242 /wallet/src/main
parent86b16475d4c198abca49d07edf8585c7e7e76d04 (diff)
downloadtaler-android-326b1bdf62a687aa40d32994c14c792fcbf113fc.tar.gz
taler-android-326b1bdf62a687aa40d32994c14c792fcbf113fc.tar.bz2
taler-android-326b1bdf62a687aa40d32994c14c792fcbf113fc.zip
[wallet] Use global navigation to handle Taler URIs
so it works from whichever fragment we are currently in
Diffstat (limited to 'wallet/src/main')
-rw-r--r--wallet/src/main/java/net/taler/wallet/MainActivity.kt4
-rw-r--r--wallet/src/main/res/navigation/nav_graph.xml10
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
@@ -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" />