Skip to content

Commit

Permalink
fix(local search): chip color, close #1437
Browse files Browse the repository at this point in the history
  • Loading branch information
z-huang committed Aug 22, 2024
1 parent b2a50fe commit 21499b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp

@Composable
Expand All @@ -20,6 +21,7 @@ fun <E> ChipsRow(
currentValue: E,
onValueUpdate: (E) -> Unit,
modifier: Modifier = Modifier,
containerColor: Color = MaterialTheme.colorScheme.surface,
) {
Row(
modifier = modifier
Expand All @@ -32,7 +34,7 @@ fun <E> ChipsRow(
FilterChip(
label = { Text(label) },
selected = currentValue == value,
colors = FilterChipDefaults.filterChipColors(containerColor = MaterialTheme.colorScheme.surface),
colors = FilterChipDefaults.filterChipColors(containerColor = containerColor),
onClick = { onValueUpdate(value) }
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ fun LocalSearchScreen(
LocalFilter.PLAYLIST to stringResource(R.string.filter_playlists)
),
currentValue = searchFilter,
onValueUpdate = { viewModel.filter.value = it }
onValueUpdate = { viewModel.filter.value = it },
containerColor = MaterialTheme.colorScheme.surfaceContainerHigh
)

LazyColumn(
Expand Down

0 comments on commit 21499b5

Please sign in to comment.