mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 15:11:58 +01:00
library: drop shuffle fab from album and playlist detail
This commit is contained in:
@@ -98,7 +98,6 @@ fun HeroDetailScaffold(
|
||||
header: @Composable (controlsModifier: Modifier, topInset: Dp) -> Unit,
|
||||
content: LazyListScope.(rowModifier: Modifier) -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
onShuffle: (() -> Unit)? = null,
|
||||
) {
|
||||
val effectiveArtwork = artwork ?: baseArtworkColors()
|
||||
CompositionLocalProvider(LocalContentColor provides MaterialTheme.colorScheme.onBackground) {
|
||||
@@ -151,7 +150,7 @@ fun HeroDetailScaffold(
|
||||
state = listState,
|
||||
contentPadding =
|
||||
PaddingValues(
|
||||
bottom = (if (onShuffle != null) 88.dp else 16.dp) + with(density) { navBarBottom.toDp() },
|
||||
bottom = 16.dp + with(density) { navBarBottom.toDp() },
|
||||
),
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
) {
|
||||
@@ -202,17 +201,6 @@ fun HeroDetailScaffold(
|
||||
onClickLabel = stringResource(R.string.scroll_to_top),
|
||||
) { scope.launch { listState.animateScrollToItem(0) } },
|
||||
)
|
||||
|
||||
if (onShuffle != null) {
|
||||
ShuffleFab(
|
||||
onClick = onShuffle,
|
||||
visible = barFraction > 0f,
|
||||
modifier =
|
||||
Modifier
|
||||
.align(Alignment.BottomEnd)
|
||||
.padding(end = 16.dp, bottom = 16.dp + with(density) { navBarBottom.toDp() }),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,7 +248,6 @@ fun AlbumDetailScreen(
|
||||
}
|
||||
},
|
||||
modifier = modifier,
|
||||
onShuffle = onShuffle.takeIf { songs.isNotEmpty() },
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,6 @@ fun PlaylistDetailScreen(
|
||||
}
|
||||
},
|
||||
modifier = modifier,
|
||||
onShuffle = onShuffle.takeIf { songs.itemCount > 0 },
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user