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