Remove index decrement when using until

This commit is contained in:
Naveen 2023-02-19 14:49:29 +05:30
parent 751fe359e7
commit 0b33ec877d

View File

@ -42,7 +42,7 @@ fun Context.sendMessageCompat(text: String, addresses: List<String>, subId: Int?
if (isMms) {
// we send all MMS attachments separately to reduces the chances of hitting provider MMS limit.
if (attachments.size > 1) {
for (i in 0 until attachments.lastIndex - 1) {
for (i in 0 until attachments.lastIndex) {
val attachment = attachments[i]
messagingUtils.sendMmsMessage("", addresses, listOf(attachment), settings)
}