mirror of
https://github.com/bitwarden/android.git
synced 2025-02-16 11:59:57 +03:00
Apply an immutable list to the Bitwarden segmented button (#1296)
This commit is contained in:
parent
32af8a1860
commit
9b8ff99f75
2 changed files with 4 additions and 3 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue