From 0d769cf69065c8bd0d48225efce5545bf63244ce Mon Sep 17 00:00:00 2001 From: Osama Sayed Date: Mon, 23 Sep 2024 21:24:10 +0800 Subject: [PATCH] auto migrate to new Tajweed Musahf --- src/redux/migrations.ts | 9 +++++++++ src/redux/store.ts | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/redux/migrations.ts b/src/redux/migrations.ts index fb73fdaea4..9129b4ce08 100644 --- a/src/redux/migrations.ts +++ b/src/redux/migrations.ts @@ -243,4 +243,13 @@ export default { isDonationPopupVisible: true, }, }), + 32: (state) => ({ + ...state, + quranReaderStyles: { + ...state.quranReaderStyles, + ...(state.quranReaderStyles.quranFont === QuranFont.Tajweed && { + quranFont: QuranFont.TajweedV4, + }), + }, + }), }; diff --git a/src/redux/store.ts b/src/redux/store.ts index 288bae82ad..81367fc3b0 100644 --- a/src/redux/store.ts +++ b/src/redux/store.ts @@ -46,7 +46,7 @@ import SliceName from './types/SliceName'; const persistConfig = { key: 'root', - version: 31, + version: 32, storage, migrate: createMigrate(migrations, { debug: process.env.NEXT_PUBLIC_VERCEL_ENV === 'development',