update dependencies (#5886)
This commit is contained in:
parent
5dc96fb4e4
commit
62d1ff5744
9 changed files with 1224 additions and 1174 deletions
|
|
@ -28,17 +28,17 @@ PODS:
|
|||
- MMKV (1.2.10):
|
||||
- MMKVCore (~> 1.2.10)
|
||||
- MMKVCore (1.2.10)
|
||||
- Permission-Camera (3.1.0):
|
||||
- Permission-Camera (3.2.0):
|
||||
- RNPermissions
|
||||
- Permission-MediaLibrary (3.1.0):
|
||||
- Permission-MediaLibrary (3.2.0):
|
||||
- RNPermissions
|
||||
- Permission-Microphone (3.1.0):
|
||||
- Permission-Microphone (3.2.0):
|
||||
- RNPermissions
|
||||
- Permission-Notifications (3.1.0):
|
||||
- Permission-Notifications (3.2.0):
|
||||
- RNPermissions
|
||||
- Permission-PhotoLibrary (3.1.0):
|
||||
- Permission-PhotoLibrary (3.2.0):
|
||||
- RNPermissions
|
||||
- Permission-PhotoLibraryAddOnly (3.1.0):
|
||||
- Permission-PhotoLibraryAddOnly (3.2.0):
|
||||
- RNPermissions
|
||||
- RCT-Folly (2021.06.28.00-v2):
|
||||
- boost
|
||||
|
|
@ -245,20 +245,20 @@ PODS:
|
|||
- React-Core
|
||||
- react-native-cookies (6.0.11):
|
||||
- React-Core
|
||||
- react-native-document-picker (7.1.1):
|
||||
- react-native-document-picker (7.1.3):
|
||||
- React-Core
|
||||
- react-native-hw-keyboard-event (0.0.4):
|
||||
- React
|
||||
- react-native-image-picker (4.5.0):
|
||||
- react-native-image-picker (4.6.0):
|
||||
- React-Core
|
||||
- react-native-local-auth (1.6.0):
|
||||
- React
|
||||
- react-native-mmkv-storage (0.6.6):
|
||||
- MMKV (= 1.2.10)
|
||||
- React-Core
|
||||
- react-native-netinfo (7.1.5):
|
||||
- react-native-netinfo (7.1.7):
|
||||
- React-Core
|
||||
- react-native-notifications (4.1.2):
|
||||
- react-native-notifications (4.1.3):
|
||||
- React-Core
|
||||
- react-native-passcode-status (1.1.2):
|
||||
- React
|
||||
|
|
@ -351,13 +351,13 @@ PODS:
|
|||
- React
|
||||
- ReactNativeKeyboardTrackingView (5.7.0):
|
||||
- React
|
||||
- ReactNativeNavigation (7.24.0):
|
||||
- ReactNativeNavigation (7.24.3):
|
||||
- HMSegmentedControl
|
||||
- React-Core
|
||||
- React-RCTImage
|
||||
- React-RCTText
|
||||
- ReactNativeNavigation/Core (= 7.24.0)
|
||||
- ReactNativeNavigation/Core (7.24.0):
|
||||
- ReactNativeNavigation/Core (= 7.24.3)
|
||||
- ReactNativeNavigation/Core (7.24.3):
|
||||
- HMSegmentedControl
|
||||
- React-Core
|
||||
- React-RCTImage
|
||||
|
|
@ -370,31 +370,27 @@ PODS:
|
|||
- React-Core
|
||||
- RNCMaskedView (0.1.11):
|
||||
- React
|
||||
- RNDateTimePicker (4.0.1):
|
||||
- RNDateTimePicker (5.1.0):
|
||||
- React-Core
|
||||
- RNDeviceInfo (8.4.8):
|
||||
- React-Core
|
||||
- RNDevMenu (4.0.2):
|
||||
- React-Core
|
||||
- React-Core/DevSupport
|
||||
- React-RCTNetwork
|
||||
- RNFastImage (8.5.11):
|
||||
- React-Core
|
||||
- SDWebImage (~> 5.11.1)
|
||||
- SDWebImageWebPCoder (~> 0.8.4)
|
||||
- RNFileViewer (2.1.4):
|
||||
- RNFileViewer (2.1.5):
|
||||
- React-Core
|
||||
- RNGestureHandler (2.1.0):
|
||||
- React-Core
|
||||
- RNKeychain (8.0.0):
|
||||
- React-Core
|
||||
- RNLocalize (2.1.5):
|
||||
- RNLocalize (2.1.7):
|
||||
- React-Core
|
||||
- RNPermissions (3.1.0):
|
||||
- RNPermissions (3.2.0):
|
||||
- React-Core
|
||||
- RNReactNativeHapticFeedback (1.13.0):
|
||||
- React-Core
|
||||
- RNReanimated (2.3.0):
|
||||
- RNReanimated (2.3.1):
|
||||
- DoubleConversion
|
||||
- FBLazyVector
|
||||
- FBReactNativeSpec
|
||||
|
|
@ -428,9 +424,9 @@ PODS:
|
|||
- RNScreens (3.10.1):
|
||||
- React-Core
|
||||
- React-RCTImage
|
||||
- RNSentry (3.2.7):
|
||||
- RNSentry (3.2.10):
|
||||
- React-Core
|
||||
- Sentry (= 7.5.4)
|
||||
- Sentry (= 7.7.0)
|
||||
- RNShare (7.3.2):
|
||||
- React-Core
|
||||
- RNSVG (12.1.1):
|
||||
|
|
@ -444,9 +440,9 @@ PODS:
|
|||
- SDWebImageWebPCoder (0.8.4):
|
||||
- libwebp (~> 1.0)
|
||||
- SDWebImage/Core (~> 5.10)
|
||||
- Sentry (7.5.4):
|
||||
- Sentry/Core (= 7.5.4)
|
||||
- Sentry/Core (7.5.4)
|
||||
- Sentry (7.7.0):
|
||||
- Sentry/Core (= 7.7.0)
|
||||
- Sentry/Core (7.7.0)
|
||||
- Swime (3.0.6)
|
||||
- XCDYouTubeKit (2.15.2)
|
||||
- Yoga (1.14.0)
|
||||
|
|
@ -520,7 +516,6 @@ DEPENDENCIES:
|
|||
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
|
||||
- "RNDateTimePicker (from `../node_modules/@react-native-community/datetimepicker`)"
|
||||
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
|
||||
- RNDevMenu (from `../node_modules/react-native-dev-menu`)
|
||||
- RNFastImage (from `../node_modules/react-native-fast-image`)
|
||||
- RNFileViewer (from `../node_modules/react-native-file-viewer`)
|
||||
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
|
||||
|
|
@ -684,8 +679,6 @@ EXTERNAL SOURCES:
|
|||
:path: "../node_modules/@react-native-community/datetimepicker"
|
||||
RNDeviceInfo:
|
||||
:path: "../node_modules/react-native-device-info"
|
||||
RNDevMenu:
|
||||
:path: "../node_modules/react-native-dev-menu"
|
||||
RNFastImage:
|
||||
:path: "../node_modules/react-native-fast-image"
|
||||
RNFileViewer:
|
||||
|
|
@ -739,12 +732,12 @@ SPEC CHECKSUMS:
|
|||
libwebp: e90b9c01d99205d03b6bb8f2c8c415e5a4ef66f0
|
||||
MMKV: 76033b9ace2006623308910a3afcc0e25eba3140
|
||||
MMKVCore: b00e7a09ec77a1b916aef336eedd3b99ec249978
|
||||
Permission-Camera: 0db4fd6e1c556c1cf47f38b989a8084cea3ec3dd
|
||||
Permission-MediaLibrary: eb4dc997f8d3f81f28940f997651cd1a2bf16149
|
||||
Permission-Microphone: 7b75718196244a6e59dd60f82f12962562c2ea12
|
||||
Permission-Notifications: e247d69c22ae72770d1c5314ad6ccd1256c57c83
|
||||
Permission-PhotoLibrary: 9dcf80d1353d81b9f1e210c34291591236aaf2b6
|
||||
Permission-PhotoLibraryAddOnly: 3d359683511129433080279c409b29e792d69c71
|
||||
Permission-Camera: 53efcbb755b0e8bdf253dbb27cc7559ccfce8480
|
||||
Permission-MediaLibrary: d35adbe2a069f2e16121fd79cf15959e86a3f74a
|
||||
Permission-Microphone: db557c64f7e9ad41bff6b3f6d93df3b67311855b
|
||||
Permission-Notifications: bb420c3d28328df24de1b476b41ed8249ccf2537
|
||||
Permission-PhotoLibrary: 7bec836dcdd04a0bfb200c314f1aae06d4476357
|
||||
Permission-PhotoLibraryAddOnly: 06fb0cdb1d35683b235ad8c464ef0ecc88859ea3
|
||||
RCT-Folly: a21c126816d8025b547704b777a2ba552f3d9fa9
|
||||
RCTRequired: 4bf86c70714490bca4bf2696148638284622644b
|
||||
RCTTypeSafety: c475a7059eb77935fa53d2c17db299893f057d5d
|
||||
|
|
@ -760,13 +753,13 @@ SPEC CHECKSUMS:
|
|||
React-logger: 933f80c97c633ee8965d609876848148e3fef438
|
||||
react-native-cameraroll: 2957f2bce63ae896a848fbe0d5352c1bd4d20866
|
||||
react-native-cookies: cd92f3824ed1e32a20802e8185101e14bb5b76da
|
||||
react-native-document-picker: f4cc4df2eff8c9015d862a59bdaef11a153f1292
|
||||
react-native-document-picker: ec07866a30707f23660c0f3ae591d669d3e89096
|
||||
react-native-hw-keyboard-event: b517cefb8d5c659a38049c582de85ff43337dc53
|
||||
react-native-image-picker: dcbfbdc26ce176e13b82a2bfada3786c7afa2307
|
||||
react-native-image-picker: 8c83c5c7d137e866bcb9a2db93f1e1ca866fddbf
|
||||
react-native-local-auth: 49d336dcf0cb0268a930100013a6525844093844
|
||||
react-native-mmkv-storage: 28514ffe9e67c5223b3d00e725bc72c8194a9eee
|
||||
react-native-netinfo: a3ece35948490a9507da0c56694da525b83357df
|
||||
react-native-notifications: 97c14bf84c64bd6a6eb7bdcdb916036d93d33428
|
||||
react-native-netinfo: 27f287f2d191693f3b9d01a4273137fcf91c3b5d
|
||||
react-native-notifications: 805108822ceff3440644d5701944f0cda35f5b4b
|
||||
react-native-passcode-status: e78f76b3c8db613e6ced6bd40b54aa4f53374173
|
||||
react-native-paste-input: 4b73d92119105ffc0a5ec2145c4a217c107bcb3b
|
||||
react-native-safe-area: e8230b0017d76c00de6b01e2412dcf86b127c6a3
|
||||
|
|
@ -790,32 +783,31 @@ SPEC CHECKSUMS:
|
|||
ReactNativeExceptionHandler: b11ff67c78802b2f62eed0e10e75cb1ef7947c60
|
||||
ReactNativeIncallManager: a840ef75640518065742a893e6c6ff98ee820039
|
||||
ReactNativeKeyboardTrackingView: 02137fac3b2ebd330d74fa54ead48b14750a2306
|
||||
ReactNativeNavigation: 61887ca5804d6eb3185c52593ee8e211fb8cd7eb
|
||||
ReactNativeNavigation: e16d74494fbac09d9ff9681b8089a20fad593aeb
|
||||
rn-fetch-blob: 17961aec08caae68bb8fc0e5b40f93b3acfa6932
|
||||
RNCAsyncStorage: ea6b5c280997b2b32a587793163b1f10e580c4f7
|
||||
RNCClipboard: 41d8d918092ae8e676f18adada19104fa3e68495
|
||||
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
|
||||
RNDateTimePicker: a654a0ebfa3dd78bbe5389421aa2d3d5b2744e47
|
||||
RNDateTimePicker: 1dd15d7ed1ab7d999056bc77879a42920d139c12
|
||||
RNDeviceInfo: 0400a6d0c94186d1120c3cbd97b23abc022187a9
|
||||
RNDevMenu: fd325b5554b61fe7f48d9205a3877cf5ee88cd7c
|
||||
RNFastImage: 1f2cab428712a4baaf78d6169eaec7f622556dd7
|
||||
RNFileViewer: 83cc066ad795b1f986791d03b56fe0ee14b6a69f
|
||||
RNFileViewer: ce7ca3ac370e18554d35d6355cffd7c30437c592
|
||||
RNGestureHandler: e5c7cab5f214503dcefd6b2b0cefb050e1f51c4a
|
||||
RNKeychain: 4f63aada75ebafd26f4bc2c670199461eab85d94
|
||||
RNLocalize: 74b82db20cc3895ccc25af992c644879bcec2815
|
||||
RNPermissions: 4b54095940aea8c03fa3e6c92d4ac3647b31ed4e
|
||||
RNLocalize: f567ea0e35116a641cdffe6683b0d212d568f32a
|
||||
RNPermissions: f7ebe52db07c00901127966ca080b4ec6a6ceb0a
|
||||
RNReactNativeHapticFeedback: b83bfb4b537bdd78eb4f6ffe63c6884f7b049ead
|
||||
RNReanimated: 569c269480a76e39196aa17a5df08ef1561db5ff
|
||||
RNReanimated: da3860204e5660c0dd66739936732197d359d753
|
||||
RNRudderSdk: 1a629f815632d62459ea1add0fd4e853598d34a5
|
||||
RNScreens: 522705f2e5c9d27efb17f24aceb2bf8335bc7b8e
|
||||
RNSentry: bf1f0970fffd3519a5cf553217f281bbb5b10de4
|
||||
RNSentry: 04bb48bfdd435f5b218cf363f89e6419e9a2460c
|
||||
RNShare: d76b8c9c6e6ffb38fc18f40b4338c9d867592ed3
|
||||
RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f
|
||||
RNVectorIcons: 4143ba35feebab8fdbe6bc43d1e776b393d47ac8
|
||||
Rudder: db8cfa8e5757599dfec74a1bdd04dc17b3859789
|
||||
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
|
||||
SDWebImageWebPCoder: f93010f3f6c031e2f8fb3081ca4ee6966c539815
|
||||
Sentry: 5c5dd4005f3b7b9765d5a8871232cddbd0d888b7
|
||||
Sentry: e58e062056a061ae1145e22ad3dff6e506bff177
|
||||
Swime: d7b2c277503b6cea317774aedc2dce05613f8b0b
|
||||
XCDYouTubeKit: b120aced3d8638ffb570c5450cddb5a1dac448c7
|
||||
Yoga: e7dc4e71caba6472ff48ad7d234389b91dadc280
|
||||
|
|
|
|||
2092
package-lock.json
generated
2092
package-lock.json
generated
File diff suppressed because it is too large
Load diff
67
package.json
67
package.json
|
|
@ -11,14 +11,14 @@
|
|||
"@react-native-async-storage/async-storage": "1.15.14",
|
||||
"@react-native-community/cameraroll": "4.1.2",
|
||||
"@react-native-community/clipboard": "1.5.1",
|
||||
"@react-native-community/datetimepicker": "4.0.1",
|
||||
"@react-native-community/datetimepicker": "5.1.0",
|
||||
"@react-native-community/masked-view": "0.1.11",
|
||||
"@react-native-community/netinfo": "7.1.5",
|
||||
"@react-native-community/netinfo": "7.1.7",
|
||||
"@react-native-cookies/cookies": "6.0.11",
|
||||
"@react-navigation/native": "6.0.6",
|
||||
"@react-navigation/stack": "6.0.11",
|
||||
"@rudderstack/rudder-sdk-react-native": "1.1.0",
|
||||
"@sentry/react-native": "3.2.7",
|
||||
"@sentry/react-native": "3.2.10",
|
||||
"@types/redux-mock-store": "1.0.3",
|
||||
"analytics-react-native": "1.2.0",
|
||||
"array.prototype.flat": "1.2.5",
|
||||
|
|
@ -30,42 +30,42 @@
|
|||
"deepmerge": "4.2.2",
|
||||
"emoji-regex": "10.0.0",
|
||||
"form-data": "4.0.0",
|
||||
"fuse.js": "6.4.6",
|
||||
"fuse.js": "6.5.3",
|
||||
"intl": "1.2.5",
|
||||
"jail-monkey": "2.6.0",
|
||||
"mime-db": "1.51.0",
|
||||
"moment-timezone": "0.5.34",
|
||||
"prop-types": "15.7.2",
|
||||
"prop-types": "15.8.0",
|
||||
"react": "17.0.2",
|
||||
"react-intl": "2.8.0",
|
||||
"react-native": "0.66.4",
|
||||
"react-native-android-open-settings": "1.3.0",
|
||||
"react-native-animatable": "1.3.3",
|
||||
"react-native-button": "3.0.1",
|
||||
"react-native-calendars": "1.1271.0",
|
||||
"react-native-calendars": "1.1274.0",
|
||||
"react-native-device-info": "8.4.8",
|
||||
"react-native-document-picker": "7.1.1",
|
||||
"react-native-document-picker": "7.1.3",
|
||||
"react-native-elements": "3.4.2",
|
||||
"react-native-exception-handler": "2.10.10",
|
||||
"react-native-fast-image": "8.5.11",
|
||||
"react-native-file-viewer": "2.1.4",
|
||||
"react-native-file-viewer": "2.1.5",
|
||||
"react-native-gesture-handler": "2.1.0",
|
||||
"react-native-haptic-feedback": "1.13.0",
|
||||
"react-native-hw-keyboard-event": "0.0.4",
|
||||
"react-native-image-picker": "4.5.0",
|
||||
"react-native-image-picker": "4.6.0",
|
||||
"react-native-incall-manager": "3.3.0",
|
||||
"react-native-keyboard-aware-scrollview": "2.1.0",
|
||||
"react-native-keyboard-tracking-view": "5.7.0",
|
||||
"react-native-keychain": "8.0.0",
|
||||
"react-native-linear-gradient": "2.5.6",
|
||||
"react-native-local-auth": "1.6.0",
|
||||
"react-native-localize": "2.1.5",
|
||||
"react-native-localize": "2.1.7",
|
||||
"react-native-mmkv-storage": "0.6.6",
|
||||
"react-native-navigation": "7.24.0",
|
||||
"react-native-notifications": "4.1.2",
|
||||
"react-native-navigation": "7.24.3",
|
||||
"react-native-notifications": "4.1.3",
|
||||
"react-native-passcode-status": "1.1.2",
|
||||
"react-native-permissions": "3.1.0",
|
||||
"react-native-reanimated": "2.3.0",
|
||||
"react-native-permissions": "3.2.0",
|
||||
"react-native-reanimated": "2.3.1",
|
||||
"react-native-redash": "16.2.3",
|
||||
"react-native-safe-area": "0.5.1",
|
||||
"react-native-safe-area-context": "3.3.2",
|
||||
|
|
@ -99,11 +99,11 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.16.0",
|
||||
"@babel/core": "7.16.0",
|
||||
"@babel/plugin-transform-runtime": "7.16.4",
|
||||
"@babel/preset-env": "7.16.4",
|
||||
"@babel/register": "7.16.0",
|
||||
"@babel/runtime": "7.16.3",
|
||||
"@babel/core": "7.16.5",
|
||||
"@babel/plugin-transform-runtime": "7.16.5",
|
||||
"@babel/preset-env": "7.16.5",
|
||||
"@babel/register": "7.16.5",
|
||||
"@babel/runtime": "7.16.5",
|
||||
"@react-native-community/eslint-config": "3.0.1",
|
||||
"@testing-library/react-native": "9.0.0",
|
||||
"@types/base-64": "1.0.0",
|
||||
|
|
@ -113,23 +113,23 @@
|
|||
"@types/lodash": "4.14.178",
|
||||
"@types/moment-timezone": "0.5.30",
|
||||
"@types/querystringify": "2.0.0",
|
||||
"@types/react": "17.0.37",
|
||||
"@types/react-native": "0.66.8",
|
||||
"@types/react": "17.0.38",
|
||||
"@types/react-native": "0.66.10",
|
||||
"@types/react-native-incall-manager": "3.2.1",
|
||||
"@types/react-native-share": "3.3.3",
|
||||
"@types/react-native-video": "5.0.11",
|
||||
"@types/react-redux": "7.1.20",
|
||||
"@types/react-redux": "7.1.21",
|
||||
"@types/react-test-renderer": "17.0.1",
|
||||
"@types/readable-stream": "2.3.12",
|
||||
"@types/semver": "7.3.9",
|
||||
"@types/shallow-equals": "1.0.0",
|
||||
"@types/tinycolor2": "1.4.3",
|
||||
"@types/underscore": "1.11.4",
|
||||
"@types/url-parse": "1.4.5",
|
||||
"@typescript-eslint/eslint-plugin": "5.6.0",
|
||||
"@typescript-eslint/parser": "5.6.0",
|
||||
"@types/url-parse": "1.4.6",
|
||||
"@typescript-eslint/eslint-plugin": "5.8.0",
|
||||
"@typescript-eslint/parser": "5.8.0",
|
||||
"babel-eslint": "10.1.0",
|
||||
"babel-jest": "27.4.4",
|
||||
"babel-jest": "27.4.5",
|
||||
"babel-loader": "8.2.3",
|
||||
"babel-plugin-module-resolver": "4.1.0",
|
||||
"babel-plugin-transform-remove-console": "6.9.4",
|
||||
|
|
@ -143,13 +143,13 @@
|
|||
"eslint-plugin-import": "2.25.3",
|
||||
"eslint-plugin-jest": "25.3.0",
|
||||
"eslint-plugin-mattermost": "git://github.com/mattermost/eslint-plugin-mattermost#070ce792d105482ffb2b27cfc0b7e78b3d20acee",
|
||||
"eslint-plugin-react": "7.27.1",
|
||||
"eslint-plugin-react": "7.28.0",
|
||||
"expect": "27.4.2",
|
||||
"harmony-reflect": "1.6.2",
|
||||
"husky": "7.0.4",
|
||||
"isomorphic-fetch": "3.0.0",
|
||||
"jest": "27.4.4",
|
||||
"jest-cli": "27.4.4",
|
||||
"jest": "27.4.5",
|
||||
"jest-cli": "27.4.5",
|
||||
"jest-enzyme": "7.1.2",
|
||||
"jetifier": "2.0.0",
|
||||
"jsdom-global": "3.0.2",
|
||||
|
|
@ -161,15 +161,14 @@
|
|||
"nyc": "15.1.0",
|
||||
"patch-package": "6.4.7",
|
||||
"react-dom": "17.0.2",
|
||||
"react-native-dev-menu": "4.0.2",
|
||||
"react-native-dotenv": "3.3.0",
|
||||
"react-native-dotenv": "3.3.1",
|
||||
"react-test-renderer": "17.0.2",
|
||||
"redux-mock-store": "1.5.4",
|
||||
"redux-persist-node-storage": "2.0.0",
|
||||
"socketcluster": "16.0.2",
|
||||
"ts-jest": "27.1.1",
|
||||
"typescript": "4.5.3",
|
||||
"underscore": "1.13.1",
|
||||
"ts-jest": "27.1.2",
|
||||
"typescript": "4.5.4",
|
||||
"underscore": "1.13.2",
|
||||
"util": "0.12.4"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -1,103 +0,0 @@
|
|||
diff --git a/node_modules/react-native-file-viewer/android/src/main/java/com/vinzscam/reactnativefileviewer/RNFileViewerModule.java b/node_modules/react-native-file-viewer/android/src/main/java/com/vinzscam/reactnativefileviewer/RNFileViewerModule.java
|
||||
index 11fd79f..92156a1 100644
|
||||
--- a/node_modules/react-native-file-viewer/android/src/main/java/com/vinzscam/reactnativefileviewer/RNFileViewerModule.java
|
||||
+++ b/node_modules/react-native-file-viewer/android/src/main/java/com/vinzscam/reactnativefileviewer/RNFileViewerModule.java
|
||||
@@ -6,6 +6,8 @@ import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
import androidx.core.content.FileProvider;
|
||||
+
|
||||
+import android.text.TextUtils;
|
||||
import android.webkit.MimeTypeMap;
|
||||
|
||||
import com.facebook.react.bridge.ActivityEventListener;
|
||||
@@ -41,6 +43,21 @@ public class RNFileViewerModule extends ReactContextBaseJavaModule {
|
||||
reactContext.addActivityEventListener(mActivityEventListener);
|
||||
}
|
||||
|
||||
+ private static String getExtension(String uri) {
|
||||
+ if (uri == null) {
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ int dot = uri.lastIndexOf(".");
|
||||
+ if (dot >= 0) {
|
||||
+ // exclude the dot
|
||||
+ return uri.substring(dot + 1);
|
||||
+ } else {
|
||||
+ // No extension.
|
||||
+ return "";
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@ReactMethod
|
||||
public void open(String path, Integer currentId, ReadableMap options) {
|
||||
Uri contentUri = null;
|
||||
@@ -51,6 +68,7 @@ public class RNFileViewerModule extends ReactContextBaseJavaModule {
|
||||
contentUri = Uri.parse(path);
|
||||
} else {
|
||||
File newFile = new File(path);
|
||||
+
|
||||
try {
|
||||
final String packageName = getCurrentActivity().getPackageName();
|
||||
final String authority = new StringBuilder(packageName).append(".provider").toString();
|
||||
@@ -68,6 +86,9 @@ public class RNFileViewerModule extends ReactContextBaseJavaModule {
|
||||
}
|
||||
|
||||
String extension = MimeTypeMap.getFileExtensionFromUrl(path).toLowerCase();
|
||||
+ if (TextUtils.isEmpty(extension)) {
|
||||
+ extension = getExtension(path);
|
||||
+ }
|
||||
String mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
|
||||
|
||||
Intent shareIntent = new Intent();
|
||||
@@ -84,9 +105,9 @@ public class RNFileViewerModule extends ReactContextBaseJavaModule {
|
||||
intentActivity = shareIntent;
|
||||
}
|
||||
|
||||
- PackageManager pm = getCurrentActivity().getPackageManager();
|
||||
-
|
||||
- if (shareIntent.resolveActivity(pm) != null) {
|
||||
+// PackageManager pm = getCurrentActivity().getPackageManager();
|
||||
+//
|
||||
+// if (shareIntent.resolveActivity(pm) != null) {
|
||||
try {
|
||||
getCurrentActivity().startActivityForResult(intentActivity, currentId + RN_FILE_VIEWER_REQUEST);
|
||||
sendEvent(OPEN_EVENT, currentId, null);
|
||||
@@ -94,21 +115,21 @@ public class RNFileViewerModule extends ReactContextBaseJavaModule {
|
||||
catch(Exception e) {
|
||||
sendEvent(OPEN_EVENT, currentId, e.getMessage());
|
||||
}
|
||||
- } else {
|
||||
- try {
|
||||
- if (showStoreSuggestions) {
|
||||
- if(mimeType == null) {
|
||||
- throw new Exception("It wasn't possible to detect the type of the file");
|
||||
- }
|
||||
- Intent storeIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=" + mimeType + "&c=apps"));
|
||||
- getCurrentActivity().startActivity(storeIntent);
|
||||
- }
|
||||
- throw new Exception("No app associated with this mime type");
|
||||
- }
|
||||
- catch(Exception e) {
|
||||
- sendEvent(OPEN_EVENT, currentId, e.getMessage());
|
||||
- }
|
||||
- }
|
||||
+// } else {
|
||||
+// try {
|
||||
+// if (showStoreSuggestions) {
|
||||
+// if(mimeType == null) {
|
||||
+// throw new Exception("It wasn't possible to detect the type of the file");
|
||||
+// }
|
||||
+// Intent storeIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=" + mimeType + "&c=apps"));
|
||||
+// getCurrentActivity().startActivity(storeIntent);
|
||||
+// }
|
||||
+// throw new Exception("No app associated with this mime type");
|
||||
+// }
|
||||
+// catch(Exception e) {
|
||||
+// sendEvent(OPEN_EVENT, currentId, e.getMessage());
|
||||
+// }
|
||||
+// }
|
||||
}
|
||||
|
||||
@Override
|
||||
44
patches/react-native-file-viewer+2.1.5.patch
Normal file
44
patches/react-native-file-viewer+2.1.5.patch
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
diff --git a/node_modules/react-native-file-viewer/android/src/main/java/com/vinzscam/reactnativefileviewer/RNFileViewerModule.java b/node_modules/react-native-file-viewer/android/src/main/java/com/vinzscam/reactnativefileviewer/RNFileViewerModule.java
|
||||
index 93f7881..d81f609 100644
|
||||
--- a/node_modules/react-native-file-viewer/android/src/main/java/com/vinzscam/reactnativefileviewer/RNFileViewerModule.java
|
||||
+++ b/node_modules/react-native-file-viewer/android/src/main/java/com/vinzscam/reactnativefileviewer/RNFileViewerModule.java
|
||||
@@ -6,6 +6,7 @@ import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
import androidx.core.content.FileProvider;
|
||||
+import android.text.TextUtils;
|
||||
import android.webkit.MimeTypeMap;
|
||||
|
||||
import com.facebook.react.bridge.ActivityEventListener;
|
||||
@@ -41,6 +42,21 @@ public class RNFileViewerModule extends ReactContextBaseJavaModule {
|
||||
reactContext.addActivityEventListener(mActivityEventListener);
|
||||
}
|
||||
|
||||
+ private static String getExtension(String uri) {
|
||||
+ if (uri == null) {
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ int dot = uri.lastIndexOf(".");
|
||||
+ if (dot >= 0) {
|
||||
+ // exclude the dot
|
||||
+ return uri.substring(dot + 1);
|
||||
+ } else {
|
||||
+ // No extension.
|
||||
+ return "";
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@ReactMethod
|
||||
public void open(String path, Integer currentId, ReadableMap options) {
|
||||
Uri contentUri = null;
|
||||
@@ -74,6 +90,9 @@ public class RNFileViewerModule extends ReactContextBaseJavaModule {
|
||||
}
|
||||
|
||||
String extension = MimeTypeMap.getFileExtensionFromUrl(path).toLowerCase();
|
||||
+ if (TextUtils.isEmpty(extension)) {
|
||||
+ extension = getExtension(path);
|
||||
+ }
|
||||
String mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
|
||||
|
||||
Intent shareIntent = new Intent();
|
||||
|
|
@ -275,8 +275,6 @@ jest.mock('react-native-share', () => ({
|
|||
default: jest.fn(),
|
||||
}));
|
||||
|
||||
jest.mock('react-native-dev-menu');
|
||||
|
||||
jest.mock('app/actions/navigation', () => ({
|
||||
resetToChannel: jest.fn(),
|
||||
resetToSelectServer: jest.fn(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue