mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-02-03 12:49:14 +00:00
Animate comment expand/collapse
This commit is contained in:
parent
3c55d956a0
commit
f438ba4e02
@ -1,6 +1,7 @@
|
|||||||
package org.schabi.newpipe.compose.comment
|
package org.schabi.newpipe.compose.comment
|
||||||
|
|
||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
|
import androidx.compose.animation.animateContentSize
|
||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
@ -101,6 +102,7 @@ fun Comment(comment: CommentsInfoItem) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
|
modifier = Modifier.animateContentSize(),
|
||||||
text = rememberParsedDescription(comment.commentText),
|
text = rememberParsedDescription(comment.commentText),
|
||||||
// If the comment is expanded, we display all its content
|
// If the comment is expanded, we display all its content
|
||||||
// otherwise we only display the first two lines
|
// otherwise we only display the first two lines
|
||||||
|
Loading…
Reference in New Issue
Block a user