From 953ebbe5a639e737776ae3e4fc29581ce493f616 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Mon, 18 Dec 2023 22:25:25 +0100 Subject: [PATCH] Add button to mark all chapters as read --- src/components/manga/ChapterList.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/manga/ChapterList.tsx b/src/components/manga/ChapterList.tsx index 4fd10c4a..11b9dddb 100644 --- a/src/components/manga/ChapterList.tsx +++ b/src/components/manga/ChapterList.tsx @@ -14,6 +14,7 @@ import { useTranslation } from 'react-i18next'; import Checkbox from '@mui/material/Checkbox'; import IconButton from '@mui/material/IconButton'; import DownloadIcon from '@mui/icons-material/Download'; +import DoneAllIcon from '@mui/icons-material/DoneAll'; import { TChapter, TManga, TranslationKey } from '@/typings'; import { requestManager } from '@/lib/requests/RequestManager.ts'; import { ChapterCard } from '@/components/manga/ChapterCard'; @@ -113,6 +114,7 @@ export const ChapterList: React.FC = ({ manga, isRefreshing }) => { const areAllChaptersSelected = selection?.length === chapters.length; const areNoneChaptersSelected = !selection; + const areAllChaptersRead = manga.unreadCount === 0; const areAllChaptersDownloaded = manga.downloadCount === manga.chapters.totalCount; const handleSelection = (index: number) => { @@ -268,6 +270,14 @@ export const ChapterList: React.FC = ({ manga, isRefreshing }) => { + + handleFabAction('mark_as_read', chaptersWithMeta)} + > + + +