From f78693eee82e1f159b62c2931dfaa130c6bfcecb Mon Sep 17 00:00:00 2001 From: xmflsct Date: Tue, 14 Mar 2023 01:39:54 +0100 Subject: [PATCH] Locale lower case match --- src/components/Timeline/Shared/Card/index.tsx | 2 +- src/screens/Tabs/Me/Settings/App.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Timeline/Shared/Card/index.tsx b/src/components/Timeline/Shared/Card/index.tsx index 254787f3..7372c0a8 100644 --- a/src/components/Timeline/Shared/Card/index.tsx +++ b/src/components/Timeline/Shared/Card/index.tsx @@ -22,7 +22,7 @@ const TimelineCard: React.FC = () => { if (!status || !status.card) return null const { i18n } = useTranslation() - if (status.card.url.includes('://neodb.social/') && i18n.language === 'zh-hans') { + if (status.card.url.includes('://neodb.social/') && i18n.language.toLowerCase() === 'zh-hans') { return } diff --git a/src/screens/Tabs/Me/Settings/App.tsx b/src/screens/Tabs/Me/Settings/App.tsx index 642dee40..608cbf31 100644 --- a/src/screens/Tabs/Me/Settings/App.tsx +++ b/src/screens/Tabs/Me/Settings/App.tsx @@ -59,7 +59,7 @@ const SettingsApp: React.FC = () => { // @ts-ignore LOCALES[ Platform.OS === 'ios' - ? Localization.locale.replace(new RegExp(/.*-.*(-.*)/, 'i'), '') + ? Localization.locale.replace(new RegExp(/.*-.*(-.*)/, 'i'), '').toLowerCase() : i18n.language.toLowerCase() ] }