From 4022909f14c6012780c65b56bd2aa20d26b3c9bf Mon Sep 17 00:00:00 2001 From: AnimeDL Date: Sun, 9 Jul 2023 14:07:30 -0700 Subject: [PATCH] Prevent episode selection from contextmenu Episode would be selected if you selected anything in the contextmenu from the Episode List screen. Co-authored-by: AnidlSupport --- .../Listing/EpisodeListing.tsx | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/gui/react/src/components/AddToQueue/DownloadSelector/Listing/EpisodeListing.tsx b/gui/react/src/components/AddToQueue/DownloadSelector/Listing/EpisodeListing.tsx index f3a2e65..d3668a2 100644 --- a/gui/react/src/components/AddToQueue/DownloadSelector/Listing/EpisodeListing.tsx +++ b/gui/react/src/components/AddToQueue/DownloadSelector/Listing/EpisodeListing.tsx @@ -79,19 +79,17 @@ const EpisodeListing: React.FC = () => { const isSelected = selected.includes(e.toString()); const imageRef = React.createRef(); const summaryRef = React.createRef(); - return { - let arr: string[] = []; - if (isSelected) { - arr = [...selected.filter(a => a !== e.toString())]; - } else { - arr = [...selected, e.toString()]; - } - setSelected(arr.filter(a => a.length > 0)); - }}> - + return + { + let arr: string[] = []; + if (isSelected) { + arr = [...selected.filter(a => a !== e.toString())]; + } else { + arr = [...selected, e.toString()]; + } + setSelected(arr.filter(a => a.length > 0)); + }}> { isSelected ? : } {idStr}