Update downloadable check in chapter list

Check for single chapter card was never updated and the downloadable condition was incorrectly changed with 6c01c222c3
This commit is contained in:
schroda
2024-09-18 12:50:04 +02:00
parent 34ebe82df1
commit fab5f0b860
2 changed files with 10 additions and 5 deletions

View File

@@ -38,6 +38,7 @@ import {
ChapterReadInfo,
ChapterScanlatorInfo,
} from '@/lib/data/Chapters.ts';
import { ChaptersWithMeta } from '@/lib/data/ChaptersWithMeta.ts';
type TChapter = ChapterIdInfo &
ChapterMangaInfo &
@@ -182,7 +183,10 @@ export const ChapterCard: React.FC<IProps> = (props: IProps) => {
chapter={chapter}
allChapters={allChapters}
handleSelection={() => onSelect(true)}
canBeDownloaded={!chapter.isDownloaded && !dc}
canBeDownloaded={ChaptersWithMeta.isDownloadable({
chapter,
downloadChapter: dc,
})}
/>
)}
</Menu>