diff --git a/apps/mobile/components/media-context-menu.tsx b/apps/mobile/components/media-context-menu.tsx index a1662f7..b20e758 100644 --- a/apps/mobile/components/media-context-menu.tsx +++ b/apps/mobile/components/media-context-menu.tsx @@ -77,44 +77,39 @@ const QUEUE_ACTIONS: MediaAction[] = ["play-next", "play-last", "shuffle"] const MEDIA_ACTION_ITEMS: { action: MediaAction - label: ( - countSuffix: string, - favorited: boolean | undefined, - playlistLabel: string - ) => string + label: (favorited: boolean | undefined, playlistLabel: string) => string image: NonNullable & string destructive?: boolean }[] = [ { action: "playlist", - label: (countSuffix, _favorited, playlistLabel) => - `${playlistLabel}${countSuffix}`, + label: (_favorited, playlistLabel) => playlistLabel, image: "text.badge.plus", }, { action: "download", - label: (countSuffix) => `Download${countSuffix}`, + label: () => "Download", image: "arrow.down.circle", }, { action: "remove-download", - label: (countSuffix) => `Remove Download${countSuffix}`, + label: () => "Remove Download", image: "xmark.circle", destructive: true, }, { action: "play-next", - label: (countSuffix) => `Play Next${countSuffix}`, + label: () => "Play Next", image: "text.line.first.and.arrowtriangle.forward", }, { action: "play-last", - label: (countSuffix) => `Play Last${countSuffix}`, + label: () => "Play Last", image: "text.line.last.and.arrowtriangle.forward", }, { action: "shuffle", - label: (countSuffix) => `Shuffle${countSuffix}`, + label: () => "Shuffle", image: "shuffle", }, { @@ -134,8 +129,7 @@ const MEDIA_ACTION_ITEMS: { }, { action: "favorite", - label: (countSuffix, favorited) => - `${favorited ? "Unfavorite" : "Favorite"}${countSuffix}`, + label: (favorited) => (favorited ? "Unfavorite" : "Favorite"), image: "star", }, { @@ -206,12 +200,7 @@ function isActionIncluded( export function buildMediaMenuActions( config: Omit ): MenuAction[] { - const { - selectedCount = 1, - favorited, - playlistLabel = "Add to Playlist", - } = config - const countSuffix = selectedCount > 1 ? ` (${selectedCount})` : "" + const { favorited, playlistLabel = "Add to Playlist" } = config const actions: MenuAction[] = [] @@ -230,7 +219,7 @@ export function buildMediaMenuActions( actions.push({ id: item.action, - title: item.label(countSuffix, favorited, playlistLabel), + title: item.label(favorited, playlistLabel), image: item.action === "favorite" && favorited ? "star.fill" : item.image, ...(item.destructive ? { attributes: { destructive: true } } : {}), }) diff --git a/apps/web/components/media-context-menu.tsx b/apps/web/components/media-context-menu.tsx index bc7d59d..aa1610b 100644 --- a/apps/web/components/media-context-menu.tsx +++ b/apps/web/components/media-context-menu.tsx @@ -74,10 +74,6 @@ export function MediaMenuSeparator() { ) } -function actionLabel(base: string, selectedCount: number) { - return selectedCount > 1 ? `${base} (${selectedCount})` : base -} - export function MediaContextMenuItems({ selectedCount, onAction, @@ -121,7 +117,7 @@ export function MediaContextMenuItems({ className="justify-between" onClick={() => onAction("playlist")} > - {actionLabel(playlistLabel, selectedCount)} + {playlistLabel} {downloaded !== undefined ? ( @@ -129,10 +125,7 @@ export function MediaContextMenuItems({ className="justify-between" onClick={() => onAction(downloaded ? "remove-download" : "download")} > - {actionLabel( - downloaded ? "Remove Download" : "Download", - selectedCount - )} + {downloaded ? "Remove Download" : "Download"} {downloaded ? : } ) : null} @@ -141,21 +134,21 @@ export function MediaContextMenuItems({ className="justify-between" onClick={() => onAction("play-next")} > - {actionLabel("Play Next", selectedCount)} + Play Next onAction("play-last")} > - {actionLabel("Play Last", selectedCount)} + Play Last onAction("shuffle")} > - {actionLabel("Shuffle", selectedCount)} + Shuffle {stationArtistId ? ( @@ -196,7 +189,7 @@ export function MediaContextMenuItems({ className="justify-between" onClick={() => onAction("favorite")} > - {actionLabel(favorited ? "Unfavorite" : "Favorite", selectedCount)} + {favorited ? "Unfavorite" : "Favorite"}