fix a crash at receiving MMS
This commit is contained in:
parent
bbe98a9bf0
commit
97fabfec1a
|
@ -35,7 +35,9 @@ class MmsReceiver : com.klinker.android.send_message.MmsReceivedReceiver() {
|
|||
Handler(Looper.getMainLooper()).post {
|
||||
context.showReceivedMessageNotification(address, mms.body, mms.thread, glideBitmap)
|
||||
val conversation = context.getConversations(mms.thread.toLong()).firstOrNull() ?: return@post
|
||||
context.conversationsDB.insertOrUpdate(conversation)
|
||||
ensureBackgroundThread {
|
||||
context.conversationsDB.insertOrUpdate(conversation)
|
||||
}
|
||||
context.updateUnreadCountBadge(context.conversationsDB.getUnreadConversations())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue