mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed conversation avatar not updated when subject changes
This commit is contained in:
parent
e267f46fd7
commit
ce2b794936
2 changed files with 6 additions and 2 deletions
|
|
@ -158,6 +158,7 @@ class ConversationModel
|
|||
override fun onSubjectChanged(chatRoom: ChatRoom, eventLog: EventLog) {
|
||||
Log.i("$TAG Conversation subject changed [${chatRoom.subject}]")
|
||||
subject.postValue(chatRoom.subject)
|
||||
computeParticipants()
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
|
|
@ -431,7 +432,7 @@ class ConversationModel
|
|||
}
|
||||
|
||||
if (isGroup) {
|
||||
if (avatarModel.value == null) {
|
||||
if (avatarModel.value == null || avatarModel.value?.contactName != chatRoom.subject) {
|
||||
val fakeFriend = coreContext.core.createFriend()
|
||||
fakeFriend.name = chatRoom.subject
|
||||
val model = ContactAvatarModel(fakeFriend)
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ class ConversationInfoViewModel
|
|||
showGreenToast(R.string.conversation_subject_changed_toast, R.drawable.check)
|
||||
|
||||
subject.postValue(chatRoom.subject)
|
||||
computeParticipantsList()
|
||||
infoChangedEvent.postValue(Event(true))
|
||||
}
|
||||
|
||||
|
|
@ -562,7 +563,9 @@ class ConversationInfoViewModel
|
|||
} else {
|
||||
participantsList.first().avatarModel
|
||||
}
|
||||
avatarModel.postValue(avatar)
|
||||
if (!avatar.compare(avatarModel.value)) {
|
||||
avatarModel.postValue(avatar)
|
||||
}
|
||||
|
||||
participants.postValue(participantsList)
|
||||
participantsLabel.postValue(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue