diff options
| author | David Göransson <david.goransson@mullvad.net> | 2025-07-11 09:45:36 +0200 |
|---|---|---|
| committer | David Göransson <david.goransson@mullvad.net> | 2025-07-14 09:38:52 +0200 |
| commit | 7a409aa199e7aed5991432ddd817ca98a3b32c49 (patch) | |
| tree | 81536521591b824f47c72f507056b071442cdc03 /android/lib | |
| parent | cc78263127bc332f5170a0e0967b77128978c3a4 (diff) | |
| download | mullvadvpn-7a409aa199e7aed5991432ddd817ca98a3b32c49.tar.xz mullvadvpn-7a409aa199e7aed5991432ddd817ca98a3b32c49.zip | |
Simplify RelayListItem
Diffstat (limited to 'android/lib')
| -rw-r--r-- | android/lib/ui/designsystem/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/designsystem/RelayListItem.kt | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/android/lib/ui/designsystem/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/designsystem/RelayListItem.kt b/android/lib/ui/designsystem/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/designsystem/RelayListItem.kt index 9bc5513526..b410c8b267 100644 --- a/android/lib/ui/designsystem/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/designsystem/RelayListItem.kt +++ b/android/lib/ui/designsystem/src/main/kotlin/net/mullvad/mullvadvpn/lib/ui/designsystem/RelayListItem.kt @@ -108,7 +108,6 @@ fun RelayListItem( class RelayListItemColors( val containerColor: Color, val headlineColor: Color, - val leadingIconColor: Color, val trailingIconColor: Color, val selectedHeadlineColor: Color, val disabledHeadlineColor: Color, @@ -143,7 +142,6 @@ object RelayListItemDefaults { fun colors( containerColor: Color = MaterialTheme.colorScheme.surface, headlineColor: Color = MaterialTheme.colorScheme.onSurface, - leadingIconColor: Color = MaterialTheme.colorScheme.onSurface, trailingIconColor: Color = MaterialTheme.colorScheme.onSurface, selectedHeadlineColor: Color = MaterialTheme.colorScheme.tertiary, disabledHeadlineColor: Color = @@ -152,7 +150,6 @@ object RelayListItemDefaults { RelayListItemColors( containerColor = containerColor, headlineColor = headlineColor, - leadingIconColor = leadingIconColor, trailingIconColor = trailingIconColor, selectedHeadlineColor = selectedHeadlineColor, disabledHeadlineColor = disabledHeadlineColor, @@ -229,11 +226,7 @@ private fun PreviewTrailingRelayListItem() { ) { Icon(imageVector = Icons.Default.Check, contentDescription = null) Spacer(Modifier.width(8.dp)) - Text( - "Hello world fsadhkuhfiuskahf iuhsadhuf sa", - maxLines = 1, - overflow = TextOverflow.Ellipsis, - ) + Text("Sample Relay Item", maxLines = 1, overflow = TextOverflow.Ellipsis) } }, trailingContent = { @@ -251,34 +244,3 @@ private fun PreviewTrailingRelayListItem() { ) } } - -@Preview -@PreviewFontScale -@Composable -private fun PreviewLeadingAndTrailingRelayListItem() { - AppTheme { - RelayListItem( - modifier = Modifier.fillMaxWidth(), - content = { - Text( - "Hello world iuhsadhuf sa", - modifier = Modifier.clickable {}.padding(16.dp).fillMaxSize(), - maxLines = 1, - overflow = TextOverflow.Ellipsis, - ) - }, - trailingContent = { - Box( - modifier = Modifier.fillMaxSize().clickable(onClick = {}), - contentAlignment = Alignment.Center, - ) { - Icon( - modifier = Modifier.padding(16.dp), - imageVector = Icons.Default.Add, - contentDescription = null, - ) - } - }, - ) - } -} |
