Another fix for proper contact names in chat rooms list

This commit is contained in:
Sylvain Berfini 2022-01-05 14:18:15 +01:00
parent 8c790929c4
commit c6cc2e56d4

View file

@ -113,6 +113,7 @@ class ChatRoomViewModel(val chatRoom: ChatRoom) : ViewModel(), ContactDataInterf
override fun onContactsUpdated() {
Log.i("[Chat Room] Contacts have changed")
contactLookup()
lastMessageText.value = formatLastMessage(chatRoom.lastMessageInHistory)
}
}
@ -215,7 +216,6 @@ class ChatRoomViewModel(val chatRoom: ChatRoom) : ViewModel(), ContactDataInterf
chatRoom.addListener(chatRoomListener)
coreContext.contactsManager.addListener(contactsUpdatedListener)
lastMessageText.value = formatLastMessage(chatRoom.lastMessageInHistory)
unreadMessagesCount.value = chatRoom.unreadMessagesCount
lastUpdate.value = TimestampUtils.toString(chatRoom.lastUpdateTime, true)
@ -226,6 +226,7 @@ class ChatRoomViewModel(val chatRoom: ChatRoom) : ViewModel(), ContactDataInterf
contactLookup()
updateParticipants()
lastMessageText.value = formatLastMessage(chatRoom.lastMessageInHistory)
callInProgress.value = chatRoom.core.callsNb > 0
updateRemotesComposing()