From f984b266260e22173b9db624b610f7fa4960c1df Mon Sep 17 00:00:00 2001 From: Isira Seneviratne Date: Tue, 16 Jul 2024 19:09:38 +0530 Subject: [PATCH] Fix some modifiers --- .../main/java/org/schabi/newpipe/compose/comment/Comment.kt | 5 ++--- .../org/schabi/newpipe/compose/comment/CommentSection.kt | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/compose/comment/Comment.kt b/app/src/main/java/org/schabi/newpipe/compose/comment/Comment.kt index a1ec62a24..a5bf00da5 100644 --- a/app/src/main/java/org/schabi/newpipe/compose/comment/Comment.kt +++ b/app/src/main/java/org/schabi/newpipe/compose/comment/Comment.kt @@ -61,9 +61,9 @@ fun Comment(comment: CommentsInfoItem) { Row( modifier = Modifier - .fillMaxWidth() + .animateContentSize() .clickable { isExpanded = !isExpanded } - .padding(all = 8.dp), + .padding(8.dp), horizontalArrangement = Arrangement.spacedBy(8.dp) ) { if (ImageStrategy.shouldLoadImages()) { @@ -102,7 +102,6 @@ fun Comment(comment: CommentsInfoItem) { } Text( - modifier = Modifier.animateContentSize(), text = rememberParsedDescription(comment.commentText), // If the comment is expanded, we display all its content // otherwise we only display the first two lines diff --git a/app/src/main/java/org/schabi/newpipe/compose/comment/CommentSection.kt b/app/src/main/java/org/schabi/newpipe/compose/comment/CommentSection.kt index cf72ad7f4..7a9579fb1 100644 --- a/app/src/main/java/org/schabi/newpipe/compose/comment/CommentSection.kt +++ b/app/src/main/java/org/schabi/newpipe/compose/comment/CommentSection.kt @@ -84,7 +84,9 @@ private fun NoCommentsMessage(error: Throwable?) { } Column( - modifier = Modifier.fillMaxWidth().wrapContentSize(Alignment.Center), + modifier = Modifier + .fillMaxWidth() + .wrapContentSize(Alignment.Center), horizontalAlignment = Alignment.CenterHorizontally ) { Text(text = "(╯°-°)╯", fontSize = 35.sp)