Skip to content

Commit

Permalink
Animate comment expand/collapse
Browse files Browse the repository at this point in the history
  • Loading branch information
Isira-Seneviratne committed Jul 9, 2024
1 parent b602f04 commit f9c1a1e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f9c1a1e

Please sign in to comment.