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
@@ -140,7 +140,7 @@ private fun CheckableSpaceListItem(
|
||||
enabled: Boolean = true,
|
||||
) {
|
||||
ListItem(
|
||||
headlineContent = {
|
||||
content = {
|
||||
Text(text = headlineText)
|
||||
},
|
||||
supportingContent = supportingText?.let {
|
||||
|
||||
+9
-9
@@ -235,7 +235,7 @@ private fun RoomAccessSection(
|
||||
modifier = modifier,
|
||||
) {
|
||||
ListItem(
|
||||
headlineContent = { Text(text = stringResource(R.string.screen_security_and_privacy_room_access_anyone_option_title)) },
|
||||
content = { Text(text = stringResource(R.string.screen_security_and_privacy_room_access_anyone_option_title)) },
|
||||
supportingContent = { Text(text = stringResource(R.string.screen_security_and_privacy_room_access_anyone_option_description)) },
|
||||
trailingContent = ListItemContent.RadioButton(selected = edited == SecurityAndPrivacyRoomAccess.Anyone),
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Public())),
|
||||
@@ -243,7 +243,7 @@ private fun RoomAccessSection(
|
||||
)
|
||||
if (state.showSpaceMemberOption) {
|
||||
ListItem(
|
||||
headlineContent = { Text(text = stringResource(R.string.screen_security_and_privacy_room_access_space_members_option_title)) },
|
||||
content = { Text(text = stringResource(R.string.screen_security_and_privacy_room_access_space_members_option_title)) },
|
||||
supportingContent = {
|
||||
Text(text = state.spaceMemberDescription())
|
||||
},
|
||||
@@ -255,7 +255,7 @@ private fun RoomAccessSection(
|
||||
}
|
||||
if (state.showAskToJoinOption) {
|
||||
ListItem(
|
||||
headlineContent = { Text(text = stringResource(R.string.screen_security_and_privacy_ask_to_join_option_title)) },
|
||||
content = { Text(text = stringResource(R.string.screen_security_and_privacy_ask_to_join_option_title)) },
|
||||
supportingContent = { Text(text = stringResource(R.string.screen_security_and_privacy_ask_to_join_option_description)) },
|
||||
trailingContent = ListItemContent.RadioButton(selected = edited == SecurityAndPrivacyRoomAccess.AskToJoin),
|
||||
onClick = { onSelectOption(SecurityAndPrivacyRoomAccess.AskToJoin) },
|
||||
@@ -265,7 +265,7 @@ private fun RoomAccessSection(
|
||||
}
|
||||
if (state.showAskToJoinWithSpaceMemberOption) {
|
||||
ListItem(
|
||||
headlineContent = { Text(text = stringResource(R.string.screen_security_and_privacy_ask_to_join_option_title)) },
|
||||
content = { Text(text = stringResource(R.string.screen_security_and_privacy_ask_to_join_option_title)) },
|
||||
supportingContent = { Text(text = state.askToJoinWithSpaceMembersDescription()) },
|
||||
trailingContent = ListItemContent.RadioButton(selected = edited is SecurityAndPrivacyRoomAccess.AskToJoinWithSpaceMember),
|
||||
onClick = ::onAskToJoinWithSpaceMembersClick,
|
||||
@@ -274,7 +274,7 @@ private fun RoomAccessSection(
|
||||
)
|
||||
}
|
||||
ListItem(
|
||||
headlineContent = { Text(text = stringResource(R.string.screen_security_and_privacy_room_access_invite_only_option_title)) },
|
||||
content = { Text(text = stringResource(R.string.screen_security_and_privacy_room_access_invite_only_option_title)) },
|
||||
supportingContent = { Text(text = stringResource(R.string.screen_security_and_privacy_room_access_invite_only_option_description)) },
|
||||
trailingContent = ListItemContent.RadioButton(selected = edited == SecurityAndPrivacyRoomAccess.InviteOnly),
|
||||
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Lock())),
|
||||
@@ -330,7 +330,7 @@ private fun RoomAddressSection(
|
||||
modifier = modifier,
|
||||
) {
|
||||
ListItem(
|
||||
headlineContent = {
|
||||
content = {
|
||||
Text(text = roomAddress ?: stringResource(R.string.screen_security_and_privacy_add_room_address_action))
|
||||
},
|
||||
trailingContent = if (roomAddress.isNullOrEmpty()) ListItemContent.Icon(IconSource.Vector(CompoundIcons.Plus())) else null,
|
||||
@@ -340,7 +340,7 @@ private fun RoomAddressSection(
|
||||
)
|
||||
|
||||
ListItem(
|
||||
headlineContent = { Text(text = stringResource(R.string.screen_security_and_privacy_room_directory_visibility_toggle_title)) },
|
||||
content = { Text(text = stringResource(R.string.screen_security_and_privacy_room_directory_visibility_toggle_title)) },
|
||||
supportingContent = {
|
||||
Text(text = stringResource(R.string.screen_security_and_privacy_room_directory_visibility_toggle_description, homeserverName))
|
||||
},
|
||||
@@ -387,7 +387,7 @@ private fun EncryptionSection(
|
||||
modifier = modifier,
|
||||
) {
|
||||
ListItem(
|
||||
headlineContent = { Text(text = stringResource(R.string.screen_security_and_privacy_encryption_toggle_title)) },
|
||||
content = { Text(text = stringResource(R.string.screen_security_and_privacy_encryption_toggle_title)) },
|
||||
supportingContent = { Text(text = stringResource(R.string.screen_security_and_privacy_encryption_section_footer)) },
|
||||
trailingContent = ListItemContent.Switch(
|
||||
checked = isRoomEncrypted,
|
||||
@@ -459,7 +459,7 @@ private fun HistoryVisibilityItem(
|
||||
SecurityAndPrivacyHistoryVisibility.WorldReadable -> stringResource(R.string.screen_security_and_privacy_room_history_anyone_option_title)
|
||||
}
|
||||
ListItem(
|
||||
headlineContent = { Text(text = headlineText) },
|
||||
content = { Text(text = headlineText) },
|
||||
trailingContent = ListItemContent.RadioButton(selected = isSelected, enabled = isEnabled),
|
||||
onClick = { onSelectOption(option) },
|
||||
enabled = isEnabled,
|
||||
|
||||
Reference in New Issue
Block a user