fix(slint): favorite state on album cards + un-favorite in place

AlbumCardItem gains is-favorite (filled accent heart on the card +
"Remove from favorites" in the list-row menu) — favorites albums set it
true so the heart shows its state, which it never did before.

Un-favoriting from the favorites list (track heart or album card heart)
now removes the item: the row/card fades out (new `removing` field drives
a 250ms opacity animation on TrackRow / AlbumCard / AlbumListRow), the
favorite is removed on the server (+ fav_cache for tracks), and the row
is dropped from both the full and visible models after the fade. All
TrackItem / AlbumCardItem initializers carry the new fields.

cc
This commit is contained in:
vicrodh committed 2026-05-27 06:56:26 -06:00
1 parent 57bace3e1d
commit 66a9f9da22
14 files changed
+178 -6

No files matched your search

+6
View File
@@ -19,6 +19,8 @@ export struct AlbumCardItem {
ribbon-kind: string, // "press" | "qobuzissime" | "albumOfTheWeek" | ""
artwork-url: string,
artwork: image, // empty until the artwork pipeline resolves it
is-favorite: bool, // filled accent heart on the card when favorited
removing: bool, // fading out (un-favorited in the favorites view)
// --- List-row extras (AlbumListRow; ignored by the grid AlbumCard) ----
release-type: string, // "Album" | "EP" | "Single" | "Live" | "Compilation"
source: string, // "qobuz" | "local" | "plex" | "" — hideable column
@@ -238,6 +240,8 @@ export struct TrackItem {
// album view, both via the media-action bubble channel.
artist-id: string,
album-id: string,
// Fading out (un-favorited in the favorites view) before removal.
removing: bool,
}
// Album detail screen state.
@@ -1491,6 +1495,8 @@ export global FavoritesActions {
callback albums-search(string /* query */);
callback albums-set-sort(string /* sort key */);
callback albums-shuffle();
callback unfavorite-track(string /* track id */);
callback unfavorite-album(string /* album id */);
}
// A Qobuz mix detail page (DailyQ / WeeklyQ / FavQ / TopQ), opened