fix(android): detekt LongMethod on NowPlayingScreen (61/60)

Adding the four shuffle/repeat parameters to the BottomActionsRow
call pushed the function 1 line over the 60-line cap. Extracted
the Column body into a private NowPlayingBody helper composable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-26 14:53:55 -04:00
parent 03a6dc4e5d
commit a9b3c936f1
@@ -96,6 +96,24 @@ fun NowPlayingScreen(
snackbarHost = { SnackbarHost(snackbarHostState) },
containerColor = MaterialTheme.colorScheme.background,
) { inner ->
NowPlayingBody(
inner = inner,
state = state,
track = track,
navController = navController,
viewModel = viewModel,
)
}
}
@Composable
private fun NowPlayingBody(
inner: androidx.compose.foundation.layout.PaddingValues,
state: com.fabledsword.minstrel.player.PlayerUiState,
track: com.fabledsword.minstrel.models.TrackRef,
navController: NavHostController,
viewModel: PlayerViewModel,
) {
Column(
modifier = Modifier
.fillMaxSize()
@@ -106,11 +124,7 @@ fun NowPlayingScreen(
) {
NowPlayingCover(coverUrl = track.coverUrl, contentDescription = track.title)
Spacer(Modifier.height(24.dp))
TrackHeader(
title = track.title,
artist = track.artistName,
album = track.albumTitle,
)
TrackHeader(title = track.title, artist = track.artistName, album = track.albumTitle)
Spacer(Modifier.height(24.dp))
ScrubberRow(
positionMs = state.positionMs,
@@ -134,7 +148,6 @@ fun NowPlayingScreen(
onCycleRepeat = viewModel::cycleRepeat,
)
}
}
}
@Composable