summaryrefslogtreecommitdiff
path: root/app/src/main/java/net/taler/merchantpos/PosTerminalViewModel.kt
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-08-22 23:37:54 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-08-22 23:38:08 +0200
commit2a457a1c46a5da4985035d8bff1db914de161049 (patch)
tree28a95fa5de18eeb4a8a46d8ee293dac0d50ed505 /app/src/main/java/net/taler/merchantpos/PosTerminalViewModel.kt
parenteb9594079589a0126c3fb5f9a2f6ecd56950eebc (diff)
downloadmerchant-terminal-android-2a457a1c46a5da4985035d8bff1db914de161049.tar.gz
merchant-terminal-android-2a457a1c46a5da4985035d8bff1db914de161049.tar.bz2
merchant-terminal-android-2a457a1c46a5da4985035d8bff1db914de161049.zip
UX improvements / prototype support for NFC tunneling
Diffstat (limited to 'app/src/main/java/net/taler/merchantpos/PosTerminalViewModel.kt')
-rw-r--r--app/src/main/java/net/taler/merchantpos/PosTerminalViewModel.kt9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/src/main/java/net/taler/merchantpos/PosTerminalViewModel.kt b/app/src/main/java/net/taler/merchantpos/PosTerminalViewModel.kt
index 1e174ef..bcbc0c8 100644
--- a/app/src/main/java/net/taler/merchantpos/PosTerminalViewModel.kt
+++ b/app/src/main/java/net/taler/merchantpos/PosTerminalViewModel.kt
@@ -1,15 +1,18 @@
package net.taler.merchantpos
+import android.text.Editable
import androidx.lifecycle.ViewModel
class PosTerminalViewModel : ViewModel() {
+ var activeSubject: Editable? = null
var merchantConfig: MerchantConfig? = null
var activeOrderId: String? = null
var activeAmount: String? = null
var activeContractUri: String? = null
fun activeAmountPretty(): String? {
- val a = activeAmount ?: return null
- return a.replace(":", " ")
+ val amount = activeAmount ?: return null
+ val components = amount.split(":")
+ return "${components[1]} ${components[0]}"
}
-} \ No newline at end of file
+}