Commit 4c7e37a3 authored by narinder Rana's avatar narinder Rana
Browse files

update for stripped body

parent 22f40cd1
Pipeline #175573 passed with stage
in 14 minutes and 14 seconds
......@@ -311,19 +311,19 @@ class MessageRepositoryImpl @Inject constructor(
?.let(SmsManagerFactory::createSmsManager)
?: SmsManager.getDefault()
// We only care about stripping SMS
val strippedBody = when (prefs.unicode.get()) {
true -> StripAccents.stripAccents(signedBody)
false -> signedBody
}
// // We only care about stripping SMS
// val strippedBody = when (prefs.unicode.get()) {
// true -> StripAccents.stripAccents(signedBody)
// false -> signedBody
// }
val parts = smsManager.divideMessage(strippedBody).orEmpty()
val forceMms = prefs.longAsMms.get() && parts.size > 1
// // val parts = smsManager.divideMessage(strippedBody).orEmpty()
// val forceMms = prefs.longAsMms.get() && parts.size > 1
if (addresses.size == 1 && attachments.isEmpty() && !forceMms) { // SMS
if (addresses.size == 1 && attachments.isEmpty()) { // SMS
if (delay > 0) { // With delay
val sendTime = System.currentTimeMillis() + delay
val message = insertSentSms(subId, threadId, addresses.first(), strippedBody, sendTime)
val message = insertSentSms(subId, threadId, addresses.first(), signedBody, sendTime)
val intent = getIntentForDelayedSms(message.id)
......@@ -334,10 +334,11 @@ class MessageRepositoryImpl @Inject constructor(
alarmManager.setExact(AlarmManager.RTC_WAKEUP, sendTime, intent)
}
} else { // No delay
val message = insertSentSms(subId, threadId, addresses.first(), strippedBody, now())
val message = insertSentSms(subId, threadId, addresses.first(), signedBody, System.currentTimeMillis())
sendSms(message)
}
} else { // MMS
}
else { // MMS
val parts = arrayListOf<MMSPart>()
val maxWidth = smsManager.carrierConfigValues.getInt(SmsManager.MMS_CONFIG_MAX_IMAGE_WIDTH)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment