1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-22 02:53:09 +01:00

Animate comment expand/collapse

This commit is contained in:
Isira Seneviratne 2024-07-09 21:45:18 +05:30
parent ac1ca1412d
commit e639b02fed

View File

@ -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