Address compose and xmlutil deprecations (#3507)

This commit is contained in:
AntsyLich
2026-07-03 01:15:42 +06:00
committed by GitHub
parent f6632940fa
commit dfed97edc8
5 changed files with 51 additions and 52 deletions
@@ -268,27 +268,7 @@ class MigrationConfigScreen(private val mangaIds: Collection<Long>) : Screen() {
onClick: () -> Unit,
) {
ListItem(
headlineContent = {
Row(
horizontalArrangement = Arrangement.spacedBy(MaterialTheme.padding.small),
verticalAlignment = Alignment.CenterVertically,
) {
SourceIcon(source = source.source)
Text(
text = source.name,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
style = MaterialTheme.typography.bodyMedium,
modifier = Modifier.weight(1f),
)
if (showLanguage) {
Pill(
text = LocaleHelper.getShortDisplayName(source.shortLanguage, uppercase = true),
style = MaterialTheme.typography.bodySmall,
)
}
}
},
modifier = Modifier.clickable(onClick = onClick),
trailingContent = if (dragEnabled) {
{
Icon(
@@ -302,11 +282,28 @@ class MigrationConfigScreen(private val mangaIds: Collection<Long>) : Screen() {
} else {
null
},
colors = ListItemDefaults.colors(
containerColor = Color.Transparent,
),
modifier = Modifier.clickable(onClick = onClick),
)
colors = ListItemDefaults.colors(containerColor = Color.Transparent),
) {
Row(
horizontalArrangement = Arrangement.spacedBy(MaterialTheme.padding.small),
verticalAlignment = Alignment.CenterVertically,
) {
SourceIcon(source = source.source)
Text(
text = source.name,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
style = MaterialTheme.typography.bodyMedium,
modifier = Modifier.weight(1f),
)
if (showLanguage) {
Pill(
text = LocaleHelper.getShortDisplayName(source.shortLanguage, uppercase = true),
style = MaterialTheme.typography.bodySmall,
)
}
}
}
}
private class ScreenModel(