Skip to content

Commit 3a4d0d5

Browse files
committed
fix issue with missing EmojiTrie after changing language
1 parent 99bb49c commit 3a4d0d5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/pages/settings/Preferences/LanguagePage.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, {useMemo, useRef} from 'react';
2+
import {importEmojiLocale} from '@assets/emojis';
23
import FullPageOfflineBlockingView from '@components/BlockingViews/FullPageOfflineBlockingView';
34
import HeaderWithBackButton from '@components/HeaderWithBackButton';
45
import ScreenWrapper from '@components/ScreenWrapper';
@@ -8,7 +9,7 @@ import type {ListItem} from '@components/SelectionList/ListItem/types';
89
import useLocalize from '@hooks/useLocalize';
910
import Navigation from '@libs/Navigation/Navigation';
1011
import {setLocale} from '@userActions/App';
11-
import {LOCALE_TO_LANGUAGE_STRING, SORTED_LOCALES} from '@src/CONST/LOCALES';
12+
import {isFullySupportedLocale, LOCALE_TO_LANGUAGE_STRING, SORTED_LOCALES} from '@src/CONST/LOCALES';
1213
import type Locale from '@src/types/onyx/Locale';
1314

1415
type LanguageEntry = ListItem & {
@@ -39,6 +40,9 @@ function LanguagePage() {
3940
isOptionSelected.current = true;
4041

4142
setLocale(selectedLanguage.value, preferredLocale);
43+
if (isFullySupportedLocale(selectedLanguage.value)) {
44+
importEmojiLocale(selectedLanguage.value);
45+
}
4246
Navigation.goBack();
4347
};
4448

0 commit comments

Comments
 (0)