mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Fix deprecation warning on androidx.compose.material3.ListItem
This commit is contained in:
+1
-1
@@ -178,7 +178,7 @@ private fun SessionCategory(deviceId: DeviceId) {
|
|||||||
val toastMessage = stringResource(CommonStrings.common_copied_to_clipboard)
|
val toastMessage = stringResource(CommonStrings.common_copied_to_clipboard)
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = { Text("DeviceId") },
|
content = { Text("DeviceId") },
|
||||||
supportingContent = { Text(text = deviceId.value) },
|
supportingContent = { Text(text = deviceId.value) },
|
||||||
onClick = {
|
onClick = {
|
||||||
context.copyToClipboard(
|
context.copyToClipboard(
|
||||||
|
|||||||
+2
-2
@@ -117,7 +117,7 @@ private fun GitCategory(
|
|||||||
val toastMessage = stringResource(CommonStrings.common_copied_to_clipboard)
|
val toastMessage = stringResource(CommonStrings.common_copied_to_clipboard)
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = { Text("Git branch") },
|
content = { Text("Git branch") },
|
||||||
supportingContent = { Text(text = gitBranch) },
|
supportingContent = { Text(text = gitBranch) },
|
||||||
onClick = {
|
onClick = {
|
||||||
context.copyToClipboard(
|
context.copyToClipboard(
|
||||||
@@ -127,7 +127,7 @@ private fun GitCategory(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = { Text("Git SHA") },
|
content = { Text("Git SHA") },
|
||||||
supportingContent = { Text(text = gitSha) },
|
supportingContent = { Text(text = gitSha) },
|
||||||
onClick = {
|
onClick = {
|
||||||
context.copyToClipboard(
|
context.copyToClipboard(
|
||||||
|
|||||||
+5
-5
@@ -130,7 +130,7 @@ private fun EmptyStatusRow(
|
|||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
) {
|
) {
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = {
|
content = {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.screen_settings_user_status_placeholder),
|
text = stringResource(R.string.screen_settings_user_status_placeholder),
|
||||||
modifier = Modifier.padding(vertical = 16.dp),
|
modifier = Modifier.padding(vertical = 16.dp),
|
||||||
@@ -153,7 +153,7 @@ private fun CurrentStatusRow(
|
|||||||
is DisplayedStatus.InCall -> "🎧" to stringResource(CommonStrings.common_on_a_call)
|
is DisplayedStatus.InCall -> "🎧" to stringResource(CommonStrings.common_on_a_call)
|
||||||
}
|
}
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = { Text(text = text, modifier = Modifier.padding(vertical = 16.dp)) },
|
content = { Text(text = text, modifier = Modifier.padding(vertical = 16.dp)) },
|
||||||
leadingContent = ListItemContent.Custom { EmojiText(emoji) },
|
leadingContent = ListItemContent.Custom { EmojiText(emoji) },
|
||||||
trailingContent = ListItemContent.Custom({
|
trailingContent = ListItemContent.Custom({
|
||||||
IconButton(
|
IconButton(
|
||||||
@@ -209,7 +209,7 @@ private fun UserStatusPickerBottomSheet(
|
|||||||
val predefinedUserStatus = UserStatus(emoji = predefined.emoji, text = label)
|
val predefinedUserStatus = UserStatus(emoji = predefined.emoji, text = label)
|
||||||
val isSelected = currentRawStatus == predefinedUserStatus
|
val isSelected = currentRawStatus == predefinedUserStatus
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = { Text(text = label) },
|
content = { Text(text = label) },
|
||||||
leadingContent = ListItemContent.Custom { EmojiText(predefined.emoji) },
|
leadingContent = ListItemContent.Custom { EmojiText(predefined.emoji) },
|
||||||
trailingContent = if (isSelected) {
|
trailingContent = if (isSelected) {
|
||||||
ListItemContent.Icon(IconSource.Vector(CompoundIcons.Check()), tintColor = ElementTheme.colors.iconAccentPrimary)
|
ListItemContent.Icon(IconSource.Vector(CompoundIcons.Check()), tintColor = ElementTheme.colors.iconAccentPrimary)
|
||||||
@@ -224,7 +224,7 @@ private fun UserStatusPickerBottomSheet(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = {
|
content = {
|
||||||
Text(text = stringResource(R.string.screen_settings_user_status_custom))
|
Text(text = stringResource(R.string.screen_settings_user_status_custom))
|
||||||
},
|
},
|
||||||
leadingContent = ListItemContent.Custom { EmojiText("✏️") },
|
leadingContent = ListItemContent.Custom { EmojiText("✏️") },
|
||||||
@@ -261,7 +261,7 @@ private fun CustomStatusInputRow(
|
|||||||
val focusRequester = remember { FocusRequester() }
|
val focusRequester = remember { FocusRequester() }
|
||||||
LaunchedEffect(Unit) { focusRequester.requestFocus() }
|
LaunchedEffect(Unit) { focusRequester.requestFocus() }
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = {
|
content = {
|
||||||
TextField(
|
TextField(
|
||||||
modifier = Modifier.focusRequester(focusRequester),
|
modifier = Modifier.focusRequester(focusRequester),
|
||||||
state = textFieldState,
|
state = textFieldState,
|
||||||
|
|||||||
Reference in New Issue
Block a user