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())
|
||||
.subscribe(
|
||||
{ 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()
|
||||
.debounce(800, TimeUnit.MILLISECONDS)
|
||||
.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
|
||||
|
@ -88,7 +91,10 @@ class CreateAccountFragment : BaseAccountFragment() {
|
|||
.skipInitialValue()
|
||||
.debounce(500, TimeUnit.MILLISECONDS)
|
||||
.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
|
||||
|
@ -97,7 +103,10 @@ class CreateAccountFragment : BaseAccountFragment() {
|
|||
.skipInitialValue()
|
||||
.debounce(500, TimeUnit.MILLISECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe { validatePINConfirmation() }
|
||||
.subscribe(
|
||||
{ validatePINConfirmation() },
|
||||
{ Crashlytics.log(Log.DEBUG, TAG, it.message) }
|
||||
)
|
||||
)
|
||||
|
||||
btnCancel.setOnClickListener { findNavController().navigateUp() }
|
||||
|
|
Loading…
Reference in a new issue