removes unecessary list of icons option from drawer
This commit is contained in:
+8
-42
@@ -516,7 +516,7 @@ fun ListContent(
|
||||
|
||||
NavigationRow(
|
||||
title = R.string.user_preferences,
|
||||
icons = listOf(Icons.Outlined.Translate),
|
||||
icon = Icons.Outlined.Translate,
|
||||
tint = MaterialTheme.colorScheme.onBackground,
|
||||
nav = nav,
|
||||
route = Route.UserSettings,
|
||||
@@ -599,27 +599,10 @@ fun NavigationRow(
|
||||
tint: Color,
|
||||
nav: INav,
|
||||
route: Route,
|
||||
) {
|
||||
NavigationRow(
|
||||
title = title,
|
||||
icons = listOf(icon),
|
||||
tint = tint,
|
||||
nav = nav,
|
||||
route = route,
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun NavigationRow(
|
||||
title: Int,
|
||||
icons: List<ImageVector>,
|
||||
tint: Color,
|
||||
nav: INav,
|
||||
route: Route,
|
||||
) {
|
||||
IconRow(
|
||||
title = title,
|
||||
icons = icons,
|
||||
icon = icon,
|
||||
tint = tint,
|
||||
onClick = {
|
||||
nav.closeDrawer()
|
||||
@@ -669,21 +652,6 @@ fun IconRow(
|
||||
icon: ImageVector,
|
||||
tint: Color,
|
||||
onClick: () -> Unit,
|
||||
) {
|
||||
IconRow(
|
||||
title = title,
|
||||
icons = listOf(icon),
|
||||
tint = tint,
|
||||
onClick = onClick,
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun IconRow(
|
||||
title: Int,
|
||||
icons: List<ImageVector>,
|
||||
tint: Color,
|
||||
onClick: () -> Unit,
|
||||
) {
|
||||
Row(
|
||||
modifier =
|
||||
@@ -698,14 +666,12 @@ fun IconRow(
|
||||
modifier = IconRowModifier,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
icons.forEach { icon ->
|
||||
Icon(
|
||||
imageVector = icon,
|
||||
contentDescription = stringRes(title),
|
||||
modifier = Size22Modifier.padding(end = 4.dp),
|
||||
tint = tint,
|
||||
)
|
||||
}
|
||||
Icon(
|
||||
imageVector = icon,
|
||||
contentDescription = stringRes(title),
|
||||
modifier = Size22Modifier.padding(end = 4.dp),
|
||||
tint = tint,
|
||||
)
|
||||
|
||||
Text(
|
||||
modifier = IconRowTextModifier,
|
||||
|
||||
Reference in New Issue
Block a user