mirror of
https://github.com/mihonapp/mihon.git
synced 2026-10-29 12:12:02 -07:00
Address compose and xmlutil deprecations (#3507)
This commit is contained in:
@@ -169,8 +169,6 @@ internal class PermissionStep : OnboardingStep {
|
||||
) {
|
||||
ListItem(
|
||||
modifier = modifier,
|
||||
headlineContent = { Text(text = title) },
|
||||
supportingContent = { Text(text = subtitle) },
|
||||
trailingContent = {
|
||||
OutlinedButton(
|
||||
enabled = !granted,
|
||||
@@ -187,7 +185,9 @@ internal class PermissionStep : OnboardingStep {
|
||||
}
|
||||
}
|
||||
},
|
||||
supportingContent = { Text(text = subtitle) },
|
||||
colors = ListItemDefaults.colors(containerColor = Color.Transparent),
|
||||
content = { Text(text = title) },
|
||||
)
|
||||
}
|
||||
|
||||
@@ -201,15 +201,15 @@ internal class PermissionStep : OnboardingStep {
|
||||
) {
|
||||
ListItem(
|
||||
modifier = modifier,
|
||||
headlineContent = { Text(text = title) },
|
||||
supportingContent = { Text(text = subtitle) },
|
||||
trailingContent = {
|
||||
Switch(
|
||||
checked = granted,
|
||||
onCheckedChange = onToggleChange,
|
||||
)
|
||||
},
|
||||
supportingContent = { Text(text = subtitle) },
|
||||
colors = ListItemDefaults.colors(containerColor = Color.Transparent),
|
||||
content = { Text(text = title) },
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+7
-6
@@ -10,6 +10,7 @@ import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Check
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.ListItem
|
||||
import androidx.compose.material3.ListItemDefaults
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
@@ -71,12 +72,6 @@ class AppLanguageScreen : Screen() {
|
||||
modifier = Modifier.clickable {
|
||||
currentLanguage = it.langTag
|
||||
},
|
||||
headlineContent = { Text(it.displayName) },
|
||||
supportingContent = {
|
||||
it.localizedDisplayName?.let {
|
||||
Text(it)
|
||||
}
|
||||
},
|
||||
trailingContent = {
|
||||
if (currentLanguage == it.langTag) {
|
||||
Icon(
|
||||
@@ -86,6 +81,12 @@ class AppLanguageScreen : Screen() {
|
||||
)
|
||||
}
|
||||
},
|
||||
supportingContent = {
|
||||
it.localizedDisplayName?.let {
|
||||
Text(it)
|
||||
}
|
||||
},
|
||||
content = { Text(it.displayName) },
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user