mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Added ourselves as participant of a conversation
This commit is contained in:
parent
e4d073471c
commit
8aa17ed097
2 changed files with 20 additions and 4 deletions
|
|
@ -261,10 +261,6 @@ class ConferenceModel {
|
|||
val conferenceParticipants = conference.participantList
|
||||
Log.i("$TAG [${conferenceParticipants.size}] participant in conference")
|
||||
|
||||
val meParticipant = conference.me
|
||||
val meParticipantModel = ConferenceParticipantModel(meParticipant)
|
||||
participantsList.add(meParticipantModel)
|
||||
|
||||
for (participant in conferenceParticipants) {
|
||||
val devices = participant.devices
|
||||
val role = participant.role
|
||||
|
|
@ -288,6 +284,10 @@ class ConferenceModel {
|
|||
"$TAG [${devicesList.size}] participant devices for [${participantsList.size}] participants will be displayed (not counting ourselves)"
|
||||
)
|
||||
|
||||
val meParticipant = conference.me
|
||||
val meParticipantModel = ConferenceParticipantModel(meParticipant)
|
||||
participantsList.add(meParticipantModel)
|
||||
|
||||
val ourDevices = conference.me.devices
|
||||
Log.i("$TAG We have [${ourDevices.size}] devices")
|
||||
for (device in ourDevices) {
|
||||
|
|
|
|||
|
|
@ -535,6 +535,22 @@ class ConversationInfoViewModel @UiThread constructor() : ViewModel() {
|
|||
friends.add(model.avatarModel.friend)
|
||||
participantsList.add(model)
|
||||
}
|
||||
|
||||
// Add ourselves at the end of the list
|
||||
val meParticipant = chatRoom.me
|
||||
if (meParticipant != null) {
|
||||
val model = ParticipantModel(
|
||||
meParticipant.address,
|
||||
selfAdmin,
|
||||
isParticipantAdmin = selfAdmin,
|
||||
showMenu = false,
|
||||
onMenuClicked = { view, model ->
|
||||
// openMenu
|
||||
showParticipantAdminPopupMenuEvent.postValue(Event(Pair(view, model)))
|
||||
}
|
||||
)
|
||||
participantsList.add(model)
|
||||
}
|
||||
}
|
||||
|
||||
val avatar = if (groupChatRoom) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue