From ed11a99e5973fee6707821c8b41b960d5f7ca8e5 Mon Sep 17 00:00:00 2001 From: Naveen Date: Tue, 10 Jan 2023 17:14:51 +0530 Subject: [PATCH] Show error toast when sending MMS fails --- .../smsmessenger/receivers/MmsSentReceiver.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsSentReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsSentReceiver.kt index ee1288dc..143fe56e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsSentReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/MmsSentReceiver.kt @@ -7,7 +7,10 @@ import android.content.Intent import android.database.sqlite.SQLiteException import android.net.Uri import android.provider.Telephony +import android.widget.Toast import com.simplemobiletools.commons.extensions.showErrorToast +import com.simplemobiletools.commons.extensions.toast +import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.helpers.refreshMessages import java.io.File @@ -19,6 +22,7 @@ class MmsSentReceiver : SendStatusReceiver() { val messageBox = if (receiverResultCode == Activity.RESULT_OK) { Telephony.Mms.MESSAGE_BOX_SENT } else { + context.toast(msg = context.getString(R.string.unknown_error_occurred_sending_message, receiverResultCode), length = Toast.LENGTH_LONG) Telephony.Mms.MESSAGE_BOX_FAILED } val values = ContentValues(1).apply {