Show continue read button only when chapters are available
Manga can be added to the library while they have not been initialized yet. Thus, for these cases, the reader is broken in case it gets opened. To prevent this, the continue read button should not be shown in the library
This commit is contained in:
@@ -107,7 +107,9 @@ export const MangaCard = (props: MangaCardProps) => {
|
||||
const continueReadingButton = useMemo(
|
||||
() => (
|
||||
<ContinueReadingButton
|
||||
showContinueReadingButton={showContinueReadingButton && mode === 'default'}
|
||||
showContinueReadingButton={
|
||||
showContinueReadingButton && mode === 'default' && !!manga.chapters?.totalCount
|
||||
}
|
||||
isLatestChapterRead={isLatestChapterRead}
|
||||
nextChapterIndexToRead={nextChapterIndexToRead}
|
||||
mangaLinkTo={mangaLinkTo}
|
||||
|
||||
@@ -18,9 +18,9 @@ import { SingleModeProps } from '@/components/manga/MangaActionMenuItems.tsx';
|
||||
export type MangaCardMode = 'default' | 'source' | 'migrate.search' | 'migrate.select' | 'duplicate';
|
||||
|
||||
type MangaCardBaseProps = Pick<MangaType, 'id' | 'title' | 'sourceId'> &
|
||||
SingleModeProps['manga'] &
|
||||
Omit<SingleModeProps['manga'], 'downloadCount' | 'unreadCount' | 'chapters'> &
|
||||
Partial<Pick<MangaType, 'inLibrary' | 'downloadCount' | 'unreadCount'>> &
|
||||
MangaChapterCountInfo & {
|
||||
Partial<MangaChapterCountInfo> & {
|
||||
latestReadChapter?: Pick<ChapterType, 'id' | 'sourceOrder'> | null;
|
||||
firstUnreadChapter?: Pick<ChapterType, 'id' | 'sourceOrder'> | null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user