Skip to content

Commit b80039d

Browse files
committed
Clear semantics of other message author to prevent duplication with the avatar semantics
1 parent a0fc044 commit b80039d

File tree

1 file changed

+6
-2
lines changed
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages

1 file changed

+6
-2
lines changed

stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/MessageFooter.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import androidx.compose.ui.Alignment
2929
import androidx.compose.ui.Modifier
3030
import androidx.compose.ui.platform.LocalContext
3131
import androidx.compose.ui.platform.testTag
32+
import androidx.compose.ui.semantics.clearAndSetSemantics
33+
import androidx.compose.ui.semantics.testTag
3234
import androidx.compose.ui.text.style.TextOverflow
3335
import androidx.compose.ui.unit.dp
3436
import io.getstream.chat.android.client.extensions.getCreatedAtOrNull
@@ -85,9 +87,11 @@ public fun MessageFooter(
8587
if (!messageItem.isMine) {
8688
Text(
8789
modifier = Modifier
90+
.clearAndSetSemantics {
91+
testTag = "Stream_MessageAuthorName"
92+
}
8893
.padding(end = 8.dp)
89-
.weight(1f, fill = false)
90-
.testTag("Stream_MessageAuthorName"),
94+
.weight(1f, fill = false),
9195
text = message.user.name,
9296
style = ChatTheme.typography.footnote,
9397
overflow = TextOverflow.Ellipsis,

0 commit comments

Comments
 (0)