mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed participants count in ICS if organizer is part of participants list
This commit is contained in:
parent
b067f83784
commit
b511867e62
1 changed files with 14 additions and 1 deletions
|
|
@ -330,7 +330,20 @@ class ChatMessageContentData(
|
|||
conferenceDuration.value = TimestampUtils.durationToString(hours.toInt(), remainMinutes)
|
||||
showDuration.value = minutes > 0
|
||||
|
||||
conferenceParticipantCount.value = String.format(AppUtils.getString(R.string.conference_invite_participants_count), conferenceInfo.participants.size + 1) // +1 for organizer
|
||||
// Check if organizer is part of participants list
|
||||
var participantsCount = conferenceInfo.participants.size
|
||||
val organizer = conferenceInfo.organizer
|
||||
var organizerFound = false
|
||||
if (organizer != null) {
|
||||
for (participant in conferenceInfo.participants) {
|
||||
if (participant.weakEqual(organizer)) {
|
||||
organizerFound = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!organizerFound) participantsCount += 1 // +1 for organizer
|
||||
conferenceParticipantCount.value = String.format(AppUtils.getString(R.string.conference_invite_participants_count), participantsCount)
|
||||
} else if (conferenceInfo == null) {
|
||||
if (content.filePath != null) {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue