Validate datetime before scheduling message

This commit is contained in:
Naveen 2022-10-01 01:22:46 +05:30
parent 8142489d87
commit 3fa03b2998

View File

@ -956,6 +956,12 @@ class ThreadActivity : SimpleActivity() {
}
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
try {
ensureBackgroundThread {