Handle conversations with scheduled messages only

This commit is contained in:
Naveen 2022-09-28 02:05:06 +05:30
parent f837790948
commit ee8130c767
11 changed files with 171 additions and 36 deletions

View file

@ -89,7 +89,7 @@ fun Context.isLongMmsMessage(text: String): Boolean {
}
/** Not to be used with real messages persisted in the telephony db. This is for internal use only (e.g. scheduled messages). */
fun generateRandomMessageId(length: Int = 8): Long {
fun generateRandomId(length: Int = 9): Long {
val millis = DateTime.now(DateTimeZone.UTC).millis
val random = abs(Random(millis).nextLong())
return random.toString().takeLast(length).toLong()