Skip to content

Commit

Permalink
Merge pull request #26493 from Expensify/revert-25990-25855-get-user-…
Browse files Browse the repository at this point in the history
…location

[CP Staging] Revert "Allow user to get current location"

(cherry picked from commit bd99152)
  • Loading branch information
luacmartins authored and OSBotify committed Sep 1, 2023
1 parent b329db4 commit 727d39c
Show file tree
Hide file tree
Showing 21 changed files with 401 additions and 9,743 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ USE_WEB_PROXY=false
USE_WDYR=false
CAPTURE_METRICS=false
ONYX_METRICS=false
GOOGLE_GEOLOCATION_API_KEY=AIzaSyBqg6bMvQU7cPWDKhhzpYqJrTEnSorpiLI

EXPENSIFY_ACCOUNT_ID_ACCOUNTING=-1
EXPENSIFY_ACCOUNT_ID_ADMIN=-1
Expand Down
1 change: 0 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ PUSHER_APP_KEY=268df511a204fbb60884
USE_WEB_PROXY=false
ENVIRONMENT=production
SEND_CRASH_REPORTS=true
GOOGLE_GEOLOCATION_API_KEY=AIzaSyBFKujMpzExz0_z2pAGfPUwkmlaUc-uw1Q
1 change: 0 additions & 1 deletion .env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ PUSHER_APP_KEY=268df511a204fbb60884
USE_WEB_PROXY=false
ENVIRONMENT=staging
SEND_CRASH_REPORTS=true
GOOGLE_GEOLOCATION_API_KEY=AIzaSyD2T1mlByThbUN88O8OPOD8vKuMMwLD4-M
6 changes: 0 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,6 @@ PODS:
- React-Core
- react-native-flipper (0.159.0):
- React-Core
- react-native-geolocation (3.0.6):
- React-Core
- react-native-image-manipulator (1.0.5):
- React
- react-native-image-picker (5.1.0):
Expand Down Expand Up @@ -894,7 +892,6 @@ DEPENDENCIES:
- react-native-config (from `../node_modules/react-native-config`)
- react-native-document-picker (from `../node_modules/react-native-document-picker`)
- react-native-flipper (from `../node_modules/react-native-flipper`)
- "react-native-geolocation (from `../node_modules/@react-native-community/geolocation`)"
- "react-native-image-manipulator (from `../node_modules/@oguzhnatly/react-native-image-manipulator`)"
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
- react-native-key-command (from `../node_modules/react-native-key-command`)
Expand Down Expand Up @@ -1068,8 +1065,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-document-picker"
react-native-flipper:
:path: "../node_modules/react-native-flipper"
react-native-geolocation:
:path: "../node_modules/@react-native-community/geolocation"
react-native-image-manipulator:
:path: "../node_modules/@oguzhnatly/react-native-image-manipulator"
react-native-image-picker:
Expand Down Expand Up @@ -1254,7 +1249,6 @@ SPEC CHECKSUMS:
react-native-config: 7cd105e71d903104e8919261480858940a6b9c0e
react-native-document-picker: f68191637788994baed5f57d12994aa32cf8bf88
react-native-flipper: dc5290261fbeeb2faec1bdc57ae6dd8d562e1de4
react-native-geolocation: 0f7fe8a4c2de477e278b0365cce27d089a8c5903
react-native-image-manipulator: c48f64221cfcd46e9eec53619c4c0374f3328a56
react-native-image-picker: c33d4e79f0a14a2b66e5065e14946ae63749660b
react-native-key-command: c2645ec01eb1fa664606c09480c05cb4220ef67b
Expand Down
9,658 changes: 399 additions & 9,259 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
"@react-native-camera-roll/camera-roll": "5.4.0",
"@react-native-community/clipboard": "^1.5.1",
"@react-native-community/datetimepicker": "^3.5.2",
"@react-native-community/geolocation": "^3.0.6",
"@react-native-community/netinfo": "^9.3.10",
"@react-native-firebase/analytics": "^12.3.0",
"@react-native-firebase/app": "^12.3.0",
Expand Down Expand Up @@ -116,7 +115,6 @@
"react-native-document-picker": "^8.0.0",
"react-native-fast-image": "^8.6.3",
"react-native-fs": "^2.20.0",
"react-native-geolocation": "^1.0.0",
"react-native-gesture-handler": "2.12.0",
"react-native-google-places-autocomplete": "git+https://github.com/Expensify/react-native-google-places-autocomplete.git#ee87343c3e827ff7818abc71b6bb04fcc1f120e0",
"react-native-haptic-feedback": "^1.13.0",
Expand Down
2 changes: 0 additions & 2 deletions src/CONFIG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const secureExpensifyUrl = Url.addTrailingForwardSlash(get(Config, 'SECURE_EXPEN
const useNgrok = get(Config, 'USE_NGROK', 'false') === 'true';
const useWebProxy = get(Config, 'USE_WEB_PROXY', 'true') === 'true';
const expensifyComWithProxy = getPlatform() === 'web' && useWebProxy ? '/' : expensifyURL;
const googleGeolocationAPIKey = get(Config, 'GOOGLE_GEOLOCATION_API_KEY', 'AIzaSyBqg6bMvQU7cPWDKhhzpYqJrTEnSorpiLI');

// Throw errors on dev if config variables are not set correctly
if (ENVIRONMENT === CONST.ENVIRONMENT.DEV) {
Expand Down Expand Up @@ -92,5 +91,4 @@ export default {
WEB_CLIENT_ID: '921154746561-gpsoaqgqfuqrfsjdf8l7vohfkfj7b9up.apps.googleusercontent.com',
IOS_CLIENT_ID: '921154746561-s3uqn2oe4m85tufi6mqflbfbuajrm2i3.apps.googleusercontent.com',
},
GOOGLE_GEOLOCATION_API_KEY: googleGeolocationAPIKey,
} as const;
4 changes: 0 additions & 4 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ const ONYXKEYS = {
* It is expected to provide a two-letter country code such as US for United States, and so on. */
COUNTRY: 'country',

/** Represents current user's location error code, this error code comes from the geolocation api */
LOCATION_ERROR_CODE: 'locationErrorCode',

/** Contains all the users settings for the Settings page and sub pages */
USER: 'user',

Expand Down Expand Up @@ -323,7 +320,6 @@ type OnyxValues = {
[ONYXKEYS.SCREEN_SHARE_REQUEST]: OnyxTypes.ScreenShareRequest;
[ONYXKEYS.COUNTRY_CODE]: number;
[ONYXKEYS.COUNTRY]: string;
[ONYXKEYS.LOCATION_ERROR_CODE]: number;
[ONYXKEYS.USER]: OnyxTypes.User;
[ONYXKEYS.LOGIN_LIST]: OnyxTypes.Login;
[ONYXKEYS.SESSION]: OnyxTypes.Session;
Expand Down
99 changes: 0 additions & 99 deletions src/components/LocationErrorMessage/BaseLocationErrorMessage.js

This file was deleted.

16 changes: 0 additions & 16 deletions src/components/LocationErrorMessage/index.js

This file was deleted.

15 changes: 0 additions & 15 deletions src/components/LocationErrorMessage/index.native.js

This file was deleted.

88 changes: 0 additions & 88 deletions src/components/UserCurrentLocationButton.js

This file was deleted.

9 changes: 1 addition & 8 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,6 @@ export default {
recent: 'Recent',
all: 'All',
},
location: {
useCurrent: 'Use current location',
notFound: 'We were unable to find your location, please try again or enter an address manually',
permissionDenied: 'It looks like you have denied permission to your location.',
allowPermission: 'allow location permission in settings',
tryAgain: 'and then try again.',
},
anonymousReportFooter: {
logoTagline: 'Join the discussion.',
},
Expand Down Expand Up @@ -1664,7 +1657,7 @@ export default {
onlineSubtitle: 'One moment while we set up the map',
},
errors: {
selectSuggestedAddress: 'Please select a suggested address or use current location',
selectSuggestedAddress: 'Please select a suggested address',
},
},
countrySelectorModal: {
Expand Down
9 changes: 1 addition & 8 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,6 @@ export default {
recent: 'Reciente',
all: 'Todo',
},
location: {
useCurrent: 'Usar ubicación actual',
notFound: 'No pudimos encontrar su ubicación, inténtelo nuevamente o ingrese una dirección manualmente',
permissionDenied: 'Parece que has denegado el permiso a tu ubicación.',
allowPermission: 'permitir permiso de ubicación en la configuración',
tryAgain: 'y luego inténtalo de nuevo.',
},
anonymousReportFooter: {
logoTagline: 'Únete a la discusión.',
},
Expand Down Expand Up @@ -2152,7 +2145,7 @@ export default {
onlineSubtitle: 'Un momento mientras configuramos el mapa',
},
errors: {
selectSuggestedAddress: 'Por favor, selecciona una dirección sugerida o usa la ubicación actual.',
selectSuggestedAddress: 'Por favor, selecciona una dirección sugerida',
},
},
countrySelectorModal: {
Expand Down
Loading

0 comments on commit 727d39c

Please sign in to comment.