[Tusky10] fix crash when bookmarking a conversation while offline (#1686)
This commit is contained in:
parent
28e128a4dd
commit
3a75ca25a3
|
@ -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 New Issue