diff options
Diffstat (limited to 'wallet/src/main/java/net/taler')
5 files changed, 8 insertions, 9 deletions
diff --git a/wallet/src/main/java/net/taler/wallet/MainActivity.kt b/wallet/src/main/java/net/taler/wallet/MainActivity.kt index 1dafce0..ca53de3 100644 --- a/wallet/src/main/java/net/taler/wallet/MainActivity.kt +++ b/wallet/src/main/java/net/taler/wallet/MainActivity.kt @@ -151,18 +151,18 @@ class MainActivity : AppCompatActivity(), OnNavigationItemSelectedListener, connectToWifi(this, uri.fragment!!) } when { - url.toLowerCase(ROOT).startsWith("taler://pay/") -> { + url.lowercase(ROOT).startsWith("taler://pay/") -> { Log.v(TAG, "navigating!") nav.navigate(R.id.action_nav_main_to_promptPayment) model.paymentManager.preparePay(url) } - url.toLowerCase(ROOT).startsWith("taler://withdraw/") -> { + url.lowercase(ROOT).startsWith("taler://withdraw/") -> { Log.v(TAG, "navigating!") // there's more than one entry point, so use global action nav.navigate(R.id.action_global_promptWithdraw) model.withdrawManager.getWithdrawalDetails(url) } - url.toLowerCase(ROOT).startsWith("taler://refund/") -> { + url.lowercase(ROOT).startsWith("taler://refund/") -> { model.showProgressBar.value = true model.refundManager.refund(url).observe(this, Observer(::onRefundResponse)) } diff --git a/wallet/src/main/java/net/taler/wallet/exchanges/ExchangeFeesFragment.kt b/wallet/src/main/java/net/taler/wallet/exchanges/ExchangeFeesFragment.kt index c59fffe..1ea32dd 100644 --- a/wallet/src/main/java/net/taler/wallet/exchanges/ExchangeFeesFragment.kt +++ b/wallet/src/main/java/net/taler/wallet/exchanges/ExchangeFeesFragment.kt @@ -89,7 +89,7 @@ private class CoinFeeAdapter(private val items: List<CoinFee>) : Adapter<CoinFee holder.bind(items[position]) } - private class CoinFeeViewHolder(private val v: View) : ViewHolder(v) { + class CoinFeeViewHolder(private val v: View) : ViewHolder(v) { private val res = v.context.resources private val coinView: TextView = v.findViewById(R.id.coinView) private val withdrawFeeView: TextView = v.findViewById(R.id.withdrawFeeView) @@ -127,7 +127,7 @@ private class WireFeeAdapter(private val items: List<WireFee>) : Adapter<WireFee holder.bind(items[position]) } - private class WireFeeViewHolder(private val v: View) : ViewHolder(v) { + class WireFeeViewHolder(private val v: View) : ViewHolder(v) { private val validityView: TextView = v.findViewById(R.id.validityView) private val wireFeeView: TextView = v.findViewById(R.id.wireFeeView) private val closingFeeView: TextView = v.findViewById(R.id.closingFeeView) 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 664dcc9..700e158 100644 --- a/wallet/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt +++ b/wallet/src/main/java/net/taler/wallet/payment/PromptPaymentFragment.kt @@ -24,7 +24,6 @@ import android.view.View.GONE import android.view.ViewGroup import androidx.fragment.app.Fragment import androidx.fragment.app.activityViewModels -import androidx.lifecycle.observe import androidx.navigation.fragment.findNavController import androidx.recyclerview.widget.LinearLayoutManager import com.google.android.material.snackbar.Snackbar @@ -51,7 +50,7 @@ class PromptPaymentFragment : Fragment(), ProductImageClickListener { override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? - ): View? { + ): View { ui = FragmentPromptPaymentBinding.inflate(inflater, container, false) return ui.root } diff --git a/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt b/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt index 5e492f5..b8bf9af 100644 --- a/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt +++ b/wallet/src/main/java/net/taler/wallet/transactions/TransactionAdapter.kt @@ -154,7 +154,7 @@ internal class TransactionLookup( override fun getItemDetails(e: MotionEvent): ItemDetails<String>? { list.findChildViewUnder(e.x, e.y)?.let { view -> val holder = list.getChildViewHolder(view) - val position = holder.adapterPosition + val position = holder.bindingAdapterPosition return object : ItemDetails<String>() { override fun getPosition(): Int = position override fun getSelectionKey(): String = adapter.keyProvider.getKey(position) diff --git a/wallet/src/main/java/net/taler/wallet/withdraw/ManualWithdrawFragment.kt b/wallet/src/main/java/net/taler/wallet/withdraw/ManualWithdrawFragment.kt index 47c2c6b..3acb29f 100644 --- a/wallet/src/main/java/net/taler/wallet/withdraw/ManualWithdrawFragment.kt +++ b/wallet/src/main/java/net/taler/wallet/withdraw/ManualWithdrawFragment.kt @@ -53,7 +53,7 @@ class ManualWithdrawFragment : Fragment() { ui.qrCodeButton.setOnClickListener { scanQrCode(requireActivity()) } ui.currencyView.text = exchangeItem.currency val paymentOptions = exchangeItem.paytoUris.mapNotNull { paytoUri -> - Uri.parse(paytoUri).authority?.toUpperCase(Locale.getDefault()) + Uri.parse(paytoUri).authority?.uppercase(Locale.getDefault()) }.joinToString(separator = "\n", prefix = "• ") ui.paymentOptionsLabel.text = getString(R.string.withdraw_manual_payment_options, exchangeItem.name, paymentOptions) |