Hide service settings when battery optimization is already ignored
This commit is contained in:
@@ -153,6 +153,7 @@ fun SettingsScreen(navController: NavController) {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (!isBatteryOptimizationIgnored) {
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = {
|
headlineContent = {
|
||||||
Text(
|
Text(
|
||||||
@@ -168,9 +169,7 @@ fun SettingsScreen(navController: NavController) {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
trailingContent = {
|
trailingContent = {
|
||||||
if (!isBatteryOptimizationIgnored) {
|
|
||||||
Badge(containerColor = MaterialTheme.colorScheme.primary)
|
Badge(containerColor = MaterialTheme.colorScheme.primary)
|
||||||
}
|
|
||||||
},
|
},
|
||||||
modifier = Modifier.clickable { navController.navigate("settings/service") },
|
modifier = Modifier.clickable { navController.navigate("settings/service") },
|
||||||
colors =
|
colors =
|
||||||
@@ -178,6 +177,7 @@ fun SettingsScreen(navController: NavController) {
|
|||||||
containerColor = Color.Transparent,
|
containerColor = Color.Transparent,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = {
|
headlineContent = {
|
||||||
|
|||||||
Reference in New Issue
Block a user