Fix threading issue with scheduled message

This commit is contained in:
Naveen 2022-11-03 22:41:41 +05:30
parent 9fb37320d4
commit c1ccfd343b
1 changed files with 9 additions and 6 deletions

View File

@ -1013,7 +1013,8 @@ class ThreadActivity : SimpleActivity() {
conversationsDB.insertOrUpdate(conversation.copy(date = nowSeconds))
}
scheduleMessage(message)
}
runOnUiThread {
clearCurrentMessage()
hideScheduleSendUi()
scheduledMessage = null
@ -1021,6 +1022,8 @@ class ThreadActivity : SimpleActivity() {
if (!refreshedSinceSent) {
refreshMessages()
}
}
}
} catch (e: Exception) {
showErrorToast(e.localizedMessage ?: getString(R.string.unknown_error_occurred))
}