fix crashes related to missing Rx error handler (#1561)

This commit is contained in:
Konrad Pozniak 2019-11-17 20:59:13 +01:00 committed by GitHub
commit d6ec5ca8d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 3 deletions

View file

@ -59,6 +59,7 @@ class ConversationsViewModel @Inject constructor(
}
.subscribeOn(Schedulers.io())
.doOnError { t -> Log.w("ConversationViewModel", "Failed to favourite conversation", t) }
.onErrorReturnItem(0)
.subscribe()
.addTo(disposables)
}
@ -77,6 +78,7 @@ class ConversationsViewModel @Inject constructor(
}
.subscribeOn(Schedulers.io())
.doOnError { t -> Log.w("ConversationViewModel", "Failed to favourite conversation", t) }
.onErrorReturnItem(0)
.subscribe()
.addTo(disposables)
}