FIX: Crash on large screen devices due to not checking if item is not false

This commit is contained in:
Marcos Rodriguez Velez 2023-04-22 14:46:58 -05:00
parent c312aabaf7
commit b919966ef3
No known key found for this signature in database
GPG Key ID: 6030B2F48CCE86D7
3 changed files with 16 additions and 18 deletions

View File

@ -327,16 +327,20 @@ const WalletsCarousel = forwardRef((props, ref) => {
/>
) : (
<View style={cStyles.contentLargeScreen}>
{props.data.map((item, index) => (
<WalletCarouselItem
isSelectedWallet={!props.horizontal && props.selectedWallet ? props.selectedWallet === item.getID() : undefined}
item={item}
index={index}
handleLongPress={props.handleLongPress}
onPress={props.onPress}
key={index}
/>
))}
{props.data.map((item, index) =>
item ? (
<WalletCarouselItem
isSelectedWallet={!props.horizontal && props.selectedWallet ? props.selectedWallet === item.getID() : undefined}
item={item}
index={index}
handleLongPress={props.handleLongPress}
onPress={props.onPress}
key={index}
/>
) : (
<NewWalletPanel key={index} onPress={props.onPress} />
),
)}
</View>
);
});

View File

@ -18,7 +18,7 @@ const DrawerList = props => {
const isFocused = useIsFocused();
const stylesHook = StyleSheet.create({
root: {
backgroundColor: colors.brandingColor,
backgroundColor: colors.elevated,
},
});

View File

@ -5,17 +5,11 @@ sed -i '' '/react-native-tor/d' ./package.json
rm -fr node_modules
echo "Re-installing node_modules"
npm i
echo "Applying patch for react-native-xcode.sh"
sed -i '' 's/--platform "$BUNDLE_PLATFORM"/--platform "ios"/g' ./node_modules/react-native/scripts/react-native-xcode.sh
echo "Applying patch for LDK Podfile"
sed -i '' 's/LDKFramework.xcframework/LDKFramework-maccatalyst.xcframework/g' ./node_modules/rn-ldk/rn-ldk.podspec
echo "Applying patch for RCTCameraManager.m"
patch node_modules/react-native-camera/ios/RCT/RCTCameraManager.m scripts/maccatalystpatches/RCTCameraManagerDiff
echo "Applying patch for RNCamera.m"
patch node_modules/react-native-camera/ios/RN/RNCamera.m scripts/maccatalystpatches/RNCamera.patch
echo "Deleting torrific.js content"
echo > blue_modules/torrific.js
echo "Updating Podfile"
cd ios && pod update && cd ..
echo ""
echo "NOTE: react-native-tor is not currently compatible with Mac Catalyst.
echo "NOTE: react-native-tor and rn-dlk are not currently compatible with Mac Catalyst.