From e639b02fed7a7898c3798155ce79d274d56b7bff Mon Sep 17 00:00:00 2001 From: Isira Seneviratne Date: Tue, 9 Jul 2024 21:45:18 +0530 Subject: [PATCH] Animate comment expand/collapse --- app/src/main/java/org/schabi/newpipe/compose/comment/Comment.kt | 2 ++ 1 file changed, 2 insertions(+) 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 b372edff9..a1ec62a24 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 @@ -1,6 +1,7 @@ package org.schabi.newpipe.compose.comment import android.content.res.Configuration +import androidx.compose.animation.animateContentSize import androidx.compose.foundation.Image import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement @@ -101,6 +102,7 @@ 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