mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 15:29:15 +01:00
address the review: keep the stored seed on a failed decode, one cache, static bar colour
- resolve() no longer discards a stored seed when the bitmap cannot be decoded (it used to return null, dropping the theme for pre-v12 rows); it falls back to the stored pair - fold the busy flag into the seed cache value so eviction is atomic (a busy entry could be evicted from the separate flag LRU while its seed stayed, silently disabling the scrim) - the artist top bar samples heroBarColor at scroll 0 to match the static HeroGradient, and drops the wrong scroll estimate and per-pixel recomposition - rememberOverlaidNameBusy keys its state so the cached flag is read on key change, not only the first composition; bottomBandBusy bails out on an empty bitmap
This commit is contained in:
@@ -151,14 +151,7 @@ fun ArtistDetailScreen(
|
||||
BoxWithConstraints(modifier.fillMaxSize().background(Color.Black)) {
|
||||
val screenHeightPx = with(density) { maxHeight.toPx() }
|
||||
val barHeightPx = with(density) { barHeight.toPx() }
|
||||
val scrollPx by remember {
|
||||
derivedStateOf {
|
||||
val index = listState.firstVisibleItemIndex
|
||||
val before = if (index <= 0) 0f else with(density) { ART_HEIGHT.toPx() } * index
|
||||
before + listState.firstVisibleItemScrollOffset
|
||||
}
|
||||
}
|
||||
val barColor = heroBarColor(artwork, scrollPx, barHeightPx, screenHeightPx)
|
||||
val barColor = heroBarColor(artwork, 0f, barHeightPx, screenHeightPx)
|
||||
HeroGradient(
|
||||
colors = artwork,
|
||||
scrollPx = { 0f },
|
||||
|
||||
Reference in New Issue
Block a user