Changes according to feedback

This commit is contained in:
Jack Hamilton
2024-10-11 21:29:02 -05:00
parent 078758391e
commit ab0893b2d4
4 changed files with 18 additions and 25 deletions

View File

@ -99,30 +99,15 @@ fun SortItem(label: String, sortDescending: Boolean?, onClick: () -> Unit) {
null -> null
}
BaseSettingsItem(
BaseSortItem(
label = label,
widget = {
if (arrowIcon != null) {
Icon(
imageVector = arrowIcon,
contentDescription = null,
tint = MaterialTheme.colorScheme.primary,
)
} else {
Spacer(modifier = Modifier.size(24.dp))
}
},
icon = arrowIcon,
onClick = onClick,
)
}
@Composable
fun NondirectionalSortItem(label: String, enabled: Boolean, enabledIcon: ImageVector, onClick: () -> Unit) {
val icon = when(enabled) {
true -> enabledIcon
false -> null
}
fun BaseSortItem(label: String, icon: ImageVector?, onClick: () -> Unit) {
BaseSettingsItem(
label = label,
widget = {