Fix deprecation warning on androidx.compose.material3.ListItem

This commit is contained in:
Benoit Marty
2026-07-09 16:19:44 +02:00
committed by Benoit Marty
parent d2b4a85453
commit d1cf1aa09f
56 changed files with 205 additions and 206 deletions
@@ -137,7 +137,7 @@ private fun VerifyUserSection(
) {
if (state.verificationState == UserProfileVerificationState.UNVERIFIED) {
ListItem(
headlineContent = { Text(stringResource(CommonStrings.common_verify_user)) },
content = { Text(stringResource(CommonStrings.common_verify_user)) },
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Lock())),
onClick = onVerifyClick,
)
@@ -80,14 +80,14 @@ private fun PreferenceBlockUser(
}
if (isBlocked.orFalse()) {
ListItem(
headlineContent = { Text(stringResource(R.string.screen_dm_details_unblock_user)) },
content = { Text(stringResource(R.string.screen_dm_details_unblock_user)) },
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Block())),
onClick = { if (!isLoading) eventSink(UserProfileEvents.UnblockUser(needsConfirmation = true)) },
trailingContent = if (isLoading) ListItemContent.Custom(loadingCurrentValue) else null,
)
} else {
ListItem(
headlineContent = { Text(stringResource(R.string.screen_dm_details_block_user)) },
content = { Text(stringResource(R.string.screen_dm_details_block_user)) },
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Block())),
style = ListItemStyle.Destructive,
onClick = { if (!isLoading) eventSink(UserProfileEvents.BlockUser(needsConfirmation = true)) },