mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-27 12:51:03 +00:00
feat: update user language
This commit is contained in:
@@ -3,6 +3,7 @@ import { registerEvent } from "../register-event";
|
||||
|
||||
import type { UserPreferences } from "@types";
|
||||
import i18next from "i18next";
|
||||
import { patchUserProfile } from "../profile/update-profile";
|
||||
|
||||
const updateUserPreferences = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
@@ -10,6 +11,7 @@ const updateUserPreferences = async (
|
||||
) => {
|
||||
if (preferences.language) {
|
||||
i18next.changeLanguage(preferences.language);
|
||||
patchUserProfile({ language: preferences.language }).catch(() => {});
|
||||
}
|
||||
|
||||
return userPreferencesRepository.upsert(
|
||||
|
||||
Reference in New Issue
Block a user