feat(favorites): album favorite action is a real toggle everywhere
Follow-through on 6a0c3d5e (state-visible hearts): the card-level
album 'favorite' arm was still add-only — a filled heart re-added and
toasted 'Added to favorites'. It now toggles, mirroring the header
arm: fav_cache-keyed, optimistic set_album_row_favorite + rollback on
error, cache written on success only, reco logging on ADD only (the
Capa B search-interaction record is now gated to adds, like tracks).
AlbumCard's menu item goes state-conditional (Remove from Library +
filled heart), and the now-playing '+' flyout album entry becomes
state-honest through a new NowPlayingState.album-favorite (seeded per
track in refresh_now_playing_meta, flipped live by
set_album_row_favorite — which now also syncs the open album page's
header heart, closing the stale-header undo loop). Favorites' own
intercepted unfavorite (fade + row removal) is untouched, both view
modes. One msgid x8 locales.
cc
This commit is contained in:
13 files changed
+126
-27
No files matched your search
@@ -3951,6 +3951,12 @@ export global NowPlayingState {
|
||||
in property <string> artist;
|
||||
in property <string> album;
|
||||
in property <string> album-id;
|
||||
// Whether the playing track's ALBUM is a library favorite. Seeded from
|
||||
// fav_cache in refresh_now_playing_meta (playback.rs) on every track-meta
|
||||
// push, and flipped live by set_album_row_favorite (main.rs) when a
|
||||
// favorite toggle from ANY surface matches album-id. Drives the "+"
|
||||
// flyout's add/remove-album-to-collection entry (TransportControls).
|
||||
in property <bool> album-favorite: false;
|
||||
in property <string> artist-id;
|
||||
in property <image> artwork;
|
||||
// Higher-res cover (~300px) for the hover preview that floats above the
|
||||
|
||||
Reference in new issue
Block a user