|
1 | 1 | package org.schabi.newpipe.compose.playlist |
2 | 2 |
|
3 | 3 | import android.content.res.Configuration |
| 4 | +import androidx.compose.animation.animateContentSize |
4 | 5 | import androidx.compose.foundation.BorderStroke |
5 | 6 | import androidx.compose.foundation.Image |
6 | 7 | import androidx.compose.foundation.border |
@@ -52,19 +53,10 @@ import java.util.concurrent.TimeUnit |
52 | 53 | fun PlaylistHeader(playlistInfo: PlaylistInfo, totalDuration: Long) { |
53 | 54 | val context = LocalContext.current |
54 | 55 |
|
55 | | - Column( |
56 | | - modifier = Modifier.padding(12.dp), |
57 | | - verticalArrangement = Arrangement.spacedBy(4.dp) |
58 | | - ) { |
59 | | - Text( |
60 | | - text = playlistInfo.name, |
61 | | - style = MaterialTheme.typography.titleMedium |
62 | | - ) |
| 56 | + Column(modifier = Modifier.padding(12.dp), verticalArrangement = Arrangement.spacedBy(4.dp)) { |
| 57 | + Text(text = playlistInfo.name, style = MaterialTheme.typography.titleMedium) |
63 | 58 |
|
64 | | - Row( |
65 | | - modifier = Modifier.fillMaxWidth(), |
66 | | - horizontalArrangement = Arrangement.SpaceBetween |
67 | | - ) { |
| 59 | + Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) { |
68 | 60 | Row( |
69 | 61 | verticalAlignment = Alignment.CenterVertically, |
70 | 62 | horizontalArrangement = Arrangement.spacedBy(4.dp), |
@@ -124,6 +116,7 @@ fun PlaylistHeader(playlistInfo: PlaylistInfo, totalDuration: Long) { |
124 | 116 | val parsedDescription = rememberParsedDescription(description) |
125 | 117 |
|
126 | 118 | Text( |
| 119 | + modifier = Modifier.animateContentSize(), |
127 | 120 | text = parsedDescription, |
128 | 121 | maxLines = if (isExpanded) Int.MAX_VALUE else 5, |
129 | 122 | style = MaterialTheme.typography.bodyMedium, |
|
0 commit comments