fix(plex): a playlist row's menu adds its title to a collection too
The row menu called the title's action list without the anchor the panel opens beside, and the optional parameter dropped the row silently. The anchor is now required, so every host menu decides.
This commit is contained in:
@@ -61,14 +61,15 @@ export function usePlexCardActions(handlers: PlexActionHandlers, open: boolean)
|
||||
/** `play: false` where the host menu leads with its own Play row (Home's shelf resolves `next`);
|
||||
* `pin: false` where the host carries its own shelf rows or the object is not a pin kind;
|
||||
* `anchor`: the element the menu came from, which "Add to collection…" opens its panel beside —
|
||||
* without one the row is left out rather than opening the panel at a corner. */
|
||||
* without one the row is left out rather than opening the panel at a corner. Required, so every
|
||||
* host menu decides: an optional one let a menu that has an anchor drop the row silently. */
|
||||
const items = (
|
||||
c: PlexCard,
|
||||
{
|
||||
play = true,
|
||||
pin: withPin = true,
|
||||
anchor = null,
|
||||
}: { play?: boolean; pin?: boolean; anchor?: Element | null } = {},
|
||||
anchor,
|
||||
}: { play?: boolean; pin?: boolean; anchor: Element | null },
|
||||
): ActionMenuItem[] => {
|
||||
const { onOpen, onInfo, onToggleWatched, onRestart } = handlers;
|
||||
const playable = isPlexPlayable(c);
|
||||
|
||||
Reference in New Issue
Block a user