show proper sender name when using direct reply

This commit is contained in:
Pavel Poley 2022-05-30 15:58:21 +03:00
parent b7a28ad1ac
commit f4b3b6ce61
35 changed files with 54 additions and 20 deletions

View file

@ -812,9 +812,9 @@ fun Context.showMessageNotification(address: String, body: String, threadId: Lon
notificationManager.notify(threadId.hashCode(), builder.build())
}
private fun getMessagesStyle(notificationManager: NotificationManager, threadId: Long, sender: String, body: String): NotificationCompat.MessagingStyle {
private fun Context.getMessagesStyle(notificationManager: NotificationManager, threadId: Long, sender: String, body: String): NotificationCompat.MessagingStyle {
val oldMessages = getOldMessages(notificationManager, threadId)
val messages = NotificationCompat.MessagingStyle(sender)
val messages = NotificationCompat.MessagingStyle(getString(R.string.me))
oldMessages.forEach {
messages.addMessage(it)
}