diff --git a/android/app/src/main/java/com/hamagen/MainApplication.java b/android/app/src/main/java/com/hamagen/MainApplication.java index a2a9cc35..4df96539 100755 --- a/android/app/src/main/java/com/hamagen/MainApplication.java +++ b/android/app/src/main/java/com/hamagen/MainApplication.java @@ -74,7 +74,6 @@ public void onCreate() { // FORCE LTR I18nUtil sharedI18nUtilInstance = I18nUtil.getInstance(); - sharedI18nUtilInstance.allowRTL(getApplicationContext(), false); SoLoader.init(this, /* native exopackage */ false); initializeFlipper(this); // Remove this line if you don't want Flipper enabled } diff --git a/ios/codeAgainstCorona/AppDelegate.m b/ios/codeAgainstCorona/AppDelegate.m index a991d531..106beb14 100755 --- a/ios/codeAgainstCorona/AppDelegate.m +++ b/ios/codeAgainstCorona/AppDelegate.m @@ -33,10 +33,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( rootViewController.view = rootView; self.window.rootViewController = rootViewController; [self.window makeKeyAndVisible]; - - [[RCTI18nUtil sharedInstance] allowRTL:NO]; - [[RCTI18nUtil sharedInstance] forceRTL:NO]; - + [FIRApp configure]; [RNFirebaseNotifications configure]; diff --git a/src/components/Loading.tsx b/src/components/Loading.tsx index 1f5f3291..85fb4666 100755 --- a/src/components/Loading.tsx +++ b/src/components/Loading.tsx @@ -160,7 +160,7 @@ const Loading = ( return ( (_.isEmpty(strings) || !initialRoute) ? null : ( - + @@ -175,7 +175,7 @@ const Loading = ( toggleWebview(false, '')} usageType={usageType} /> - + ) ); diff --git a/src/components/Main/ExposureInstructions.tsx b/src/components/Main/ExposureInstructions.tsx index 5b3b3e91..bd499b83 100644 --- a/src/components/Main/ExposureInstructions.tsx +++ b/src/components/Main/ExposureInstructions.tsx @@ -7,7 +7,6 @@ import config from '../../config/config'; import { BASIC_SHADOW_STYLES, IS_SMALL_SCREEN, MAIN_COLOR, SCREEN_WIDTH } from '../../constants/Constants'; interface Props { - isRTL: boolean, strings: any, locale: 'he'|'en'|'ar'|'am'|'ru', exposure: Exposure, @@ -16,7 +15,6 @@ interface Props { const ExposureInstructions = ( { - isRTL, locale, strings: { scanHome: { inDate, fromHour, toHour }, @@ -65,7 +63,7 @@ const ExposureInstructions = ( {keepSafe} - + {renderActionButton(require('../../assets/main/isolation.png'), goIntoIsolation, allInstructions, () => Linking.openURL(furtherInstructions))} {renderActionButton(require('../../assets/main/report.png'), reportIsolation, reportSite, () => Linking.openURL(reportForm))} diff --git a/src/components/Main/ExposuresDetected.tsx b/src/components/Main/ExposuresDetected.tsx index e171235e..bc69e9aa 100644 --- a/src/components/Main/ExposuresDetected.tsx +++ b/src/components/Main/ExposuresDetected.tsx @@ -12,7 +12,6 @@ import { } from '../../constants/Constants'; interface Props { - isRTL: boolean, strings: any, exposures: Exposure[], onValidExposure(exposure: Exposure): void, @@ -21,7 +20,6 @@ interface Props { const ExposuresDetected = ( { - isRTL, strings: { scanHome: { found, exposureEvents, reportedAt, inDate, fromHour, toHour, wereYouThere, no, canContinue, yes, needDirections } }, exposures, onValidExposure, @@ -84,7 +82,7 @@ const ExposuresDetected = ( {wereYouThere} - + {renderActionButton(no, canContinue, onDismissExposure)} {renderActionButton(yes, needDirections, () => onValidExposure(exposures[0]))} diff --git a/src/components/Main/ExposuresHistory/ExposuresHistory.tsx b/src/components/Main/ExposuresHistory/ExposuresHistory.tsx index 206e1515..f4a30210 100644 --- a/src/components/Main/ExposuresHistory/ExposuresHistory.tsx +++ b/src/components/Main/ExposuresHistory/ExposuresHistory.tsx @@ -8,7 +8,6 @@ import { PADDING_TOP, SCREEN_HEIGHT, SCREEN_WIDTH } from '../../../constants/Con interface Props { navigation: any, - isRTL: boolean, strings: any, pastExposures: Exposure[] } @@ -20,8 +19,7 @@ const ExposuresHistory = ( scanHome: { inDate, fromHour, toHour }, exposuresHistory: { title, noExposures } }, - isRTL, - pastExposures + pastExposures, }: Props ) => { const renderEmptyState = () => ( @@ -39,9 +37,9 @@ const ExposuresHistory = ( return ( - + - + {Place} {`${inDate} `} @@ -123,11 +121,11 @@ const styles = StyleSheet.create({ const mapStateToProps = (state: any) => { const { - locale: { isRTL, strings }, + locale: { strings }, exposures: { pastExposures } } = state; - return { isRTL, strings, pastExposures }; + return { strings, pastExposures }; }; export default connect(mapStateToProps, null)(ExposuresHistory); diff --git a/src/components/Main/ScanHome.tsx b/src/components/Main/ScanHome.tsx index 63f8556e..3d2eabe2 100644 --- a/src/components/Main/ScanHome.tsx +++ b/src/components/Main/ScanHome.tsx @@ -20,7 +20,6 @@ import { Exposure } from '../../types'; interface Props { navigation: any, - isRTL: boolean, strings: any, locale: 'he'|'en'|'ar'|'am'|'ru', exposures: Exposure[], @@ -33,7 +32,7 @@ interface Props { checkForceUpdate(): void } -const ScanHome = ({ navigation, isRTL, strings, locale, exposures, validExposure, setValidExposure, removeValidExposure, dismissExposure, toggleWebview, firstPoint, checkForceUpdate }: Props) => { +const ScanHome = ({ navigation, strings, locale, exposures, validExposure, setValidExposure, removeValidExposure, dismissExposure, toggleWebview, firstPoint, checkForceUpdate }: Props) => { const appStateStatus = useRef('active'); const [{ hasLocation, hasNetwork, hasGPS }, setIsConnected] = useState({ hasLocation: true, hasNetwork: true, hasGPS: true }); @@ -99,7 +98,7 @@ const ScanHome = ({ navigation, isRTL, strings, locale, exposures, validExposure const renderRelevantState = () => { if (validExposure) { return ( - + ); } if (!hasLocation || !hasNetwork) { return ( @@ -108,7 +107,6 @@ const ScanHome = ({ navigation, isRTL, strings, locale, exposures, validExposure } if (exposures.length > 0) { return ( setValidExposure(exposure)} @@ -123,7 +121,6 @@ const ScanHome = ({ navigation, isRTL, strings, locale, exposures, validExposure return ( { const { - locale: { isRTL, strings, locale }, + locale: { strings, locale }, exposures: { exposures, validExposure, firstPoint } } = state; - return { isRTL, strings, locale, exposures, validExposure, firstPoint }; + return { strings, locale, exposures, validExposure, firstPoint }; }; diff --git a/src/components/Main/ScanHomeHeader.tsx b/src/components/Main/ScanHomeHeader.tsx index fa6ddfda..7272fb1c 100644 --- a/src/components/Main/ScanHomeHeader.tsx +++ b/src/components/Main/ScanHomeHeader.tsx @@ -11,14 +11,13 @@ import { } from '../../constants/Constants'; interface Props { - isRTL: boolean, strings: any, isConnected: boolean, showChangeLanguage: boolean, goToExposureHistory(): void } -const ScanHomeHeader = ({ isRTL, strings: { scanHome: { noData, hasData, exposureHistory } }, isConnected, showChangeLanguage, goToExposureHistory }: Props) => { +const ScanHomeHeader = ({ strings: { scanHome: { noData, hasData, exposureHistory } }, isConnected, showChangeLanguage, goToExposureHistory }: Props) => { return ( { showChangeLanguage && ( - + ) @@ -39,17 +38,17 @@ const ScanHomeHeader = ({ isRTL, strings: { scanHome: { noData, hasData, exposur + + + {isConnected ? hasData : noData} + + - + {exposureHistory} - - - - {isConnected ? hasData : noData} - ); @@ -75,7 +74,8 @@ const styles = StyleSheet.create({ backgroundColor: '#fff' }, headerItemContainer: { - alignItems: 'center' + alignItems: 'center', + flexDirection: 'row' }, indicator: { ...BASIC_SHADOW_STYLES, diff --git a/src/components/Onboarding/Location.tsx b/src/components/Onboarding/Location.tsx index 9406d617..b301d7f6 100644 --- a/src/components/Onboarding/Location.tsx +++ b/src/components/Onboarding/Location.tsx @@ -11,12 +11,11 @@ import { IS_IOS, IS_SMALL_SCREEN, MAIN_COLOR, USAGE_ON_BOARDING } from '../../co interface Props { navigation: any, - isRTL: boolean, strings: any, toggleWebview(isShow: boolean, usageType: string): void } -const Location = ({ navigation, isRTL, strings, toggleWebview }: Props) => { +const Location = ({ navigation, strings, toggleWebview }: Props) => { const { location: { title, subTitle1, subTitle2IOS, subTitle2Android, approveLocation } } = strings; const animRef = useRef(null); @@ -59,7 +58,6 @@ const Location = ({ navigation, isRTL, strings, toggleWebview }: Props) => { setIsTOUAccepted(value)} @@ -102,10 +100,10 @@ const styles = StyleSheet.create({ const mapStateToProps = (state: any) => { const { - locale: { isRTL, strings } + locale: { strings } } = state; - return { isRTL, strings }; + return { strings }; }; const mapDispatchToProps = (dispatch: any) => { diff --git a/src/components/Onboarding/LocationIOS.tsx b/src/components/Onboarding/LocationIOS.tsx index 93133dc2..dc689133 100644 --- a/src/components/Onboarding/LocationIOS.tsx +++ b/src/components/Onboarding/LocationIOS.tsx @@ -9,10 +9,9 @@ import { IS_SMALL_SCREEN, MAIN_COLOR, SCREEN_WIDTH } from '../../constants/Const interface Props { navigation: any, strings: any, - isRTL: boolean } -const LocationIOS = ({ navigation, strings: { locationIOS: { title, subTitle1, subTitle2, goToSettings, set } }, isRTL }: Props) => { +const LocationIOS = ({ navigation, strings: { locationIOS: { title, subTitle1, subTitle2, goToSettings, set } } }: Props) => { const appStateStatus = useRef('active'); const [isLocationAllowed, setIsLocationAllowed] = useState(false); @@ -55,7 +54,7 @@ const LocationIOS = ({ navigation, strings: { locationIOS: { title, subTitle1, s Linking.openURL('app-settings:')}> - + {goToSettings} @@ -100,10 +99,10 @@ const styles = StyleSheet.create({ const mapStateToProps = (state: any) => { const { - locale: { strings, isRTL } + locale: { strings } } = state; - return { strings, isRTL }; + return { strings }; }; export default connect(mapStateToProps, null)(LocationIOS); diff --git a/src/components/common/ForceTerms.tsx b/src/components/common/ForceTerms.tsx index 117334f2..9b02b3b5 100644 --- a/src/components/common/ForceTerms.tsx +++ b/src/components/common/ForceTerms.tsx @@ -5,14 +5,13 @@ import { ActionButton, Icon, TermsOfUse, Text } from '.'; import { IS_SMALL_SCREEN, PADDING_TOP, SCREEN_HEIGHT, SCREEN_WIDTH } from '../../constants/Constants'; interface Props { - isRTL: boolean, strings: any, isVisible: boolean, onSeeTerms(): void, onApprovedTerms(): void } -const ForceTerms = ({ isVisible, isRTL, strings, onSeeTerms, onApprovedTerms }: Props) => { +const ForceTerms = ({ isVisible, strings, onSeeTerms, onApprovedTerms }: Props) => { const animRef = useRef(null); const [isTOUAccepted, setIsTOUAccepted] = useState(false); @@ -43,7 +42,6 @@ const ForceTerms = ({ isVisible, isRTL, strings, onSeeTerms, onApprovedTerms }: setIsTOUAccepted(value)} diff --git a/src/components/common/TermsOfUse.tsx b/src/components/common/TermsOfUse.tsx index 704ab5d3..b43389bc 100644 --- a/src/components/common/TermsOfUse.tsx +++ b/src/components/common/TermsOfUse.tsx @@ -4,22 +4,21 @@ import { Icon, TouchableOpacity, Text } from '.'; import { SCREEN_WIDTH, TEXT_COLOR, USAGE_ON_BOARDING } from '../../constants/Constants'; interface Props { - isRTL: boolean, strings: any, value: boolean, onValueSelected(value: boolean): void, toggleWebview(isShow: boolean, usageType: string): void } -const TermsOfUse = ({ isRTL, strings: { location: { consent1, consent2 } }, value, onValueSelected, toggleWebview }: Props) => { +const TermsOfUse = ({ strings: { location: { consent1, consent2 } }, value, onValueSelected, toggleWebview }: Props) => { return ( onValueSelected(!value)}> - + {value && } - + {consent1} toggleWebview(true, USAGE_ON_BOARDING)}>{consent2}