Remove custom profiles

Instead of "custom profiles" each "reading mode" acts as a profile and has its own settings
This commit is contained in:
schroda
2024-12-16 15:22:21 +01:00
parent e95cc232a2
commit 74f78e40d4
19 changed files with 86 additions and 421 deletions

View File

@@ -74,16 +74,8 @@ export const ReaderHotkeys = ({
const { enableScope, disableScope } = useHotkeysContext();
const { manga } = useReaderStateMangaContext();
const { isVisible, setIsVisible: setIsOverlayVisible } = useReaderOverlayContext();
const {
hotkeys,
pageScaleMode,
shouldStretchPage,
shouldOffsetDoubleSpreads,
readingMode,
readingDirection,
defaultProfile,
profiles,
} = ReaderService.useSettings();
const { hotkeys, pageScaleMode, shouldStretchPage, shouldOffsetDoubleSpreads, readingMode, readingDirection } =
ReaderService.useSettings();
const openChapter = ReaderControls.useOpenChapter();
const openPage = ReaderControls.useOpenPage();
@@ -165,17 +157,6 @@ export const ReaderHotkeys = ({
() => updateSetting('shouldOffsetDoubleSpreads', !shouldOffsetDoubleSpreads.value),
[updateSetting, shouldOffsetDoubleSpreads.value],
);
useHotkeys(hotkeys[ReaderHotkey.CYCLE_PROFILES], () => {
updateSettingCycleThrough(
updateSetting,
deleteSetting,
'defaultProfile',
defaultProfile.value,
profiles,
defaultProfile.isDefault,
true,
);
});
useEffect(() => {
enableScope(HotkeyScope.READER);