fix(slint): favorites track row album link did not navigate

The Tracks row routed every media-action through track-action, which
forces kind="track"; an album-name click arrived as ("track", album-id,
"open") and was handled as an artist open, so only the artist link
worked. Route album/artist "open" through the wired open-album /
open-artist actions; everything else still goes to track-action.

cc
This commit is contained in:
vicrodh committed 2026-05-26 22:10:09 -06:00
1 parent d5aa3c26d8
commit fd5246a7ce
1 file changed
+11 -1
@@ -344,8 +344,18 @@ export component FavoritesView inherits Rectangle {
show-artwork: true;
show-album: true;
show-favorite: true;
// Album / artist name links open the respective page; the
// row drops `kind`, so route those explicitly (the
// track-action path forces kind="track" and would treat an
// album-id as an artist-id).
media-action(kind, id, action) => {
FavoritesActions.track-action(id, action);
if (kind == "album" && action == "open") {
FavoritesActions.open-album(id);
} else if (kind == "artist" && action == "open") {
FavoritesActions.open-artist(id);
} else {
FavoritesActions.track-action(id, action);
}
}
}
}