Fix deleting global reader settings

It replaced the global settings with the manga specific ones.

Regression 63ebfd120e
This commit is contained in:
schroda
2026-03-15 14:42:49 +01:00
parent 7de1723b36
commit 32fb7b0909

View File

@@ -399,16 +399,17 @@ export class ReaderService {
isGlobal: boolean = false, isGlobal: boolean = false,
profile?: ReadingMode, profile?: ReadingMode,
): void { ): void {
const isGlobalSetting = isGlobal || GLOBAL_READER_SETTING_KEYS.includes(setting);
const metaHolderType = isGlobalSetting ? 'global' : 'manga';
const { manga: currentManga } = getReaderStore(); const { manga: currentManga } = getReaderStore();
const manga = isGlobal ? GLOBAL_READER_SETTINGS_MANGA : (currentManga ?? FALLBACK_MANGA); const manga = isGlobalSetting ? GLOBAL_READER_SETTINGS_MANGA : (currentManga ?? FALLBACK_MANGA);
if (!manga || manga.id === FALLBACK_MANGA.id) { if (!manga || manga.id === FALLBACK_MANGA.id) {
return; return;
} }
const key = getMetadataKey(setting, profile !== undefined ? [profile?.toString()] : undefined); const key = getMetadataKey(setting, profile !== undefined ? [profile?.toString()] : undefined);
const isGlobalSetting = isGlobal || GLOBAL_READER_SETTING_KEYS.includes(setting);
const metaHolderType = isGlobalSetting ? 'global' : 'manga';
const existingMeta = this.getMetadataWithUnmodifiedKey(manga, metaHolderType, key, isGlobalSetting); const existingMeta = this.getMetadataWithUnmodifiedKey(manga, metaHolderType, key, isGlobalSetting);