From 878efbd26556ece3f1c066647afc252cb31309f2 Mon Sep 17 00:00:00 2001 From: marcosrdz Date: Sat, 2 Jan 2021 14:53:02 -0500 Subject: [PATCH] FIX: Dont use SafeAreaView on non-macOS --- screen/wallets/list.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/screen/wallets/list.js b/screen/wallets/list.js index f71692259..b589dc02d 100644 --- a/screen/wallets/list.js +++ b/screen/wallets/list.js @@ -24,15 +24,14 @@ import ActionSheet from '../ActionSheet'; import Clipboard from '@react-native-community/clipboard'; import loc from '../../loc'; import { FContainer, FButton } from '../../components/FloatButtons'; -import { getSystemName, isTablet } from 'react-native-device-info'; +import { isTablet } from 'react-native-device-info'; import { useFocusEffect, useNavigation, useRoute, useTheme } from '@react-navigation/native'; import { BlueStorageContext } from '../../blue_modules/storage-context'; -import isCatalyst from 'react-native-is-catalyst'; +import { isCatalyst, isMacCatalina } from '../../blue_modules/environment'; const A = require('../../blue_modules/analytics'); const fs = require('../../blue_modules/fs'); const WalletsListSections = { CAROUSEL: 'CAROUSEL', LOCALTRADER: 'LOCALTRADER', TRANSACTIONS: 'TRANSACTIONS' }; -const isDesktop = getSystemName() === 'Mac OS X'; const WalletsList = () => { const walletsCarousel = useRef(); @@ -324,7 +323,7 @@ const WalletsList = () => { } text={loc.send.details_scan} /> @@ -340,7 +339,7 @@ const WalletsList = () => { }; const onScanButtonPressed = () => { - if (isDesktop) { + if (isMacCatalina) { fs.showActionSheet().then(onBarScanned); } else { navigate('ScanQRCodeRoot', { @@ -368,7 +367,7 @@ const WalletsList = () => { const sendButtonLongPress = async () => { const isClipboardEmpty = (await Clipboard.getString()).replace(' ', '').length === 0; if (Platform.OS === 'ios') { - if (isDesktop) { + if (isMacCatalina) { fs.showActionSheet().then(onBarScanned); } else { const options = [loc._.cancel, loc.wallets.list_long_choose, loc.wallets.list_long_scan]; @@ -435,10 +434,13 @@ const WalletsList = () => { setItemWidth(width * 0.82 > 375 ? 375 : width * 0.82); }; + const ContainerView = props => + isCatalyst ? : ; + return ( - + - + { /> {renderScanButton()} - + ); };