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:
+1
-1
@@ -178,7 +178,7 @@ private fun SessionCategory(deviceId: DeviceId) {
|
||||
val toastMessage = stringResource(CommonStrings.common_copied_to_clipboard)
|
||||
val context = LocalContext.current
|
||||
ListItem(
|
||||
headlineContent = { Text("DeviceId") },
|
||||
content = { Text("DeviceId") },
|
||||
supportingContent = { Text(text = deviceId.value) },
|
||||
onClick = {
|
||||
context.copyToClipboard(
|
||||
|
||||
+2
-2
@@ -117,7 +117,7 @@ private fun GitCategory(
|
||||
val toastMessage = stringResource(CommonStrings.common_copied_to_clipboard)
|
||||
val context = LocalContext.current
|
||||
ListItem(
|
||||
headlineContent = { Text("Git branch") },
|
||||
content = { Text("Git branch") },
|
||||
supportingContent = { Text(text = gitBranch) },
|
||||
onClick = {
|
||||
context.copyToClipboard(
|
||||
@@ -127,7 +127,7 @@ private fun GitCategory(
|
||||
}
|
||||
)
|
||||
ListItem(
|
||||
headlineContent = { Text("Git SHA") },
|
||||
content = { Text("Git SHA") },
|
||||
supportingContent = { Text(text = gitSha) },
|
||||
onClick = {
|
||||
context.copyToClipboard(
|
||||
|
||||
+5
-5
@@ -130,7 +130,7 @@ private fun EmptyStatusRow(
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
ListItem(
|
||||
headlineContent = {
|
||||
content = {
|
||||
Text(
|
||||
text = stringResource(R.string.screen_settings_user_status_placeholder),
|
||||
modifier = Modifier.padding(vertical = 16.dp),
|
||||
@@ -153,7 +153,7 @@ private fun CurrentStatusRow(
|
||||
is DisplayedStatus.InCall -> "🎧" to stringResource(CommonStrings.common_on_a_call)
|
||||
}
|
||||
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) },
|
||||
trailingContent = ListItemContent.Custom({
|
||||
IconButton(
|
||||
@@ -209,7 +209,7 @@ private fun UserStatusPickerBottomSheet(
|
||||
val predefinedUserStatus = UserStatus(emoji = predefined.emoji, text = label)
|
||||
val isSelected = currentRawStatus == predefinedUserStatus
|
||||
ListItem(
|
||||
headlineContent = { Text(text = label) },
|
||||
content = { Text(text = label) },
|
||||
leadingContent = ListItemContent.Custom { EmojiText(predefined.emoji) },
|
||||
trailingContent = if (isSelected) {
|
||||
ListItemContent.Icon(IconSource.Vector(CompoundIcons.Check()), tintColor = ElementTheme.colors.iconAccentPrimary)
|
||||
@@ -224,7 +224,7 @@ private fun UserStatusPickerBottomSheet(
|
||||
)
|
||||
}
|
||||
ListItem(
|
||||
headlineContent = {
|
||||
content = {
|
||||
Text(text = stringResource(R.string.screen_settings_user_status_custom))
|
||||
},
|
||||
leadingContent = ListItemContent.Custom { EmojiText("✏️") },
|
||||
@@ -261,7 +261,7 @@ private fun CustomStatusInputRow(
|
||||
val focusRequester = remember { FocusRequester() }
|
||||
LaunchedEffect(Unit) { focusRequester.requestFocus() }
|
||||
ListItem(
|
||||
headlineContent = {
|
||||
content = {
|
||||
TextField(
|
||||
modifier = Modifier.focusRequester(focusRequester),
|
||||
state = textFieldState,
|
||||
|
||||
Reference in New Issue
Block a user