mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-06-05 21:49:22 +02:00
make sure the conversation are properly refreshed when open
This commit is contained in:
@@ -44,13 +44,14 @@ class SmsReceiver : BroadcastReceiver() {
|
|||||||
context.updateUnreadCountBadge(context.conversationsDB.getUnreadConversations())
|
context.updateUnreadCountBadge(context.conversationsDB.getUnreadConversations())
|
||||||
|
|
||||||
val participant = SimpleContact(0, 0, address, "", arrayListOf(address), ArrayList(), ArrayList())
|
val participant = SimpleContact(0, 0, address, "", arrayListOf(address), ArrayList(), ArrayList())
|
||||||
val message = Message(newMessageId, body, type, arrayListOf(participant), (date / 1000).toInt(), false, threadId,
|
val participants = arrayListOf(participant)
|
||||||
false, null, address, "", subscriptionId)
|
val messageDate = (date / 1000).toInt()
|
||||||
|
val message = Message(newMessageId, body, type, participants, messageDate, false, threadId, false, null, address, "", subscriptionId)
|
||||||
context.messagesDB.insertOrUpdate(message)
|
context.messagesDB.insertOrUpdate(message)
|
||||||
|
refreshMessages()
|
||||||
}
|
}
|
||||||
|
|
||||||
context.showReceivedMessageNotification(address, body, threadId, null)
|
context.showReceivedMessageNotification(address, body, threadId, null)
|
||||||
refreshMessages()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user