summaryrefslogtreecommitdiff
path: root/merchant-terminal/src/main/java/net/taler/merchantpos/Utils.kt
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-08-04 09:46:38 -0300
committerTorsten Grote <t@grobox.de>2020-08-04 09:46:38 -0300
commit35f7ed512ed7445362d6caee1bf60441f4ce979e (patch)
tree08fb02c802ff36065dd85fb9dcb95a0adabc03c3 /merchant-terminal/src/main/java/net/taler/merchantpos/Utils.kt
parentd3a035c59c508b7b0ef3c06a1b0f1f3c0a077bb8 (diff)
downloadtaler-android-35f7ed512ed7445362d6caee1bf60441f4ce979e.tar.gz
taler-android-35f7ed512ed7445362d6caee1bf60441f4ce979e.tar.bz2
taler-android-35f7ed512ed7445362d6caee1bf60441f4ce979e.zip
[pos] Implement new refund API (untested since there is no wallet support)
Also do a bit of code cleanup and minor refactorings This also removes the volley HTTP library which is not needed anymore
Diffstat (limited to 'merchant-terminal/src/main/java/net/taler/merchantpos/Utils.kt')
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/Utils.kt15
1 files changed, 0 insertions, 15 deletions
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/Utils.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/Utils.kt
index 9deb042..578debf 100644
--- a/merchant-terminal/src/main/java/net/taler/merchantpos/Utils.kt
+++ b/merchant-terminal/src/main/java/net/taler/merchantpos/Utils.kt
@@ -16,15 +16,11 @@
package net.taler.merchantpos
-import android.util.Log
import android.view.View
import androidx.annotation.StringRes
-import com.android.volley.Response
-import com.android.volley.VolleyError
import com.google.android.material.snackbar.BaseTransientBottomBar.ANIMATION_MODE_FADE
import com.google.android.material.snackbar.BaseTransientBottomBar.Duration
import com.google.android.material.snackbar.Snackbar.make
-import net.taler.merchantpos.MainActivity.Companion.TAG
fun topSnackbar(view: View, text: CharSequence, @Duration duration: Int) {
make(view, text, duration)
@@ -36,14 +32,3 @@ fun topSnackbar(view: View, text: CharSequence, @Duration duration: Int) {
fun topSnackbar(view: View, @StringRes resId: Int, @Duration duration: Int) {
topSnackbar(view, view.resources.getText(resId), duration)
}
-
-class LogErrorListener(private val onError: (error: VolleyError) -> Any) :
- Response.ErrorListener {
-
- override fun onErrorResponse(error: VolleyError) {
- val body = error.networkResponse.data?.let { String(it) }
- Log.e(TAG, "$error $body")
- onError.invoke(error)
- }
-
-}