Save appearance settings on server

- app theme
- theme mode
- pure black mode
- manga grid item width
This commit is contained in:
schroda
2025-05-17 21:04:44 +02:00
parent 4a1eb6f824
commit 18ddf46f17
11 changed files with 88 additions and 60 deletions

View File

@@ -83,7 +83,10 @@ const applyMetadataValueMigration = (meta: Metadata, migration: IMetadataMigrati
metadataValueChanges.forEach(({ key, oldValue, newValue }) => {
const migrateValue = (metaKey: string) => {
if (meta[metaKey].match(oldValue)) {
if (
(oldValue === undefined && meta[metaKey] === oldValue) ||
(oldValue !== undefined && meta[metaKey].match(oldValue))
) {
migratedMetadata[metaKey] = typeof newValue === 'function' ? newValue(meta[metaKey]) : newValue;
}
};