From 38229e62a689ea3d9811c1fae06285d427fae675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Saleniuk?= Date: Mon, 29 Apr 2024 10:46:54 +0200 Subject: [PATCH 1/2] fix: text changes for the new group creation flow [WPB-1630] --- .../newconversation/common/SelectParticipantsButtonsRow.kt | 4 +++- .../search/NewConversationSearchPeopleScreen.kt | 2 +- app/src/main/res/values/strings.xml | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/home/newconversation/common/SelectParticipantsButtonsRow.kt b/app/src/main/kotlin/com/wire/android/ui/home/newconversation/common/SelectParticipantsButtonsRow.kt index 34df49728fd..159f9a182af 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/newconversation/common/SelectParticipantsButtonsRow.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/newconversation/common/SelectParticipantsButtonsRow.kt @@ -37,6 +37,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.ColorFilter import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.pluralStringResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.Dp @@ -153,7 +154,8 @@ fun SelectParticipantsButtonsRow( .padding(horizontal = dimensions().spacing16x) .height(dimensions().groupButtonHeight), ) { - val buttonText = if (showTotalSelectedItemsCount) "$mainButtonText ($selectedParticipantsCount)" else mainButtonText + val countText = pluralStringResource(R.plurals.label_x_participants, selectedParticipantsCount, selectedParticipantsCount) + val buttonText = if (showTotalSelectedItemsCount) "$mainButtonText ($countText)" else mainButtonText WirePrimaryButton( text = buttonText, leadingIcon = leadingIcon, diff --git a/app/src/main/kotlin/com/wire/android/ui/home/newconversation/search/NewConversationSearchPeopleScreen.kt b/app/src/main/kotlin/com/wire/android/ui/home/newconversation/search/NewConversationSearchPeopleScreen.kt index 8a1a4c1544e..1e21ec091ee 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/newconversation/search/NewConversationSearchPeopleScreen.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/newconversation/search/NewConversationSearchPeopleScreen.kt @@ -53,7 +53,7 @@ fun NewConversationSearchPeopleScreen( userSearchSignal = userSearchSignal, serviceSearchSignal = serviceSearchSignal, searchTitle = stringResource(id = R.string.label_new_conversation), - actionButtonTitle = stringResource(id = R.string.label_new_group), + actionButtonTitle = stringResource(id = R.string.label_create_new_group), onServicesSearchQueryChanged = searchBarViewModel::onServiceSearchQueryChanged, onUsersSearchQueryChanged = searchBarViewModel::onUserSearchQueryChanged, onOpenUserProfile = { contact -> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index db347602669..decff1b08a5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -748,6 +748,11 @@ CONTACTS New Group + Create New Group + + %1$d Participant + %1$d Participants + New Conversation Search people PUBLIC WIRE From 8a5a6c0f7b30cda50d25b124c1b918e3014cf863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Saleniuk?= Date: Mon, 29 Apr 2024 11:05:31 +0200 Subject: [PATCH 2/2] detekt --- .../newconversation/common/SelectParticipantsButtonsRow.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/home/newconversation/common/SelectParticipantsButtonsRow.kt b/app/src/main/kotlin/com/wire/android/ui/home/newconversation/common/SelectParticipantsButtonsRow.kt index 159f9a182af..ca587cad76e 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/newconversation/common/SelectParticipantsButtonsRow.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/newconversation/common/SelectParticipantsButtonsRow.kt @@ -154,7 +154,11 @@ fun SelectParticipantsButtonsRow( .padding(horizontal = dimensions().spacing16x) .height(dimensions().groupButtonHeight), ) { - val countText = pluralStringResource(R.plurals.label_x_participants, selectedParticipantsCount, selectedParticipantsCount) + val countText = pluralStringResource( + R.plurals.label_x_participants, + selectedParticipantsCount, + selectedParticipantsCount + ) val buttonText = if (showTotalSelectedItemsCount) "$mainButtonText ($countText)" else mainButtonText WirePrimaryButton( text = buttonText,