catch and show exceptions thrown at sending messages

This commit is contained in:
tibbi 2020-04-19 20:41:12 +02:00
parent 4bb6f47f1b
commit 4b3051a845
1 changed files with 9 additions and 5 deletions

View File

@ -432,12 +432,16 @@ class ThreadActivity : SimpleActivity() {
}
}
transaction.sendNewMessage(message, threadId.toLong())
try {
transaction.sendNewMessage(message, threadId.toLong())
thread_type_message.setText("")
attachmentUris.clear()
thread_attachments_holder.beGone()
thread_attachments_wrapper.removeAllViews()
thread_type_message.setText("")
attachmentUris.clear()
thread_attachments_holder.beGone()
thread_attachments_wrapper.removeAllViews()
} catch (e: Exception) {
showErrorToast(e)
}
}
// show selected contacts, properly split to new lines when appropriate