feat(slint): per-context genre filter + favorites genre filtering
Make genre_filter.rs selection per-context (HashMap keyed by "discover" /
"favorites" + a current context the popup edits), so favorites filters
independently from Discover. Discover keeps its server-side path
unchanged (reads filter_ids("discover") explicitly; its genre buttons set
the "discover" context on open). Favorites get a genre button in both
toolbars that opens the shared popup in the "favorites" context, plus the
popup overlay; derive_tracks / derive_albums filter client-side by the
selected genre NAMES (selected_names expands parents to descendants).
on_toggle / on_clear branch on the current context to re-derive favorites
instead of re-fetching Discover. AlbumSummary gains an optional `genre`
(favorites track album objects carry it; TrackItem can't, so a track
id->genre map backs the tracks filter). Persisted per-context (legacy
flat selection migrates to "discover").
cc
This commit is contained in:
8 files changed
+327
-76
No files matched your search
@@ -248,6 +248,8 @@ pub struct AlbumSummary {
|
||||
pub image: ImageSet,
|
||||
/// Label (if returned in track response)
|
||||
pub label: Option<Label>,
|
||||
/// Genre (when returned, e.g. on favorites track album objects).
|
||||
pub genre: Option<Genre>,
|
||||
}
|
||||
|
||||
/// Album model
|
||||
|
||||
Reference in new issue
Block a user