1
Fork 0
mirror of https://github.com/Steffo99/twom.git synced 2024-11-21 23:54:26 +00:00

If possible, display the current partecipants count in RoomListItem

This commit is contained in:
Steffo 2024-01-21 15:52:00 +01:00
parent a80bfc9ded
commit 455b80857d
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0
2 changed files with 6 additions and 1 deletions

View file

@ -96,7 +96,11 @@ fun RoomListItem(
supportingContent = { supportingContent = {
val count = roomSummary.joinedMembersCount val count = roomSummary.joinedMembersCount
if (count != null) { if (count != null) {
Text(stringResource(R.string.main_partecipants, count)) if (count != 1) {
Text(stringResource(R.string.main_partecipants, count))
} else {
Text(stringResource(R.string.main_partecipant, count))
}
} }
}, },
) )

View file

@ -86,4 +86,5 @@
<string name="room_error_invite_generic">Something went wrong while sending the invite: %1$s</string> <string name="room_error_invite_generic">Something went wrong while sending the invite: %1$s</string>
<string name="edit_title">Editing %1$s</string> <string name="edit_title">Editing %1$s</string>
<string name="main_partecipants">%1$d partecipants</string> <string name="main_partecipants">%1$d partecipants</string>
<string name="main_partecipant">%1$d partecipant</string>
</resources> </resources>