From ebdb26ecb1f64cd3b54ef4f487c35d361f68ad80 Mon Sep 17 00:00:00 2001 From: Eric Kirkham Date: Wed, 11 Mar 2020 14:03:48 -0700 Subject: [PATCH] use correct naming for accelerometer permissions --- src/components/Onboarding/OnboardingAccelerometer.tsx | 7 ++++--- src/components/modals/MotionWarning.tsx | 9 +++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/Onboarding/OnboardingAccelerometer.tsx b/src/components/Onboarding/OnboardingAccelerometer.tsx index 967288b72..360db7de1 100644 --- a/src/components/Onboarding/OnboardingAccelerometer.tsx +++ b/src/components/Onboarding/OnboardingAccelerometer.tsx @@ -4,6 +4,7 @@ import {RText, GradientButton} from '../common' import {WHITE} from 'src/constants/colors' import {s} from '../Global' import {onboardingSlideStyle as styles} from '../styles' +import {accelerometerSettingsName} from '../modals/MotionWarning' type Props = { onPress: () => void // the function that gets called when the user presses "Allow Accelerometer" @@ -19,13 +20,13 @@ const OnboardingAccelerometer = ({onPress}: Props) => ( }} > - Allow{'\r\n'} Accelerometer + {`Allow\r\n${accelerometerSettingsName}`} - Using the accelerometer increases battery-efficiency by intelligently toggling - location-tracking while moving. + {`Using ${accelerometerSettingsName} increases battery-efficiency by intelligently toggling + location-tracking while moving.`} diff --git a/src/components/modals/MotionWarning.tsx b/src/components/modals/MotionWarning.tsx index 0e223588a..da5d2b2c5 100644 --- a/src/components/modals/MotionWarning.tsx +++ b/src/components/modals/MotionWarning.tsx @@ -10,6 +10,9 @@ import {useAppState} from 'react-native-hooks' import {Actions} from 'react-native-router-flux' import {usePermissionStore} from '../../utils/injectors' +export const accelerometerSettingsName = + Platform.OS === 'ios' ? 'Motion & Fitness' : 'Physical Activity' + const MotionWarning = observer(() => { const currentAppState = useAppState() const permissionStore = usePermissionStore() @@ -21,8 +24,6 @@ const MotionWarning = observer(() => { } }, [currentAppState]) - const settingsName = Platform.OS === 'ios' ? 'Motion & Fitness' : 'Physical Activity' - return ( { ]} > - {`Allow\r\n${settingsName}`} + {`Allow\r\n${accelerometerSettingsName}`} - {`Using "${settingsName}" increases battery efficiency by intelligently toggling location tracking while moving.`} + {`Using "${accelerometerSettingsName}" increases battery efficiency by intelligently toggling location tracking while moving.`}