Merge pull request #354 from pavelpoley/fix/sending-glitch

Fix "sending..." shown at opening a conversation
This commit is contained in:
Tibor Kaputa 2022-06-01 21:08:57 +02:00 committed by GitHub
commit 2b0b802175
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -43,7 +43,15 @@ class SmsStatusSentReceiver : SentReceiver() {
}
context.updateMessageType(messageId, type)
context.messagesDB.updateType(messageId, type)
val updated = context.messagesDB.updateType(messageId, type)
if (updated == 0) {
Handler(Looper.getMainLooper()).postDelayed({
ensureBackgroundThread {
context.messagesDB.updateType(messageId, type)
}
}, 2000)
}
refreshMessages()
}
}