Android emulator triggers too many share events

This commit is contained in:
xmflsct 2022-08-13 00:00:18 +02:00
parent 397c6a2f44
commit 034208fbe1
2 changed files with 13 additions and 28 deletions

View File

@ -4,8 +4,6 @@ PODS:
- DoubleConversion (1.1.6)
- EASClient (0.3.0):
- ExpoModulesCore
- EXApplication (4.2.2):
- ExpoModulesCore
- EXAV (12.0.4):
- ExpoModulesCore
- React-runtimeexecutor
@ -25,8 +23,6 @@ PODS:
- EXFirebaseCore (5.1.1):
- ExpoModulesCore
- Firebase/Core (= 8.14.0)
- EXFont (10.2.0):
- ExpoModulesCore
- EXJSONUtils (0.3.0)
- EXManifests (0.3.1):
- EXJSONUtils
@ -38,8 +34,6 @@ PODS:
- ExpoModulesCore
- ExpoHaptics (11.3.0):
- ExpoModulesCore
- ExpoKeepAwake (10.2.0):
- ExpoModulesCore
- ExpoLocalization (13.1.0):
- ExpoModulesCore
- ExpoModulesCore (0.11.3):
@ -590,7 +584,6 @@ DEPENDENCIES:
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- EASClient (from `../node_modules/expo-eas-client/ios`)
- EXApplication (from `../node_modules/expo-application/ios`)
- EXAV (from `../node_modules/expo-av/ios`)
- EXConstants (from `../node_modules/expo-constants/ios`)
- EXDevice (from `../node_modules/expo-device/ios`)
@ -598,14 +591,12 @@ DEPENDENCIES:
- EXFileSystem (from `../node_modules/expo-file-system/ios`)
- EXFirebaseAnalytics (from `../node_modules/expo-firebase-analytics/ios`)
- EXFirebaseCore (from `../node_modules/expo-firebase-core/ios`)
- EXFont (from `../node_modules/expo-font/ios`)
- EXJSONUtils (from `../node_modules/expo-json-utils/ios`)
- EXManifests (from `../node_modules/expo-manifests/ios`)
- EXNotifications (from `../node_modules/expo-notifications/ios`)
- Expo (from `../node_modules/expo`)
- ExpoCrypto (from `../node_modules/expo-crypto/ios`)
- ExpoHaptics (from `../node_modules/expo-haptics/ios`)
- ExpoKeepAwake (from `../node_modules/expo-keep-awake/ios`)
- ExpoLocalization (from `../node_modules/expo-localization/ios`)
- ExpoModulesCore (from `../node_modules/expo-modules-core/ios`)
- ExpoRandom (from `../node_modules/expo-random/ios`)
@ -701,8 +692,6 @@ EXTERNAL SOURCES:
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
EASClient:
:path: "../node_modules/expo-eas-client/ios"
EXApplication:
:path: "../node_modules/expo-application/ios"
EXAV:
:path: "../node_modules/expo-av/ios"
EXConstants:
@ -717,8 +706,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/expo-firebase-analytics/ios"
EXFirebaseCore:
:path: "../node_modules/expo-firebase-core/ios"
EXFont:
:path: "../node_modules/expo-font/ios"
EXJSONUtils:
:path: "../node_modules/expo-json-utils/ios"
EXManifests:
@ -731,8 +718,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/expo-crypto/ios"
ExpoHaptics:
:path: "../node_modules/expo-haptics/ios"
ExpoKeepAwake:
:path: "../node_modules/expo-keep-awake/ios"
ExpoLocalization:
:path: "../node_modules/expo-localization/ios"
ExpoModulesCore:
@ -867,7 +852,6 @@ SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
EASClient: a2581835cf9b97d0defd5d630fc6eb1bf77045e7
EXApplication: e418d737a036e788510f2c4ad6c10a7d54d18586
EXAV: 596506c9bee54ad52f2f3b625cdaeb9d9f2dd6b7
EXConstants: 75c40827af38bd6bfcf69f880a5b45037eeff9c9
EXDevice: 7647ca9b1fd8b269dfd896a7643d659343358054
@ -875,14 +859,12 @@ SPEC CHECKSUMS:
EXFileSystem: 927e0a8885aa9c49e50fc38eaba2c2389f2f1019
EXFirebaseAnalytics: 15c5f2d5bae6668ecb1104f98b2b74a2d9fd3740
EXFirebaseCore: 9ee5a9691a8480f0fbaeb7f3cd135f256d436fdf
EXFont: a5d80bd9b3452b2d5abbce2487da89b0150e6487
EXJSONUtils: 2a74b8f40f1523cc3f92af99c91aa78201737a77
EXManifests: b38dc61303f5eede990b4c8ecbfac32f82160e65
EXNotifications: 9a2aa201deb19dfe1dbe0e370eeb2922de0d2422
Expo: efd244782651dd1a73c7bd977babe19ed80e3243
ExpoCrypto: e534314db0e1a17ae12b5140d529bd0c5efcbc6a
ExpoHaptics: efe9e68e9dfe0d15c183c0c70a25f3874124ab9e
ExpoKeepAwake: 0e8f18142e71bbf2c7f6aa66ebed249ba1420320
ExpoLocalization: 63204f4b9d4f653469d266332ceaa6c6ac8a305d
ExpoModulesCore: 8303cc952788be09fc6eab62815d257016ae6dec
ExpoRandom: f9f1faa299a40733867f344d6b7bfa2d1f4ab04d

View File

@ -1,7 +1,6 @@
import analytics from '@components/analytics'
import { HeaderLeft } from '@components/Header'
import { displayMessage, Message } from '@components/Message'
import CustomText from '@components/Text'
import navigationRef from '@helpers/navigationRef'
import { NavigationContainer } from '@react-navigation/native'
import { createNativeStackNavigator } from '@react-navigation/native-stack'
@ -172,6 +171,9 @@ const Screens: React.FC<Props> = ({ localCorrupt }) => {
}
| { data: string | string[]; mimeType: string }
) => {
if (Platform.OS === 'android') {
return
}
if (instanceActive < 0) {
return
}
@ -236,19 +238,20 @@ const Screens: React.FC<Props> = ({ localCorrupt }) => {
}
}
break
case 'android':
if (!item.mimeType) {
return
}
for (const d of item.data) {
filterMedia({ uri: d, mime: item.mimeType })
}
break
// case 'android':
// if (!item.mimeType) {
// return
// }
// for (const d of item.data) {
// filterMedia({ uri: d, mime: item.mimeType })
// }
// break
}
if (!text && !media.length) {
return
} else {
console.log('share', text, media)
if (instances.length > 1) {
navigationRef.navigate('Screen-AccountSelection', {
share: { text, media }
@ -262,7 +265,7 @@ const Screens: React.FC<Props> = ({ localCorrupt }) => {
}
}
},
[instances.length]
[]
)
useEffect(() => {
ShareMenu.getInitialShare(handleShare)