mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-07-05 11:32:58 +00:00
Improved PlaylistHeader
This commit is contained in:
parent
9dfd064d86
commit
b9556a1331
@ -57,12 +57,12 @@ fun PlaylistHeader(playlistInfo: PlaylistInfo, totalDuration: Long) {
|
|||||||
Text(text = playlistInfo.name, style = MaterialTheme.typography.titleMedium)
|
Text(text = playlistInfo.name, style = MaterialTheme.typography.titleMedium)
|
||||||
|
|
||||||
Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) {
|
Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) {
|
||||||
|
val clickable = playlistInfo.uploaderName != null && playlistInfo.uploaderUrl != null
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.spacedBy(4.dp),
|
horizontalArrangement = Arrangement.spacedBy(4.dp),
|
||||||
modifier = Modifier.let {
|
modifier = Modifier.clickable(clickable) {
|
||||||
if (playlistInfo.uploaderName != null && playlistInfo.uploaderUrl != null) {
|
|
||||||
it.clickable {
|
|
||||||
try {
|
try {
|
||||||
NavigationHelper.openChannelFragment(
|
NavigationHelper.openChannelFragment(
|
||||||
(context as FragmentActivity).supportFragmentManager,
|
(context as FragmentActivity).supportFragmentManager,
|
||||||
@ -73,8 +73,6 @@ fun PlaylistHeader(playlistInfo: PlaylistInfo, totalDuration: Long) {
|
|||||||
ErrorUtil.showUiErrorSnackbar(context, "Opening channel fragment", e)
|
ErrorUtil.showUiErrorSnackbar(context, "Opening channel fragment", e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else it
|
|
||||||
}
|
|
||||||
) {
|
) {
|
||||||
val imageModifier = Modifier
|
val imageModifier = Modifier
|
||||||
.size(24.dp)
|
.size(24.dp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user