Merge pull request #953 from hydralauncher/fix/add-language-migration

feat: add language migration
This commit is contained in:
Chubby Granny Chaser
2024-09-14 00:19:38 +01:00
committed by GitHub
3 changed files with 20 additions and 3 deletions

View File

@@ -41,8 +41,11 @@ i18n
escapeValue: false,
},
})
.then(() => {
window.electron.updateUserPreferences({ language: i18n.language });
.then(async () => {
const userPreferences = await window.electron.getUserPreferences();
if (!userPreferences?.language) {
window.electron.updateUserPreferences({ language: i18n.language });
}
});
ReactDOM.createRoot(document.getElementById("root")!).render(