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:
@@ -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>
|
||||
|
||||
@@ -409,7 +409,6 @@ export function Reader() {
|
||||
scrollToPage={setPageToScrollTo}
|
||||
openNextChapter={openNextChapter}
|
||||
retrievingNextChapter={retrievingNextChapter}
|
||||
hasDuplicatedChapters={settings.skipDupChapters && mangaChapters?.length !== uniqueChapters.length}
|
||||
/>
|
||||
),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user