Avoid two crashlytics reported crashes due to unhandled errors in RxJava operations in the CreateAccountFragment.
This commit is contained in:
parent
5238d4973c
commit
6f806db127
2 changed files with 13 additions and 4 deletions
|
@ -51,7 +51,7 @@ abstract class ConnectedFragment : Fragment(), ServiceConnection {
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(
|
.subscribe(
|
||||||
{ handleIncomingMessage(it) } ,
|
{ handleIncomingMessage(it) } ,
|
||||||
{t -> Crashlytics.log(Log.DEBUG, TAG, t.message) }
|
{ Crashlytics.log(Log.DEBUG, TAG, it.message) }
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,10 @@ class CreateAccountFragment : BaseAccountFragment() {
|
||||||
.skipInitialValue()
|
.skipInitialValue()
|
||||||
.debounce(800, TimeUnit.MILLISECONDS)
|
.debounce(800, TimeUnit.MILLISECONDS)
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe { validateAccountName(it.toString()) }
|
.subscribe(
|
||||||
|
{ validateAccountName(it.toString()) },
|
||||||
|
{ Crashlytics.log(Log.DEBUG, TAG, it.message) }
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Use RxJava Debounce to update the PIN error only after the user stops writing for > 500 ms
|
// Use RxJava Debounce to update the PIN error only after the user stops writing for > 500 ms
|
||||||
|
@ -88,7 +91,10 @@ class CreateAccountFragment : BaseAccountFragment() {
|
||||||
.skipInitialValue()
|
.skipInitialValue()
|
||||||
.debounce(500, TimeUnit.MILLISECONDS)
|
.debounce(500, TimeUnit.MILLISECONDS)
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe { validatePIN() }
|
.subscribe(
|
||||||
|
{ validatePIN() },
|
||||||
|
{ Crashlytics.log(Log.DEBUG, TAG, it.message) }
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Use RxJava Debounce to update the PIN Confirmation error only after the user stops writing for > 500 ms
|
// Use RxJava Debounce to update the PIN Confirmation error only after the user stops writing for > 500 ms
|
||||||
|
@ -97,7 +103,10 @@ class CreateAccountFragment : BaseAccountFragment() {
|
||||||
.skipInitialValue()
|
.skipInitialValue()
|
||||||
.debounce(500, TimeUnit.MILLISECONDS)
|
.debounce(500, TimeUnit.MILLISECONDS)
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe { validatePINConfirmation() }
|
.subscribe(
|
||||||
|
{ validatePINConfirmation() },
|
||||||
|
{ Crashlytics.log(Log.DEBUG, TAG, it.message) }
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
btnCancel.setOnClickListener { findNavController().navigateUp() }
|
btnCancel.setOnClickListener { findNavController().navigateUp() }
|
||||||
|
|
Loading…
Reference in a new issue