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:
Inhishonor
2025-07-03 16:09:17 -07:00
parent 0a1ced673c
commit 27b102da36
@@ -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