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
This commit is contained in:
schroda
2024-05-14 00:25:32 +02:00
parent a65ca228fe
commit 2b2686d323
2 changed files with 1 additions and 5 deletions

View File

@@ -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) {
<MenuItem
key={id}
value={sourceOrder}
>{`#${chapterNumber}${chapterSelectShowScanlator && scanlator != null ? ` (${scanlator})` : ''} | ${name}`}</MenuItem>
>{`#${chapterNumber}${hasMultipleScanlators && scanlator != null ? ` (${scanlator})` : ''} | ${name}`}</MenuItem>
))}
</Select>
</FormControl>