@@ -20,6 +20,7 @@ import androidx.compose.ui.draw.clip
2020import androidx.compose.ui.platform.LocalContext
2121import androidx.compose.ui.res.painterResource
2222import androidx.compose.ui.res.stringResource
23+ import androidx.compose.ui.text.style.TextOverflow
2324import androidx.compose.ui.tooling.preview.Preview
2425import androidx.compose.ui.unit.dp
2526import coil.compose.AsyncImage
@@ -43,11 +44,13 @@ fun CommentRepliesHeader(comment: CommentsInfoItem) {
4344 verticalAlignment = Alignment .CenterVertically
4445 ) {
4546 Row (
46- modifier = Modifier .clickable {
47- NavigationHelper .openCommentAuthorIfPresent(context, comment)
48- },
47+ modifier = Modifier
48+ .padding(end = 12 .dp)
49+ .clip(CircleShape )
50+ .clickable { NavigationHelper .openCommentAuthorIfPresent(context, comment) }
51+ .weight(1.0f , true ),
4952 horizontalArrangement = Arrangement .spacedBy(8 .dp),
50- verticalAlignment = Alignment .CenterVertically
53+ verticalAlignment = Alignment .CenterVertically ,
5154 ) {
5255 AsyncImage (
5356 model = ImageStrategy .choosePreferredImage(comment.uploaderAvatars),
@@ -60,14 +63,18 @@ fun CommentRepliesHeader(comment: CommentsInfoItem) {
6063 )
6164
6265 Column {
63- Text (text = comment.uploaderName)
66+ Text (
67+ text = comment.uploaderName,
68+ maxLines = 1 ,
69+ overflow = TextOverflow .Ellipsis ,
70+ style = MaterialTheme .typography.titleSmall,
71+ )
6472
6573 Text (
66- color = MaterialTheme .colorScheme.secondary,
67- style = MaterialTheme .typography.bodySmall,
6874 text = Localization .relativeTimeOrTextual(
6975 context, comment.uploadDate, comment.textualUploadDate
70- )
76+ ),
77+ style = MaterialTheme .typography.bodySmall,
7178 )
7279 }
7380 }
@@ -80,7 +87,10 @@ fun CommentRepliesHeader(comment: CommentsInfoItem) {
8087 painter = painterResource(R .drawable.ic_thumb_up),
8188 contentDescription = stringResource(R .string.detail_likes_img_view_description)
8289 )
83- Text (text = Localization .likeCount(context, comment.likeCount))
90+ Text (
91+ text = Localization .likeCount(context, comment.likeCount),
92+ maxLines = 1 ,
93+ )
8494
8595 if (comment.isHeartedByUploader) {
8696 Image (
@@ -100,7 +110,8 @@ fun CommentRepliesHeader(comment: CommentsInfoItem) {
100110
101111 DescriptionText (
102112 description = comment.commentText,
103- style = MaterialTheme .typography.bodyMedium
113+ style = MaterialTheme .typography.bodyMedium,
114+ modifier = Modifier .padding(8 .dp)
104115 )
105116 }
106117}
@@ -111,7 +122,7 @@ fun CommentRepliesHeader(comment: CommentsInfoItem) {
111122fun CommentRepliesHeaderPreview () {
112123 val comment = CommentsInfoItem (
113124 commentText = Description (" Hello world!" , Description .PLAIN_TEXT ),
114- uploaderName = " Test" ,
125+ uploaderName = " Test really long lorem ipsum dolor sit " ,
115126 likeCount = 1000 ,
116127 isPinned = true ,
117128 isHeartedByUploader = true
0 commit comments