mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed wrong display name in chat message notification (sometimes)
This commit is contained in:
parent
4b79b868f7
commit
25ae334fb3
1 changed files with 3 additions and 2 deletions
|
|
@ -168,6 +168,7 @@ class NotificationsManager(private val context: Context) {
|
|||
Log.i("[Notifications Manager] Ensure chat room shortcut exists for bubble notification")
|
||||
Compatibility.createShortcutsToChatRooms(context)
|
||||
}
|
||||
|
||||
displayIncomingChatNotification(room, message)
|
||||
}
|
||||
|
||||
|
|
@ -633,14 +634,14 @@ class NotificationsManager(private val context: Context) {
|
|||
}
|
||||
|
||||
private fun displayIncomingChatNotification(room: ChatRoom, message: ChatMessage) {
|
||||
val friend = coreContext.contactsManager.findContactByAddress(message.fromAddress)
|
||||
|
||||
val notifiable = getNotifiableForRoom(room)
|
||||
if (notifiable.messages.isNotEmpty() || room.unreadMessagesCount == 1) {
|
||||
val friend = coreContext.contactsManager.findContactByAddress(message.fromAddress)
|
||||
val notifiableMessage = getNotifiableMessage(message, friend)
|
||||
notifiable.messages.add(notifiableMessage)
|
||||
} else {
|
||||
for (chatMessage in room.unreadHistory) {
|
||||
val friend = coreContext.contactsManager.findContactByAddress(chatMessage.fromAddress)
|
||||
val notifiableMessage = getNotifiableMessage(chatMessage, friend)
|
||||
notifiable.messages.add(notifiableMessage)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue