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:
1 file changed
+11
-1
@@ -344,8 +344,18 @@ export component FavoritesView inherits Rectangle {
|
|||||||
show-artwork: true;
|
show-artwork: true;
|
||||||
show-album: true;
|
show-album: true;
|
||||||
show-favorite: 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) => {
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user