fix sending glitch shown at opening a conversation

This commit is contained in:
Pavel Poley 2022-05-31 12:12:24 +03:00
parent b7a28ad1ac
commit 2d675ac8be
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()
}
}