fix(android): Search kebab + hide dead Liked-cap selector (audit v3 §4.8 + Bug-3)
§4.8: SearchScreen's TopAppBar had no MainAppBarActions kebab —
users in Search couldn't reach Settings / Discover / Requests /
Admin / Sign-out without first hitting Back. Added the standard
kebab next to the existing clear-search button.
Bug-3: Storage card's "Liked cache limit" dropdown persisted a
value that was never enforced (PlayerFactory.kt:43-47 only consumes
rollingCapBytes). Per the established pattern for the prefetch +
cache-liked toggles (hidden in 4d7a4312 for the same reason), hide
the Liked cap dropdown until per-bucket eviction lands. Renamed
the remaining one to just "Cache limit" so it reads honestly. The
CacheSettings field stays persisted so the control returns once
per-bucket SimpleCache eviction is wired.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -58,7 +58,9 @@ import com.fabledsword.minstrel.models.SearchResponseRef
|
||||
import com.fabledsword.minstrel.models.TrackRef
|
||||
import com.fabledsword.minstrel.nav.AlbumDetail
|
||||
import com.fabledsword.minstrel.nav.ArtistDetail
|
||||
import com.fabledsword.minstrel.nav.Search as SearchRoute
|
||||
import com.fabledsword.minstrel.shared.widgets.LoadingCentered
|
||||
import com.fabledsword.minstrel.shared.widgets.MainAppBarActions
|
||||
import com.fabledsword.minstrel.shared.widgets.TrackCoverThumb
|
||||
import com.fabledsword.minstrel.shared.widgets.trackactions.TrackActionsButton
|
||||
import com.fabledsword.minstrel.shared.widgets.trackactions.TrackActionsViewModel
|
||||
@@ -105,6 +107,10 @@ fun SearchScreen(
|
||||
Icon(Lucide.X, contentDescription = "Clear")
|
||||
}
|
||||
}
|
||||
MainAppBarActions(
|
||||
navController = navController,
|
||||
currentRouteName = SearchRoute::class.qualifiedName,
|
||||
)
|
||||
},
|
||||
)
|
||||
},
|
||||
|
||||
@@ -56,24 +56,22 @@ fun StorageCard(viewModel: StorageViewModel = hiltViewModel()) {
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
)
|
||||
UsageRow(usedBytes = state.usedBytes)
|
||||
// Per-bucket caps + prefetch toggle + cache-liked toggle
|
||||
// intentionally omitted in v1. The underlying systems
|
||||
// (per-bucket SimpleCache eviction, MetadataPrefetcher,
|
||||
// pin-on-like flow) don't exist on Android yet — surfacing
|
||||
// controls that silently do nothing is worse than hiding
|
||||
// them. Only the rolling cap is wired
|
||||
// (PlayerFactory.kt:43-47 uses rollingCapBytes only); the
|
||||
// Liked cap was a no-op. CacheSettings fields stay
|
||||
// persisted so the controls return when the systems land.
|
||||
CapDropdown(
|
||||
label = "Liked cache limit",
|
||||
value = state.settings.likedCapBytes,
|
||||
onSet = viewModel::setLikedCapBytes,
|
||||
)
|
||||
CapDropdown(
|
||||
label = "Recently-played cache limit",
|
||||
label = "Cache limit",
|
||||
value = state.settings.rollingCapBytes,
|
||||
onSet = viewModel::setRollingCapBytes,
|
||||
)
|
||||
// Pre-fetch ahead + Cache-liked-tracks toggles intentionally
|
||||
// omitted in v1. The underlying systems (MetadataPrefetcher,
|
||||
// pin-on-like flow) don't exist on Android yet — surfacing
|
||||
// controls that silently do nothing is worse than hiding
|
||||
// them. The CacheSettings fields are still persisted so
|
||||
// the toggles return when the systems land.
|
||||
Text(
|
||||
text = "Cache limits take effect on the next app launch.",
|
||||
text = "Takes effect on the next app launch.",
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user