diff options
author | Torsten Grote <t@grobox.de> | 2020-03-24 09:22:01 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2020-03-24 09:22:01 -0300 |
commit | 1dbc22f1faba07331953d761097d5ad91ffff5ce (patch) | |
tree | 9e4e3fd149eeb1be758cba4104c745b0c779e513 /wallet/src/main/java/net/taler | |
parent | 864160280872fdb400c2e0e61aaaa1b858fba3f8 (diff) | |
download | taler-android-1dbc22f1faba07331953d761097d5ad91ffff5ce.tar.gz taler-android-1dbc22f1faba07331953d761097d5ad91ffff5ce.tar.bz2 taler-android-1dbc22f1faba07331953d761097d5ad91ffff5ce.zip |
Fix Wallet QR code scanning and nightly version number display
Diffstat (limited to 'wallet/src/main/java/net/taler')
-rw-r--r-- | wallet/src/main/java/net/taler/wallet/BalanceFragment.kt | 4 | ||||
-rw-r--r-- | wallet/src/main/java/net/taler/wallet/history/HistoryAdapter.kt (renamed from wallet/src/main/java/net/taler/wallet/history/WalletHistoryAdapter.kt) | 5 | ||||
-rw-r--r-- | wallet/src/main/java/net/taler/wallet/history/HistoryFragment.kt (renamed from wallet/src/main/java/net/taler/wallet/history/WalletHistoryFragment.kt) | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/wallet/src/main/java/net/taler/wallet/BalanceFragment.kt b/wallet/src/main/java/net/taler/wallet/BalanceFragment.kt index e4ec681..93ed235 100644 --- a/wallet/src/main/java/net/taler/wallet/BalanceFragment.kt +++ b/wallet/src/main/java/net/taler/wallet/BalanceFragment.kt @@ -37,7 +37,7 @@ import androidx.recyclerview.widget.LinearLayoutManager.VERTICAL import androidx.recyclerview.widget.RecyclerView.Adapter import androidx.recyclerview.widget.RecyclerView.ViewHolder import com.google.zxing.integration.android.IntentIntegrator -import com.google.zxing.integration.android.IntentIntegrator.QR_CODE_TYPES +import com.google.zxing.integration.android.IntentIntegrator.QR_CODE import kotlinx.android.synthetic.main.fragment_show_balance.* import net.taler.wallet.BalanceAdapter.BalanceViewHolder @@ -92,7 +92,7 @@ class BalanceFragment : Fragment() { setPrompt("") setBeepEnabled(true) setOrientationLocked(false) - }.initiateScan(QR_CODE_TYPES) + }.initiateScan(listOf(QR_CODE)) } } diff --git a/wallet/src/main/java/net/taler/wallet/history/WalletHistoryAdapter.kt b/wallet/src/main/java/net/taler/wallet/history/HistoryAdapter.kt index 5424b62..b177fb4 100644 --- a/wallet/src/main/java/net/taler/wallet/history/WalletHistoryAdapter.kt +++ b/wallet/src/main/java/net/taler/wallet/history/HistoryAdapter.kt @@ -41,12 +41,13 @@ import androidx.recyclerview.widget.RecyclerView.ViewHolder import net.taler.common.Amount import net.taler.wallet.BuildConfig import net.taler.wallet.R +import net.taler.wallet.history.HistoryAdapter.HistoryEventViewHolder -internal class WalletHistoryAdapter( +internal class HistoryAdapter( private val listener: OnEventClickListener, private var history: History = History() -) : Adapter<WalletHistoryAdapter.HistoryEventViewHolder>() { +) : Adapter<HistoryEventViewHolder>() { init { setHasStableIds(false) diff --git a/wallet/src/main/java/net/taler/wallet/history/WalletHistoryFragment.kt b/wallet/src/main/java/net/taler/wallet/history/HistoryFragment.kt index 45ecf37..2586ef8 100644 --- a/wallet/src/main/java/net/taler/wallet/history/WalletHistoryFragment.kt +++ b/wallet/src/main/java/net/taler/wallet/history/HistoryFragment.kt @@ -39,13 +39,13 @@ interface OnEventClickListener { fun onEventClicked(event: HistoryEvent) } -class WalletHistoryFragment : Fragment(), OnEventClickListener { +class HistoryFragment : Fragment(), OnEventClickListener { private val model: WalletViewModel by activityViewModels() private val historyManager by lazy { model.historyManager } private lateinit var showAllItem: MenuItem private var reloadHistoryItem: MenuItem? = null - private val historyAdapter = WalletHistoryAdapter(this) + private val historyAdapter = HistoryAdapter(this) override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) |