mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Fix deprecation warning on androidx.compose.material3.ListItem
This commit is contained in:
committed by
Benoit Marty
parent
d2b4a85453
commit
d1cf1aa09f
+1
-1
@@ -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,
|
||||
)
|
||||
|
||||
+2
-2
@@ -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)) },
|
||||
|
||||
Reference in New Issue
Block a user