aboutsummaryrefslogtreecommitdiff
path: root/wallet
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2022-08-17 17:06:52 -0300
committerTorsten Grote <t@grobox.de>2022-08-17 17:07:53 -0300
commit2fbda24d2205ace0ede93faa824f7836d0ece445 (patch)
tree606ba36c827a8a3bb7f7ccca3a2b3f0642839669 /wallet
parent48b609b653180b1145b2103097837e514e58364d (diff)
downloadtaler-android-2fbda24d2205ace0ede93faa824f7836d0ece445.tar.gz
taler-android-2fbda24d2205ace0ede93faa824f7836d0ece445.tar.bz2
taler-android-2fbda24d2205ace0ede93faa824f7836d0ece445.zip
Upgrade libraries
Diffstat (limited to 'wallet')
-rw-r--r--wallet/build.gradle6
-rw-r--r--wallet/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt1
-rw-r--r--wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt8
-rw-r--r--wallet/src/main/java/net/taler/wallet/tip/PromptTipFragment.kt14
-rw-r--r--wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt3
-rw-r--r--wallet/src/main/java/net/taler/wallet/transactions/TransactionsFragment.kt1
-rw-r--r--wallet/src/main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt12
7 files changed, 26 insertions, 19 deletions
diff --git a/wallet/build.gradle b/wallet/build.gradle
index 33d6124..0f7dbac 100644
--- a/wallet/build.gradle
+++ b/wallet/build.gradle
@@ -91,7 +91,7 @@ android {
}
composeOptions {
- kotlinCompilerExtensionVersion compose_version
+ kotlinCompilerExtensionVersion "1.3.0"
}
buildFeatures {
@@ -128,13 +128,13 @@ dependencies {
implementation "androidx.constraintlayout:constraintlayout:$constraintlayout_version"
// Compose
- implementation 'androidx.activity:activity-compose:1.4.0'
+ implementation 'androidx.activity:activity-compose:1.5.1'
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.animation:animation:$compose_version"
implementation "androidx.compose.ui:ui-tooling:$compose_version"
implementation "androidx.compose.material:material-icons-extended:$compose_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version"
- implementation 'com.google.android.material:compose-theme-adapter:1.1.13'
+ implementation 'com.google.android.material:compose-theme-adapter:1.1.16'
// Lists and Selection
implementation "androidx.recyclerview:recyclerview:1.2.1"
diff --git a/wallet/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt b/wallet/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt
index d5c3eaf..7ed1bab 100644
--- a/wallet/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt
@@ -82,6 +82,7 @@ class PromptPaymentFragment : Fragment(), ProductImageClickListener {
private fun onPaymentStatusChanged(payStatus: PayStatus?) {
when (payStatus) {
+ null -> {}
is PayStatus.Prepared -> {
showLoading(false)
val fees = payStatus.amountEffective - payStatus.amountRaw
diff --git a/wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt b/wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt
index e3b5dc2..6bfcf90 100644
--- a/wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt
@@ -62,7 +62,7 @@ class PendingOperationsFragment : Fragment(), PendingOperationClickListener {
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
- ): View? {
+ ): View {
ui = FragmentPendingOperationsBinding.inflate(inflater, container, false)
return ui.root
}
@@ -79,9 +79,9 @@ class PendingOperationsFragment : Fragment(), PendingOperationClickListener {
addItemDecoration(myItemDecoration)
}
- pendingOperationsManager.pendingOperations.observe(viewLifecycleOwner, {
+ pendingOperationsManager.pendingOperations.observe(viewLifecycleOwner) {
updatePending(it)
- })
+ }
}
override fun onStart() {
@@ -89,6 +89,7 @@ class PendingOperationsFragment : Fragment(), PendingOperationClickListener {
pendingOperationsManager.getPending()
}
+ @Deprecated("Deprecated in Java")
override fun onOptionsItemSelected(item: MenuItem): Boolean {
return when (item.itemId) {
R.id.retry_pending -> {
@@ -99,6 +100,7 @@ class PendingOperationsFragment : Fragment(), PendingOperationClickListener {
}
}
+ @Deprecated("Deprecated in Java")
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
inflater.inflate(R.menu.pending_operations, menu)
super.onCreateOptionsMenu(menu, inflater)
diff --git a/wallet/src/main/java/net/taler/wallet/tip/PromptTipFragment.kt b/wallet/src/main/java/net/taler/wallet/tip/PromptTipFragment.kt
index a5c504c..6a96d1d 100644
--- a/wallet/src/main/java/net/taler/wallet/tip/PromptTipFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/tip/PromptTipFragment.kt
@@ -16,28 +16,22 @@
package net.taler.wallet.tip
-import android.graphics.Bitmap
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
-import android.view.View.GONE
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
import androidx.navigation.fragment.findNavController
-import androidx.recyclerview.widget.LinearLayoutManager
import com.google.android.material.snackbar.Snackbar
import com.google.android.material.snackbar.Snackbar.LENGTH_LONG
import net.taler.common.Amount
-import net.taler.common.ContractTerms
import net.taler.common.fadeIn
import net.taler.common.fadeOut
import net.taler.wallet.MainViewModel
import net.taler.wallet.R
import net.taler.wallet.cleanExchange
-import net.taler.wallet.databinding.FragmentPromptPaymentBinding
import net.taler.wallet.databinding.FragmentPromptTipBinding
-import net.taler.wallet.withdraw.ExchangeSelection
/**
* Show a tip and ask the user to accept/decline.
@@ -81,9 +75,15 @@ class PromptTipFragment : Fragment() {
private fun onPaymentStatusChanged(payStatus: TipStatus?) {
when (payStatus) {
+ null -> {}
is TipStatus.Prepared -> {
showLoading(false)
- showContent(payStatus.tipAmountRaw, payStatus.tipAmountEffective, payStatus.exchangeBaseUrl, payStatus.merchantBaseUrl)
+ showContent(
+ amountRaw = payStatus.tipAmountRaw,
+ amountEffective = payStatus.tipAmountEffective,
+ exchange = payStatus.exchangeBaseUrl,
+ merchant = payStatus.merchantBaseUrl
+ )
//showOrder(payStatus.contractTerms, payStatus.amountRaw, fees)
ui.confirmWithdrawButton.isEnabled = true
ui.confirmWithdrawButton.setOnClickListener {
diff --git a/wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt b/wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt
index f21818f..07b95af 100644
--- a/wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/transactions/TransactionDetailFragment.kt
@@ -44,6 +44,7 @@ abstract class TransactionDetailFragment : Fragment() {
setHasOptionsMenu(model.devMode.value == true)
}
+ @Deprecated("Deprecated in Java")
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
requireActivity().apply {
@@ -53,10 +54,12 @@ abstract class TransactionDetailFragment : Fragment() {
}
}
+ @Deprecated("Deprecated in Java")
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
inflater.inflate(R.menu.transactions_detail, menu)
}
+ @Deprecated("Deprecated in Java")
override fun onOptionsItemSelected(item: MenuItem): Boolean {
return when (item.itemId) {
else -> super.onOptionsItemSelected(item)
diff --git a/wallet/src/main/java/net/taler/wallet/transactions/TransactionsFragment.kt b/wallet/src/main/java/net/taler/wallet/transactions/TransactionsFragment.kt
index da8508a..dd0af84 100644
--- a/wallet/src/main/java/net/taler/wallet/transactions/TransactionsFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/transactions/TransactionsFragment.kt
@@ -130,6 +130,7 @@ class TransactionsFragment : Fragment(), OnTransactionClickListener, ActionMode.
tracker?.onSaveInstanceState(outState)
}
+ @Deprecated("Deprecated in Java")
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
inflater.inflate(R.menu.transactions, menu)
setupSearch(menu.findItem(R.id.action_search))
diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt b/wallet/src/main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt
index e3c5da6..7bf2e29 100644
--- a/wallet/src/main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/withdraw/ReviewExchangeTosFragment.kt
@@ -22,7 +22,6 @@ import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
-import androidx.lifecycle.Observer
import androidx.navigation.fragment.findNavController
import io.noties.markwon.Markwon
import net.taler.common.fadeIn
@@ -44,8 +43,8 @@ class ReviewExchangeTosFragment : Fragment() {
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
- savedInstanceState: Bundle?
- ): View? {
+ savedInstanceState: Bundle?,
+ ): View {
ui = FragmentReviewExchangeTosBinding.inflate(inflater, container, false)
return ui.root
}
@@ -56,7 +55,7 @@ class ReviewExchangeTosFragment : Fragment() {
ui.acceptTosCheckBox.setOnCheckedChangeListener { _, _ ->
withdrawManager.acceptCurrentTermsOfService()
}
- withdrawManager.withdrawStatus.observe(viewLifecycleOwner, Observer {
+ withdrawManager.withdrawStatus.observe(viewLifecycleOwner) {
when (it) {
is WithdrawStatus.TosReviewRequired -> {
val sections = try {
@@ -65,7 +64,7 @@ class ReviewExchangeTosFragment : Fragment() {
parseTos(markwon, text)
} catch (e: ParseException) {
onTosError(e.message ?: "Unknown Error")
- return@Observer
+ return@observe
}
adapter.setSections(sections)
ui.tosList.adapter = adapter
@@ -80,8 +79,9 @@ class ReviewExchangeTosFragment : Fragment() {
is WithdrawStatus.ReceivedDetails -> {
findNavController().navigate(R.id.action_reviewExchangeTOS_to_promptWithdraw)
}
+ else -> {}
}
- })
+ }
}
private fun onTosError(msg: String) {