Validate datetime before scheduling message
This commit is contained in:
parent
8142489d87
commit
3fa03b2998
1 changed files with 6 additions and 0 deletions
|
|
@ -956,6 +956,12 @@ class ThreadActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun sendScheduledMessage(text: String, subscriptionId: Int) {
|
private fun sendScheduledMessage(text: String, subscriptionId: Int) {
|
||||||
|
if (scheduledDateTime.millis < System.currentTimeMillis() + 1000L) {
|
||||||
|
toast(R.string.must_pick_time_in_the_future)
|
||||||
|
launchScheduleSendDialog(scheduledDateTime)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
refreshedSinceSent = false
|
refreshedSinceSent = false
|
||||||
try {
|
try {
|
||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue