Avoid crash in ReceiveTransactionFragment due to an unhandled error in RxJava operators.
This commit is contained in:
parent
5bee51092d
commit
0e11c67dfd
1 changed files with 3 additions and 1 deletions
|
@ -80,7 +80,7 @@ class ReceiveTransactionFragment : ConnectedFragment() {
|
|||
private var selectedInAutoCompleteTextView = false
|
||||
|
||||
// Map used to keep track of request and response id pairs
|
||||
private val responseMap = LongSparseArray<Int>()//HashMap<Long, Int>()
|
||||
private val responseMap = LongSparseArray<Int>()
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
setHasOptionsMenu(true)
|
||||
|
@ -173,6 +173,7 @@ class ReceiveTransactionFragment : ConnectedFragment() {
|
|||
tietAmount.textChanges()
|
||||
.debounce(1000, TimeUnit.MILLISECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.doOnError { mAsset = null }
|
||||
.subscribe { updateQR() }
|
||||
)
|
||||
|
||||
|
@ -188,6 +189,7 @@ class ReceiveTransactionFragment : ConnectedFragment() {
|
|||
.debounce(500, TimeUnit.MILLISECONDS)
|
||||
.map { it.toString().trim().toUpperCase() }
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.doOnError { mAsset = null }
|
||||
.subscribe {
|
||||
if (!selectedInAutoCompleteTextView) {
|
||||
mAsset = null
|
||||
|
|
Loading…
Reference in a new issue