Resume chapter at specific page
- open from outside reader - is read - yes: 1st page - no : last read page - inside reader via - chapter selection: first page - previous chapter : last page - next chapter : first page
This commit is contained in:
@@ -122,8 +122,6 @@ export const ChapterList = ({
|
||||
|
||||
const visibleChapters = useMemo(() => filterAndSortChapters(chapters, options), [chapters, options]);
|
||||
|
||||
const nextChapterIndexToRead = manga.firstUnreadChapter?.sourceOrder;
|
||||
|
||||
const areAllChaptersRead = Mangas.isFullyRead(manga);
|
||||
const areAllChaptersDownloaded = Mangas.isFullyDownloaded(manga);
|
||||
|
||||
@@ -157,8 +155,8 @@ export const ChapterList = ({
|
||||
);
|
||||
}
|
||||
|
||||
if (nextChapterIndexToRead !== undefined) {
|
||||
return <ResumeFab chapterIndex={nextChapterIndexToRead} mangaId={manga.id} />;
|
||||
if (manga.firstUnreadChapter) {
|
||||
return <ResumeFab chapter={manga.firstUnreadChapter} />;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -36,6 +36,7 @@ import {
|
||||
ChapterMangaInfo,
|
||||
ChapterNumberInfo,
|
||||
ChapterReadInfo,
|
||||
Chapters,
|
||||
ChapterScanlatorInfo,
|
||||
} from '@/modules/chapter/services/Chapters.ts';
|
||||
import { ChaptersWithMeta } from '@/modules/chapter/services/ChaptersWithMeta.ts';
|
||||
@@ -128,10 +129,11 @@ export const ChapterCard: React.FC<IProps> = (props: IProps) => {
|
||||
>
|
||||
<CardActionArea
|
||||
component={Link}
|
||||
to={`/manga/${chapter.mangaId}/chapter/${chapter.sourceOrder}`}
|
||||
to={Chapters.getReaderUrl(chapter)}
|
||||
style={{
|
||||
color: theme.palette.text[chapter.isRead ? 'disabled' : 'primary'],
|
||||
}}
|
||||
state={{ resumeMode: Chapters.getReaderResumeMode(chapter) }}
|
||||
replace={mode === 'reader'}
|
||||
onClick={(e) => handleClick(e)}
|
||||
{...longPressBind(popupState.open)}
|
||||
|
||||
Reference in New Issue
Block a user