[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-android] branch master updated (3c2bf6e -> 7cd48e3)
From: |
gnunet |
Subject: |
[taler-taler-android] branch master updated (3c2bf6e -> 7cd48e3) |
Date: |
Tue, 11 Apr 2023 22:33:26 +0200 |
This is an automated email from the git hooks/post-receive script.
torsten-grote pushed a change to branch master
in repository taler-android.
from 3c2bf6e [pos] Release 0.2.3
new 14cd3ad [pos] Target SDK 33 and update libraries
new 7cd48e3 [pos] Don't crash when adding custom product with huge
invalid amount
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
merchant-lib/build.gradle | 3 +--
merchant-terminal/build.gradle | 6 +++---
.../net/taler/merchantpos/order/CustomDialogFragment.kt | 13 ++++++++++++-
3 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/merchant-lib/build.gradle b/merchant-lib/build.gradle
index 50c2aa5..2892cd6 100644
--- a/merchant-lib/build.gradle
+++ b/merchant-lib/build.gradle
@@ -21,13 +21,12 @@ plugins {
}
android {
- compileSdkVersion 32
+ compileSdkVersion 33
//noinspection GradleDependency
buildToolsVersion "$build_tools_version"
defaultConfig {
minSdkVersion 21
- targetSdkVersion 32
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
diff --git a/merchant-terminal/build.gradle b/merchant-terminal/build.gradle
index 8b7ccf9..2ec9c4e 100644
--- a/merchant-terminal/build.gradle
+++ b/merchant-terminal/build.gradle
@@ -14,7 +14,7 @@ android {
defaultConfig {
applicationId "net.taler.merchantpos"
minSdkVersion 21
- targetSdkVersion 32
+ targetSdkVersion 33
versionCode 5
versionName "0.2.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -67,7 +67,7 @@ dependencies {
implementation "com.google.android.material:material:$material_version"
implementation
"androidx.constraintlayout:constraintlayout:$constraintlayout_version"
- implementation "androidx.recyclerview:recyclerview:1.2.1"
+ implementation "androidx.recyclerview:recyclerview:1.3.0"
implementation "androidx.recyclerview:recyclerview-selection:1.1.0"
// Navigation
@@ -77,5 +77,5 @@ dependencies {
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
testImplementation 'androidx.test.ext:junit:1.1.5'
- testImplementation 'org.robolectric:robolectric:4.8.1'
+ testImplementation 'org.robolectric:robolectric:4.8.2'
}
diff --git
a/merchant-terminal/src/main/java/net/taler/merchantpos/order/CustomDialogFragment.kt
b/merchant-terminal/src/main/java/net/taler/merchantpos/order/CustomDialogFragment.kt
index bf14aae..45aaf06 100644
---
a/merchant-terminal/src/main/java/net/taler/merchantpos/order/CustomDialogFragment.kt
+++
b/merchant-terminal/src/main/java/net/taler/merchantpos/order/CustomDialogFragment.kt
@@ -20,10 +20,14 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import android.widget.Toast
+import android.widget.Toast.LENGTH_LONG
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.activityViewModels
import net.taler.common.Amount
+import net.taler.common.AmountParserException
import net.taler.merchantpos.MainViewModel
+import net.taler.merchantpos.R
import net.taler.merchantpos.config.ConfigProduct
import net.taler.merchantpos.databinding.FragmentCustomDialogBinding
@@ -52,9 +56,16 @@ class CustomDialogFragment : DialogFragment() {
ui.addButton.setOnClickListener {
val currentOrderId =
viewModel.orderManager.currentOrderId.value ?:
return@setOnClickListener
+ val amount = try {
+ Amount.fromString(currency,
ui.amountLayout.editText!!.text.toString())
+ } catch (e: AmountParserException) {
+ Toast.makeText(requireContext(),
R.string.refund_error_invalid_amount, LENGTH_LONG)
+ .show()
+ return@setOnClickListener
+ }
val product = ConfigProduct(
description = ui.productNameLayout.editText!!.text.toString(),
- price = Amount.fromString(currency,
ui.amountLayout.editText!!.text.toString()),
+ price = amount,
categories = listOf(Int.MIN_VALUE),
)
viewModel.orderManager.addProduct(currentOrderId, product)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-android] branch master updated (3c2bf6e -> 7cd48e3),
gnunet <=