Merge pull request #351 from pavelpoley/fix/sender-name

Show proper sender name when using direct reply
This commit is contained in:
Tibor Kaputa 2022-06-01 21:12:32 +02:00 committed by GitHub
commit ad74adaecd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 55 additions and 21 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)
}