Use first unread chapter for continue read buttons (#689)

This commit is contained in:
schroda
2024-04-01 00:57:47 +02:00
committed by GitHub
parent 9674b18d28
commit fe2cb682b6
5 changed files with 28 additions and 10 deletions

View File

@@ -79,7 +79,7 @@ export const ChapterList: React.FC<IProps> = ({ manga, isRefreshing }) => {
const visibleChapters = useMemo(() => filterAndSortChapters(chapters, options), [chapters, options]);
const nextChapterIndexToRead = (manga.latestReadChapter?.sourceOrder ?? 0) + 1;
const nextChapterIndexToRead = manga.firstUnreadChapter?.sourceOrder ?? 1;
const isLatestChapterRead = manga.chapters.totalCount === manga.latestReadChapter?.sourceOrder;
const areAllChaptersRead = manga.unreadCount === 0;