forked from upstream-mirrors/quik
Fix deleting scheduled messages
The message id's were not getting passed to the delete interactor, rather the number of messages were being passed. This fixes that by passing the id's to the deleteScheduledMessagesInteractor.
This commit is contained in:
@@ -52,7 +52,11 @@ class ScheduledViewModel @Inject constructor(
|
||||
.filter { it == R.id.delete }
|
||||
.withLatestFrom(view.messagesSelectedIntent) { _, selectedMessages -> selectedMessages }
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { view.showDeleteDialog(it) }
|
||||
.subscribe {
|
||||
val ids = it.mapNotNull(scheduledMessageRepo::getScheduledMessage).map { it.id }
|
||||
view.showDeleteDialog(ids)
|
||||
}
|
||||
|
||||
|
||||
// copy the selected message text to the clipboard
|
||||
view.optionsItemIntent
|
||||
|
||||
Reference in New Issue
Block a user