Fix updating global reader settings
It replaced the global settings with the manga specific ones.
Regression 63ebfd120e
This commit is contained in:
@@ -317,16 +317,16 @@ 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 isGlobalSetting = isGlobal || GLOBAL_READER_SETTING_KEYS.includes(setting);
|
|
||||||
const metaHolderType = isGlobalSetting ? 'global' : 'manga';
|
|
||||||
|
|
||||||
const key = getMetadataKey(setting, profile !== undefined ? [profile?.toString()] : undefined);
|
const key = getMetadataKey(setting, profile !== undefined ? [profile?.toString()] : undefined);
|
||||||
const metaValue = JSON.stringify(value);
|
const metaValue = JSON.stringify(value);
|
||||||
const chunkedMeta = MetadataChunker.chunkValue(key, metaValue);
|
const chunkedMeta = MetadataChunker.chunkValue(key, metaValue);
|
||||||
@@ -353,7 +353,6 @@ export class ReaderService {
|
|||||||
fragment: GLOBAL_METADATA,
|
fragment: GLOBAL_METADATA,
|
||||||
data: {
|
data: {
|
||||||
__typename: 'GlobalMetaType',
|
__typename: 'GlobalMetaType',
|
||||||
mangaId: manga.id,
|
|
||||||
key: meta.key,
|
key: meta.key,
|
||||||
value: meta.value,
|
value: meta.value,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user