mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 15:29:15 +01:00
rework song rows and now playing, add star to the notification
- star/unstar from the context menu fills the icon, then dismisses - drop the star badge from album art and song rows - song rows keep a track-number column (natural order fallback), shrink four-digit numbers, and gain right-hand download and duration columns - the play indicator always sits in the left column, overlaid on cover art with an inset primary outline when art is shown - now playing is left aligned with a star toggle - the media notification gets a star button backed by a session command
This commit is contained in:
@@ -68,7 +68,6 @@ import com.subtracks.ui.components.ContextMenuHost
|
||||
import com.subtracks.ui.components.CoverArt
|
||||
import com.subtracks.ui.components.ItemActions
|
||||
import com.subtracks.ui.components.MenuTarget
|
||||
import com.subtracks.ui.components.StarredBadge
|
||||
import com.subtracks.ui.components.rememberViewportFill
|
||||
import com.subtracks.ui.theme.ArtworkColors
|
||||
import com.subtracks.ui.theme.ArtworkTheme
|
||||
@@ -112,7 +111,7 @@ fun ArtistDetailRoute(
|
||||
onAlbumClick: (Album) -> Unit,
|
||||
onViewAlbum: (String) -> Unit,
|
||||
contextMenuHost: ContextMenuHost? = null,
|
||||
setStar: suspend (StarType, String, Boolean) -> Result<Unit>,
|
||||
setStar: (StarType, String, Boolean) -> Unit,
|
||||
viewModel: ArtistDetailViewModel = koinViewModel(key = artistId) { parametersOf(artistId) },
|
||||
playbackController: PlaybackController = koinInject(),
|
||||
) {
|
||||
@@ -284,21 +283,13 @@ fun ArtistDetailScreen(
|
||||
onLongClick = { onAlbumLongClick(MenuTarget.Album(album, thumbnail)) },
|
||||
).onSizeChanged { albumHeightPx = it.height.toFloat() },
|
||||
) {
|
||||
Box {
|
||||
CoverArt(
|
||||
ref = art,
|
||||
name = album.name,
|
||||
thumbnailRef = thumbnail,
|
||||
showPlaceholder = art == null,
|
||||
modifier = Modifier.fillMaxWidth().aspectRatio(1f).clip(RoundedCornerShape(2.dp)),
|
||||
)
|
||||
StarredBadge(
|
||||
starred = album.starred != null,
|
||||
size = 16.dp,
|
||||
shadow = true,
|
||||
modifier = Modifier.align(Alignment.TopEnd).padding(6.dp),
|
||||
)
|
||||
}
|
||||
CoverArt(
|
||||
ref = art,
|
||||
name = album.name,
|
||||
thumbnailRef = thumbnail,
|
||||
showPlaceholder = art == null,
|
||||
modifier = Modifier.fillMaxWidth().aspectRatio(1f).clip(RoundedCornerShape(2.dp)),
|
||||
)
|
||||
Text(
|
||||
text = album.name,
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
|
||||
Reference in New Issue
Block a user