Fix deleting global reader settings
It replaced the global settings with the manga specific ones.
Regression 63ebfd120e
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user