Fix search favorites tag expand icon color
This commit is contained in:
parent
9f8fdfaf65
commit
6793047577
@ -12,7 +12,9 @@ import androidx.compose.foundation.rememberScrollState
|
|||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.rounded.Star
|
import androidx.compose.material.icons.rounded.Star
|
||||||
import androidx.compose.material.icons.rounded.Tag
|
import androidx.compose.material.icons.rounded.Tag
|
||||||
|
import androidx.compose.material3.LocalContentColor
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
import androidx.compose.runtime.CompositionLocalProvider
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
@ -37,41 +39,43 @@ fun LazyListScope.SearchFavorites(
|
|||||||
item(
|
item(
|
||||||
key = "favorites",
|
key = "favorites",
|
||||||
) {
|
) {
|
||||||
Column(
|
CompositionLocalProvider(LocalContentColor provides MaterialTheme.colorScheme.onSurface) {
|
||||||
modifier = Modifier
|
Column(
|
||||||
.padding(
|
modifier = Modifier
|
||||||
top = if (reverse) 8.dp else 0.dp,
|
.padding(
|
||||||
bottom = if (reverse) 0.dp else 8.dp,
|
top = if (reverse) 8.dp else 0.dp,
|
||||||
)
|
bottom = if (reverse) 0.dp else 8.dp,
|
||||||
.background(
|
)
|
||||||
MaterialTheme.colorScheme.surface.copy(
|
.background(
|
||||||
LocalCardStyle.current.opacity
|
MaterialTheme.colorScheme.surface.copy(
|
||||||
),
|
LocalCardStyle.current.opacity
|
||||||
MaterialTheme.shapes.medium
|
),
|
||||||
)
|
MaterialTheme.shapes.medium
|
||||||
) {
|
)
|
||||||
if (favorites.isNotEmpty()) {
|
) {
|
||||||
SearchResultGrid(favorites)
|
if (favorites.isNotEmpty()) {
|
||||||
} else {
|
SearchResultGrid(favorites)
|
||||||
Banner(
|
} else {
|
||||||
modifier = Modifier.padding(16.dp),
|
Banner(
|
||||||
text = stringResource(
|
modifier = Modifier.padding(16.dp),
|
||||||
if (selectedTag == null) R.string.favorites_empty else R.string.favorites_empty_tag
|
text = stringResource(
|
||||||
),
|
if (selectedTag == null) R.string.favorites_empty else R.string.favorites_empty_tag
|
||||||
icon = if (selectedTag == null) Icons.Rounded.Star else Icons.Rounded.Tag,
|
),
|
||||||
)
|
icon = if (selectedTag == null) Icons.Rounded.Star else Icons.Rounded.Tag,
|
||||||
}
|
)
|
||||||
if (pinnedTags.isNotEmpty() || editButton) {
|
}
|
||||||
FavoritesTagSelector(
|
if (pinnedTags.isNotEmpty() || editButton) {
|
||||||
tags = pinnedTags,
|
FavoritesTagSelector(
|
||||||
selectedTag = selectedTag,
|
tags = pinnedTags,
|
||||||
editButton = editButton,
|
selectedTag = selectedTag,
|
||||||
reverse = false,
|
editButton = editButton,
|
||||||
onSelectTag = onSelectTag,
|
reverse = false,
|
||||||
scrollState = rememberScrollState(),
|
onSelectTag = onSelectTag,
|
||||||
expanded = tagsExpanded,
|
scrollState = rememberScrollState(),
|
||||||
onExpand = onExpandTags,
|
expanded = tagsExpanded,
|
||||||
)
|
onExpand = onExpandTags,
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user