Optimize the display logic of reboot drop down menu items

This commit is contained in:
ShirkNeko
2025-06-01 02:27:55 +08:00
parent 3c353e8f88
commit dd1d17d2cf
3 changed files with 6 additions and 13 deletions

View File

@@ -277,16 +277,9 @@ fun UpdateCard() {
@Composable
fun RebootDropdownItem(@StringRes id: Int, reason: String = "") {
DropdownMenuItem(
text = { Text(stringResource(id)) },
onClick = { reboot(reason) },
leadingIcon = {
Icon(
imageVector = Icons.Filled.Refresh,
contentDescription = null,
)
}
)
}
text = {Text(stringResource(id))},
onClick = {reboot(reason)})
}
@OptIn(ExperimentalMaterial3Api::class)
@Composable

View File

@@ -276,7 +276,7 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
text = { Text(stringResource(R.string.backup_modules)) },
leadingIcon = {
Icon(
imageVector = Icons.Outlined.Download,
imageVector = Icons.Outlined.Save,
contentDescription = stringResource(R.string.backup),
)
},
@@ -289,7 +289,7 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
text = { Text(stringResource(R.string.restore_modules)) },
leadingIcon = {
Icon(
imageVector = Icons.Outlined.Refresh,
imageVector = Icons.Outlined.RestoreFromTrash,
contentDescription = stringResource(R.string.restore),
)
},