Skip to content

Commit

Permalink
fix: text changes for the new group creation flow [WPB-1630] (#2947)
Browse files Browse the repository at this point in the history
  • Loading branch information
saleniuk authored Apr 29, 2024
1 parent 7875c99 commit 70f61a5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -153,7 +154,12 @@ 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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,11 @@
<!-- Search Contact-->
<string name="label_contacts">CONTACTS</string>
<string name="label_new_group">New Group</string>
<string name="label_create_new_group">Create New Group</string>
<plurals name="label_x_participants">
<item quantity="one">%1$d Participant</item>
<item quantity="other">%1$d Participants</item>
</plurals>
<string name="label_new_conversation">New Conversation</string>
<string name="label_search_people">Search people</string>
<string name="label_public_wire">PUBLIC WIRE</string>
Expand Down

0 comments on commit 70f61a5

Please sign in to comment.