Remove "LibraryOptionsContext"

These options are saved in the category metadata which made the context unnecessary
This commit is contained in:
schroda
2025-05-03 13:59:21 +02:00
parent 04768d5210
commit c82110b29d
5 changed files with 22 additions and 80 deletions

View File

@@ -12,7 +12,7 @@ import { ComponentProps, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { CustomTooltip } from '@/modules/core/components/CustomTooltip.tsx';
import { LibraryOptionsPanel } from '@/modules/library/components/LibraryOptionsPanel.tsx';
import { useLibraryOptionsContext } from '@/modules/library/contexts/LibraryOptionsContext.tsx';
import { getCategoryMetadata } from '@/modules/category/services/CategoryMetadata.ts';
export const LibraryToolbarMenu = ({
category,
@@ -22,7 +22,7 @@ export const LibraryToolbarMenu = ({
const { t } = useTranslation();
const [open, setOpen] = useState(false);
const { options } = useLibraryOptionsContext();
const options = getCategoryMetadata(category);
const active =
options.hasDownloadedChapters != null ||
options.hasUnreadChapters != null ||