mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 07:29:14 +01:00
address review nits: cover art flags, artist retry, subtitle fallback
This commit is contained in:
@@ -33,8 +33,8 @@ fun CoverArt(
|
||||
showPlaceholder: Boolean = true,
|
||||
) {
|
||||
val context = LocalPlatformContext.current
|
||||
var failed by remember(ref) { mutableStateOf(false) }
|
||||
var thumbnailLoaded by remember(thumbnailRef) { mutableStateOf(false) }
|
||||
var failed by remember(ref, thumbnailRef) { mutableStateOf(false) }
|
||||
var thumbnailLoaded by remember(ref, thumbnailRef) { mutableStateOf(false) }
|
||||
Box(modifier = modifier.background(MaterialTheme.colorScheme.surfaceVariant)) {
|
||||
if (showPlaceholder || (failed && !thumbnailLoaded)) {
|
||||
Text(
|
||||
|
||||
@@ -48,6 +48,7 @@ class ArtistDetailViewModel(
|
||||
}
|
||||
|
||||
private suspend fun resolveArt(artist: Artist): Pair<CoverArtRef?, CoverArtRef?> {
|
||||
if (artist.coverArt == null) return null to null
|
||||
repeat(3) { attempt ->
|
||||
val full = sourceRepository.coverArt(artist.coverArt)
|
||||
if (full != null) {
|
||||
|
||||
@@ -81,7 +81,7 @@ fun MiniPlayer(
|
||||
modifier = Modifier.basicMarquee(),
|
||||
)
|
||||
Text(
|
||||
text = item.artist.orEmpty(),
|
||||
text = item.artist ?: item.album.orEmpty(),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
maxLines = 1,
|
||||
|
||||
Reference in New Issue
Block a user