From 2b2686d3239eb9dea90c8044c1e9673cebd044b0 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Tue, 14 May 2024 00:25:32 +0200 Subject: [PATCH] Always include scanlator in case multiple scanlators exist Makes more sense compared to the previous logic - to only show the scanlator in case "skip dupe chapters" setting was disabled and duplicated chapters existed - which was also not properly implemented, to be always able to tell if chapters of different scanlators might be viewed --- src/components/navbar/ReaderNavBar.tsx | 5 +---- src/screens/Reader.tsx | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/navbar/ReaderNavBar.tsx b/src/components/navbar/ReaderNavBar.tsx index 26552f36..53a02d6e 100644 --- a/src/components/navbar/ReaderNavBar.tsx +++ b/src/components/navbar/ReaderNavBar.tsx @@ -130,7 +130,6 @@ interface IProps { scrollToPage: (page: number) => void; openNextChapter: (offset: ChapterOffset) => void; retrievingNextChapter: boolean; - hasDuplicatedChapters: boolean; } export function ReaderNavBar(props: IProps) { @@ -153,14 +152,12 @@ export function ReaderNavBar(props: IProps) { scrollToPage, openNextChapter, retrievingNextChapter, - hasDuplicatedChapters, } = props; const handleBack = useBackButton(); useSetDefaultBackTo(`/manga/${manga.id}`); const hasMultipleScanlators = useMemo(() => !!new Set(chapters.map(({ scanlator }) => scanlator)).size, [chapters]); - const chapterSelectShowScanlator = !hasDuplicatedChapters && hasMultipleScanlators; const [drawerOpen, setDrawerOpen] = useState(settings.staticNav || prevDrawerOpen); const [updateDrawerOnRender, setUpdateDrawerOnRender] = useState(true); @@ -357,7 +354,7 @@ export function ReaderNavBar(props: IProps) { {`#${chapterNumber}${chapterSelectShowScanlator && scanlator != null ? ` (${scanlator})` : ''} | ${name}`} + >{`#${chapterNumber}${hasMultipleScanlators && scanlator != null ? ` (${scanlator})` : ''} | ${name}`} ))} diff --git a/src/screens/Reader.tsx b/src/screens/Reader.tsx index 003ab539..730647a9 100644 --- a/src/screens/Reader.tsx +++ b/src/screens/Reader.tsx @@ -409,7 +409,6 @@ export function Reader() { scrollToPage={setPageToScrollTo} openNextChapter={openNextChapter} retrievingNextChapter={retrievingNextChapter} - hasDuplicatedChapters={settings.skipDupChapters && mangaChapters?.length !== uniqueChapters.length} /> ), });