diff --git a/data/src/main/java/com/moez/QKSMS/repository/MessageRepositoryImpl.kt b/data/src/main/java/com/moez/QKSMS/repository/MessageRepositoryImpl.kt index a5438d34627f43ccfb61c73de7993fd629e88007..7cdddf1d24b34a88da5ebb12c1a96bca12509ad9 100644 --- a/data/src/main/java/com/moez/QKSMS/repository/MessageRepositoryImpl.kt +++ b/data/src/main/java/com/moez/QKSMS/repository/MessageRepositoryImpl.kt @@ -311,19 +311,10 @@ 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 - } - - 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 +325,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() val maxWidth = smsManager.carrierConfigValues.getInt(SmsManager.MMS_CONFIG_MAX_IMAGE_WIDTH)