Skip to content

Commit d036496

Browse files
committed
Refactor HomeFilterChips and update selected category text color
- Removed unused `isDarkTheme` parameter from `HomeCategoryItem` and its usage within `HomeFilterChips`. - Updated the selected category text color to use `MaterialTheme.colorScheme.onSurface` instead of `onPrimaryContainer` for better visual consistency.
1 parent 3bedc13 commit d036496

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • feature/home/presentation/src/commonMain/kotlin/zed/rainxch/home/presentation/components

feature/home/presentation/src/commonMain/kotlin/zed/rainxch/home/presentation/components/HomeFilterChips.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ fun LiquidGlassCategoryChips(
252252
category = category,
253253
isSelected = category == selectedCategory,
254254
onSelect = { onCategorySelected(category) },
255-
isDarkTheme = isDarkTheme,
256255
modifier = Modifier.weight(1f),
257256
onPositioned = { x, width ->
258257
itemPositions[index] = x to width
@@ -276,7 +275,6 @@ private fun LiquidGlassCategoryChip(
276275
category: HomeCategory,
277276
isSelected: Boolean,
278277
onSelect: () -> Unit,
279-
isDarkTheme: Boolean,
280278
modifier: Modifier = Modifier,
281279
onPositioned: suspend (x: Float, width: Float) -> Unit
282280
) {
@@ -301,7 +299,7 @@ private fun LiquidGlassCategoryChip(
301299

302300
val textColor by animateColorAsState(
303301
targetValue = if (isSelected) {
304-
MaterialTheme.colorScheme.onPrimaryContainer
302+
MaterialTheme.colorScheme.onSurface
305303
} else {
306304
MaterialTheme.colorScheme.onSurface.copy(alpha = .65f)
307305
},

0 commit comments

Comments
 (0)