Fixed meeting invitation participant label with only 1 participant

This commit is contained in:
Sylvain Berfini 2024-01-23 14:39:49 +01:00
parent fcbe629e48
commit b82f8aed2b
4 changed files with 24 additions and 8 deletions

View file

@ -298,9 +298,10 @@ class ConferenceModel {
participantDevices.postValue(sortParticipantDevicesList(devicesList))
participants.postValue(participantsList)
participantsLabel.postValue(
AppUtils.getFormattedString(
R.string.conference_participants_list_title,
participantsList.size
AppUtils.getStringWithPlural(
R.plurals.conference_participants_list_title,
participantsList.size,
"${participantsList.size}"
)
)
}
@ -338,7 +339,11 @@ class ConferenceModel {
participants.postValue(list)
participantsLabel.postValue(
AppUtils.getFormattedString(R.string.conference_participants_list_title, list.size)
AppUtils.getStringWithPlural(
R.plurals.conference_participants_list_title,
list.size,
"${list.size}"
)
)
}
@ -368,7 +373,11 @@ class ConferenceModel {
participants.postValue(list)
participantsLabel.postValue(
AppUtils.getFormattedString(R.string.conference_participants_list_title, list.size)
AppUtils.getStringWithPlural(
R.plurals.conference_participants_list_title,
list.size,
"${list.size}"
)
)
}

View file

@ -590,7 +590,11 @@ class MessageModel @WorkerThread constructor(
count += 1
}
meetingParticipants.postValue(
AppUtils.getFormattedString(R.string.conference_participants_list_title, "$count")
AppUtils.getStringWithPlural(
R.plurals.conference_participants_list_title,
count,
"$count"
)
)
meetingFound.postValue(true)

View file

@ -37,7 +37,7 @@
android:layout_height="@dimen/top_bar_height"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:text="@{viewModel.conferenceModel.participantsLabel, default=@string/conference_participants_list_title}"
android:text="@{viewModel.conferenceModel.participantsLabel, default=`1 participant`}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/back"
app:layout_constraintTop_toTopOf="parent"/>

View file

@ -537,7 +537,10 @@
<string name="conference_call_empty">Waiting for other participants…</string>
<string name="conference_action_screen_sharing">Screen share</string>
<string name="conference_action_show_participants">Participants</string>
<string name="conference_participants_list_title">%s participants</string>
<plurals name="conference_participants_list_title">
<item quantity="one">%s participant</item>
<item quantity="other">%s participants</item>
</plurals>
<string name="conference_layout_grid">Mosaic</string>
<string name="conference_layout_active_speaker">Speaker</string>