mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-02-16 19:50:40 +01:00
Remove no longer required logic
This commit is contained in:
parent
91e562ab32
commit
7665415b87
@ -66,9 +66,9 @@ class SmsStatusSentReceiver : SendStatusReceiver() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun updateAppDatabase(context: Context, intent: Intent, receiverResultCode: Int) {
|
override fun updateAppDatabase(context: Context, intent: Intent, receiverResultCode: Int) {
|
||||||
val uri = intent.data
|
val messageUri = intent.data
|
||||||
if (uri != null) {
|
if (messageUri != null) {
|
||||||
val messageId = uri.lastPathSegment?.toLong() ?: 0L
|
val messageId = messageUri.lastPathSegment?.toLong() ?: 0L
|
||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
val type = if (receiverResultCode == Activity.RESULT_OK) {
|
val type = if (receiverResultCode == Activity.RESULT_OK) {
|
||||||
Sms.MESSAGE_TYPE_SENT
|
Sms.MESSAGE_TYPE_SENT
|
||||||
@ -77,15 +77,7 @@ class SmsStatusSentReceiver : SendStatusReceiver() {
|
|||||||
Sms.MESSAGE_TYPE_FAILED
|
Sms.MESSAGE_TYPE_FAILED
|
||||||
}
|
}
|
||||||
|
|
||||||
val updated = context.messagesDB.updateType(messageId, type)
|
context.messagesDB.updateType(messageId, type)
|
||||||
if (updated == 0) {
|
|
||||||
Handler(Looper.getMainLooper()).postDelayed({
|
|
||||||
ensureBackgroundThread {
|
|
||||||
context.messagesDB.updateType(messageId, type)
|
|
||||||
}
|
|
||||||
}, 2000)
|
|
||||||
}
|
|
||||||
|
|
||||||
refreshMessages()
|
refreshMessages()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user