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
|
private var selectedInAutoCompleteTextView = false
|
||||||
|
|
||||||
// Map used to keep track of request and response id pairs
|
// 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? {
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||||
setHasOptionsMenu(true)
|
setHasOptionsMenu(true)
|
||||||
|
@ -173,6 +173,7 @@ class ReceiveTransactionFragment : ConnectedFragment() {
|
||||||
tietAmount.textChanges()
|
tietAmount.textChanges()
|
||||||
.debounce(1000, TimeUnit.MILLISECONDS)
|
.debounce(1000, TimeUnit.MILLISECONDS)
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.doOnError { mAsset = null }
|
||||||
.subscribe { updateQR() }
|
.subscribe { updateQR() }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -188,6 +189,7 @@ class ReceiveTransactionFragment : ConnectedFragment() {
|
||||||
.debounce(500, TimeUnit.MILLISECONDS)
|
.debounce(500, TimeUnit.MILLISECONDS)
|
||||||
.map { it.toString().trim().toUpperCase() }
|
.map { it.toString().trim().toUpperCase() }
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.doOnError { mAsset = null }
|
||||||
.subscribe {
|
.subscribe {
|
||||||
if (!selectedInAutoCompleteTextView) {
|
if (!selectedInAutoCompleteTextView) {
|
||||||
mAsset = null
|
mAsset = null
|
||||||
|
|
Loading…
Reference in a new issue