Fix threading issue with scheduled message
This commit is contained in:
parent
9fb37320d4
commit
c1ccfd343b
|
@ -1013,13 +1013,16 @@ class ThreadActivity : SimpleActivity() {
|
||||||
conversationsDB.insertOrUpdate(conversation.copy(date = nowSeconds))
|
conversationsDB.insertOrUpdate(conversation.copy(date = nowSeconds))
|
||||||
}
|
}
|
||||||
scheduleMessage(message)
|
scheduleMessage(message)
|
||||||
}
|
|
||||||
clearCurrentMessage()
|
|
||||||
hideScheduleSendUi()
|
|
||||||
scheduledMessage = null
|
|
||||||
|
|
||||||
if (!refreshedSinceSent) {
|
runOnUiThread {
|
||||||
refreshMessages()
|
clearCurrentMessage()
|
||||||
|
hideScheduleSendUi()
|
||||||
|
scheduledMessage = null
|
||||||
|
|
||||||
|
if (!refreshedSinceSent) {
|
||||||
|
refreshMessages()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
showErrorToast(e.localizedMessage ?: getString(R.string.unknown_error_occurred))
|
showErrorToast(e.localizedMessage ?: getString(R.string.unknown_error_occurred))
|
||||||
|
|
Loading…
Reference in New Issue