Apply an immutable list to the Bitwarden segmented button (#1296)

This commit is contained in:
David Perez 2024-04-22 14:57:55 -05:00 committed by Álison Fernandes
parent 32af8a1860
commit 9b8ff99f75
2 changed files with 4 additions and 3 deletions

View file

@ -8,7 +8,7 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.semantics.testTag
import kotlinx.collections.immutable.ImmutableList
/**
* Displays a Bitwarden styled row of segmented buttons.
@ -20,7 +20,7 @@ import androidx.compose.ui.semantics.testTag
@Composable
fun BitwardenSegmentedButton(
modifier: Modifier = Modifier,
options: List<SegmentedButtonState>,
options: ImmutableList<SegmentedButtonState>,
) {
MultiChoiceSegmentedButtonRow(
modifier = modifier,

View file

@ -48,6 +48,7 @@ import com.x8bit.bitwarden.ui.platform.components.util.rememberVectorPainter
import com.x8bit.bitwarden.ui.platform.manager.permissions.PermissionsManager
import com.x8bit.bitwarden.ui.platform.theme.LocalNonMaterialTypography
import com.x8bit.bitwarden.ui.tools.feature.send.addsend.handlers.AddSendHandlers
import kotlinx.collections.immutable.persistentListOf
/**
* Content view for the [AddSendScreen].
@ -120,7 +121,7 @@ fun AddSendContent(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp),
options = listOf(
options = persistentListOf(
SegmentedButtonState(
text = stringResource(id = R.string.file),
onClick = addSendHandlers.onFileTypeSelect,