forked from upstream-mirrors/quik
Fix error when trying to call conversation with no recipients
This commit is contained in:
@@ -298,7 +298,7 @@ class ComposeViewModel @Inject constructor(
|
|||||||
view.optionsItemIntent
|
view.optionsItemIntent
|
||||||
.filter { it == R.id.call }
|
.filter { it == R.id.call }
|
||||||
.withLatestFrom(conversation) { _, conversation -> conversation }
|
.withLatestFrom(conversation) { _, conversation -> conversation }
|
||||||
.map { conversation -> conversation.recipients.first() }
|
.mapNotNull { conversation -> conversation.recipients[0] }
|
||||||
.map { recipient -> recipient.address }
|
.map { recipient -> recipient.address }
|
||||||
.autoDisposable(view.scope())
|
.autoDisposable(view.scope())
|
||||||
.subscribe { address -> navigator.makePhoneCall(address) }
|
.subscribe { address -> navigator.makePhoneCall(address) }
|
||||||
|
|||||||
Reference in New Issue
Block a user