ADD: extend pull to close gesture area to full modal height

This commit is contained in:
Ivan Vershigora 2020-06-05 17:03:59 +03:00 committed by Overtorment
parent 5e8a62e363
commit b647851562
3 changed files with 11 additions and 2 deletions

View file

@ -1,6 +1,7 @@
// import { createAppContainer } from '@react-navigation/native';
import React from 'react';
import { createStackNavigator, TransitionPresets } from '@react-navigation/stack';
import { Platform, Dimensions } from 'react-native';
import Settings from './screen/settings/settings';
import About from './screen/settings/about';
@ -54,12 +55,13 @@ import LappBrowser from './screen/lnd/browser';
import LNDCreateInvoice from './screen/lnd/lndCreateInvoice';
import LNDViewInvoice from './screen/lnd/lndViewInvoice';
import LNDViewAdditionalInvoiceInformation from './screen/lnd/lndViewAdditionalInvoiceInformation';
import { Platform } from 'react-native';
const SCREEN_HEIGHT = Dimensions.get('window').height;
const defaultScreenOptions =
Platform.OS === 'ios'
? ({ route, navigation }) => ({
gestureEnabled: true,
gestureResponseDistance: { vertical: SCREEN_HEIGHT, horizontal: 50 },
cardOverlayEnabled: true,
headerStatusBarHeight: navigation.dangerouslyGetState().routes.indexOf(route) > 0 ? 10 : undefined,
...TransitionPresets.ModalPresentationIOS,
@ -73,6 +75,7 @@ const defaultStackScreenOptions =
headerStatusBarHeight: 10,
}
: undefined;
const WalletsStack = createStackNavigator();
const WalletsRoot = () => (
<WalletsStack.Navigator>
@ -249,7 +252,11 @@ const Navigation = () => (
<RootStack.Screen
name="ScanQRCodeRoot"
component={ScanQRCodeRoot}
options={{ ...TransitionPresets.ModalTransition, headerShown: false }}
options={{
...TransitionPresets.ModalTransition,
headerShown: false,
gestureResponseDistance: { vertical: SCREEN_HEIGHT, horizontal: 50 },
}}
/>
{/* screens */}
<RootStack.Screen name="WalletExport" component={WalletExport} options={WalletExport.navigationOptions} />

View file

@ -74,6 +74,7 @@ export default class ReorderWallets extends Component {
),
headerTitle: loc.wallets.reorder.title,
headerLeft: null,
gestureEnabled: false,
});
constructor(props) {

View file

@ -160,6 +160,7 @@ const SelectWallet = () => {
SelectWallet.navigationOptions = ({ navigation }) => ({
...BlueNavigationStyle(navigation, true, () => navigation.goBack(null)),
title: loc.wallets.select_wallet,
gestureEnabled: false,
});
export default SelectWallet;