Clear attachments after sending message

Fixes #851
This commit is contained in:
Moez Bhatti
2018-01-15 18:47:22 -05:00
parent 20487ea6fc
commit d312c66f86
@@ -279,7 +279,7 @@ class ComposeViewModel(intent: Intent) : QkViewModel<ComposeView, ComposeState>(
val addresses = conversation.recipients.map { it.address }
sendMessage.execute(SendMessage.Params(threadId, addresses, body, attachments))
view.setDraft("")
newState { it.copy(attachments = ArrayList()) }
this.attachments.onNext(ArrayList())
})
.withLatestFrom(state, { _, state ->
if (state.editingMode) {