mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-13 19:16:52 +01:00
Merge branch 'nav7frixes' into receivescreenswit
This commit is contained in:
commit
82f13fbded
2 changed files with 10 additions and 36 deletions
|
@ -1,7 +1,7 @@
|
|||
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
||||
import React from 'react';
|
||||
|
||||
import navigationStyle from '../components/navigationStyle';
|
||||
import navigationStyle, { CloseButtonPosition } from '../components/navigationStyle';
|
||||
import { useTheme } from '../components/themes';
|
||||
import loc from '../loc';
|
||||
import { ReceiveDetailsComponent } from './LazyLoadReceiveDetailsStack';
|
||||
|
@ -16,7 +16,12 @@ const ReceiveDetailsStackRoot = () => {
|
|||
<Stack.Screen
|
||||
name="ReceiveDetails"
|
||||
component={ReceiveDetailsComponent}
|
||||
options={navigationStyle({ headerBackVisible: false, title: loc.receive.header, statusBarStyle: 'light' })(theme)}
|
||||
options={navigationStyle({
|
||||
headerBackVisible: false,
|
||||
closeButtonPosition: CloseButtonPosition.Left,
|
||||
title: loc.receive.header,
|
||||
statusBarStyle: 'light',
|
||||
})(theme)}
|
||||
/>
|
||||
</Stack.Navigator>
|
||||
);
|
||||
|
|
|
@ -1,17 +1,6 @@
|
|||
import { useFocusEffect, useRoute } from '@react-navigation/native';
|
||||
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import {
|
||||
BackHandler,
|
||||
Image,
|
||||
InteractionManager,
|
||||
LayoutAnimation,
|
||||
ScrollView,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TextInput,
|
||||
TouchableOpacity,
|
||||
View,
|
||||
} from 'react-native';
|
||||
import { BackHandler, InteractionManager, LayoutAnimation, ScrollView, StyleSheet, Text, TextInput, View } from 'react-native';
|
||||
import Share from 'react-native-share';
|
||||
|
||||
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
|
||||
|
@ -92,7 +81,7 @@ const ReceiveDetails = () => {
|
|||
const [currentTab, setCurrentTab] = useState(segmentControlValues[0]);
|
||||
const { goBack, setParams, setOptions } = useExtendedNavigation();
|
||||
const bottomModalRef = useRef(null);
|
||||
const { colors, closeImage } = useTheme();
|
||||
const { colors } = useTheme();
|
||||
const [intervalMs, setIntervalMs] = useState(5000);
|
||||
const [eta, setEta] = useState('');
|
||||
const [initialConfirmed, setInitialConfirmed] = useState(0);
|
||||
|
@ -212,32 +201,12 @@ const ReceiveDetails = () => {
|
|||
[onPressMenuItem, toolTipActions],
|
||||
);
|
||||
|
||||
const handleClose = useCallback(() => {
|
||||
goBack();
|
||||
}, [goBack]);
|
||||
|
||||
const HeaderLeft = useMemo(
|
||||
() => (
|
||||
<TouchableOpacity
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={loc._.close}
|
||||
style={styles.button}
|
||||
onPress={handleClose}
|
||||
testID="NavigationCloseButton"
|
||||
>
|
||||
<Image source={closeImage} />
|
||||
</TouchableOpacity>
|
||||
),
|
||||
[closeImage, handleClose],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
wallet?.allowBIP47() &&
|
||||
setOptions({
|
||||
headerLeft: () => HeaderLeft,
|
||||
headerRight: () => HeaderRight,
|
||||
});
|
||||
}, [HeaderLeft, HeaderRight, colors.foregroundColor, setOptions, wallet]);
|
||||
}, [HeaderRight, colors.foregroundColor, setOptions, wallet]);
|
||||
|
||||
// re-fetching address balance periodically
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Add table
Reference in a new issue