make sure the conversation are properly refreshed when open

This commit is contained in:
tibbi 2021-04-15 11:58:11 +02:00
parent 2db6ffb835
commit e8a53d06c1

View File

@ -44,13 +44,14 @@ class SmsReceiver : BroadcastReceiver() {
context.updateUnreadCountBadge(context.conversationsDB.getUnreadConversations())
val participant = SimpleContact(0, 0, address, "", arrayListOf(address), ArrayList(), ArrayList())
val message = Message(newMessageId, body, type, arrayListOf(participant), (date / 1000).toInt(), false, threadId,
false, null, address, "", subscriptionId)
val participants = arrayListOf(participant)
val messageDate = (date / 1000).toInt()
val message = Message(newMessageId, body, type, participants, messageDate, false, threadId, false, null, address, "", subscriptionId)
context.messagesDB.insertOrUpdate(message)
refreshMessages()
}
context.showReceivedMessageNotification(address, body, threadId, null)
refreshMessages()
}
}
}