mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 18:00:17 +01:00
FIX: Catalyst on Big Sur would not show drawer
This commit is contained in:
parent
b0e6c8674c
commit
842c7bd3c3
@ -76,7 +76,7 @@ import LnurlPaySuccess from './screen/lnd/lnurlPaySuccess';
|
||||
import LoadingScreen from './LoadingScreen';
|
||||
import UnlockWith from './UnlockWith';
|
||||
import DrawerList from './screen/wallets/drawerList';
|
||||
import { isTablet } from 'react-native-device-info';
|
||||
import { isCatalyst, isTablet } from './blue_modules/environment';
|
||||
import SettingsPrivacy from './screen/settings/SettingsPrivacy';
|
||||
import LNDViewAdditionalInvoicePreImage from './screen/lnd/lndViewAdditionalInvoicePreImage';
|
||||
|
||||
@ -348,7 +348,8 @@ const ReorderWalletsStackRoot = () => {
|
||||
const Drawer = createDrawerNavigator();
|
||||
function DrawerRoot() {
|
||||
const dimensions = useWindowDimensions();
|
||||
const isLargeScreen = Platform.OS === 'android' ? isTablet() : dimensions.width >= Dimensions.get('screen').width / 2 && isTablet();
|
||||
const isLargeScreen =
|
||||
Platform.OS === 'android' ? isTablet() : dimensions.width >= Dimensions.get('screen').width / 2 && (isTablet() || isCatalyst);
|
||||
const drawerStyle = { width: '0%' };
|
||||
|
||||
return (
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { getSystemName } from 'react-native-device-info';
|
||||
import { getSystemName, isTablet } from 'react-native-device-info';
|
||||
import isCatalyst from 'react-native-is-catalyst';
|
||||
|
||||
const isMacCatalina = getSystemName() === 'Mac OS X';
|
||||
|
||||
module.exports.isMacCatalina = isMacCatalina;
|
||||
module.exports.isCatalyst = isCatalyst;
|
||||
module.exports.isTablet = isTablet;
|
||||
|
@ -25,10 +25,9 @@ import ActionSheet from '../ActionSheet';
|
||||
import Clipboard from '@react-native-community/clipboard';
|
||||
import loc from '../../loc';
|
||||
import { FContainer, FButton } from '../../components/FloatButtons';
|
||||
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, isMacCatalina } from '../../blue_modules/environment';
|
||||
import { isCatalyst, isMacCatalina, isTablet } from '../../blue_modules/environment';
|
||||
|
||||
const A = require('../../blue_modules/analytics');
|
||||
const fs = require('../../blue_modules/fs');
|
||||
@ -46,7 +45,7 @@ const WalletsList = () => {
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [itemWidth, setItemWidth] = useState(width * 0.82 > 375 ? 375 : width * 0.82);
|
||||
const [isLargeScreen, setIsLargeScreen] = useState(
|
||||
Platform.OS === 'android' ? isTablet() : width >= Dimensions.get('screen').width / 2 && isTablet(),
|
||||
Platform.OS === 'android' ? isTablet() : width >= Dimensions.get('screen').width / 2 && (isTablet() || isCatalyst),
|
||||
);
|
||||
const [carouselData, setCarouselData] = useState([]);
|
||||
const dataSource = getTransactions(null, 10);
|
||||
@ -433,7 +432,7 @@ const WalletsList = () => {
|
||||
};
|
||||
|
||||
const onLayout = _e => {
|
||||
setIsLargeScreen(Platform.OS === 'android' ? isTablet() : width >= Dimensions.get('screen').width / 2 && isTablet());
|
||||
setIsLargeScreen(Platform.OS === 'android' ? isTablet() : width >= Dimensions.get('screen').width / 2 && (isTablet() || isCatalyst));
|
||||
setItemWidth(width * 0.82 > 375 ? 375 : width * 0.82);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user