[Tusky10] fix crash when bookmarking a conversation while offline (#1686)
This commit is contained in:
parent
28e128a4dd
commit
3a75ca25a3
1 changed files with 2 additions and 1 deletions
|
@ -74,6 +74,7 @@ class ConversationsViewModel @Inject constructor(
|
|||
}
|
||||
.subscribeOn(Schedulers.io())
|
||||
.doOnError { t -> Log.w("ConversationViewModel", "Failed to bookmark conversation", t) }
|
||||
.onErrorReturnItem(0)
|
||||
.subscribe()
|
||||
.autoDispose()
|
||||
}
|
||||
|
@ -127,7 +128,7 @@ class ConversationsViewModel @Inject constructor(
|
|||
}
|
||||
|
||||
fun remove(position: Int) {
|
||||
conversations.value?.getOrNull(position)?.let { conversation ->
|
||||
conversations.value?.getOrNull(position)?.let {
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue