mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
Merge branch 'keyboardsub' into modal
This commit is contained in:
commit
f85210bb5e
@ -76,16 +76,20 @@ const LNDCreateInvoice = () => {
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
// console.log(params)
|
||||
Keyboard.addListener('keyboardDidShow', _keyboardDidShow);
|
||||
Keyboard.addListener('keyboardDidHide', _keyboardDidHide);
|
||||
const showSubscription = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', _keyboardDidShow,
|
||||
);
|
||||
const hideSubscription = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide', _keyboardDidHide,
|
||||
);
|
||||
return () => {
|
||||
Keyboard.removeAllListeners('keyboardDidShow');
|
||||
Keyboard.removeAllListeners('keyboardDidHide');
|
||||
showSubscription.remove();
|
||||
hideSubscription.remove();
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
||||
const renderReceiveDetails = async () => {
|
||||
try {
|
||||
wallet.current.setUserHasSavedExport(true);
|
||||
|
@ -5,6 +5,7 @@ import {
|
||||
I18nManager,
|
||||
Keyboard,
|
||||
KeyboardAvoidingView,
|
||||
Platform,
|
||||
ScrollView,
|
||||
StyleSheet,
|
||||
Text,
|
||||
@ -63,15 +64,17 @@ const ScanLndInvoice = () => {
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
console.log('scanLndInvoice useEffect');
|
||||
Keyboard.addListener('keyboardDidShow', _keyboardDidShow);
|
||||
Keyboard.addListener('keyboardDidHide', _keyboardDidHide);
|
||||
const showSubscription = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', _keyboardDidShow,
|
||||
);
|
||||
const hideSubscription = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide', _keyboardDidHide,
|
||||
);
|
||||
return () => {
|
||||
Keyboard.removeAllListeners('keyboardDidShow');
|
||||
Keyboard.removeAllListeners('keyboardDidHide');
|
||||
showSubscription.remove();
|
||||
hideSubscription.remove();
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (walletID && wallet?.getID() !== walletID) {
|
||||
setWallet(wallets.find(w => w.getID() === walletID));
|
||||
|
@ -151,11 +151,11 @@ const SendDetails = () => {
|
||||
setIsAmountToolbarVisibleForAndroid(false);
|
||||
};
|
||||
|
||||
Keyboard.addListener('keyboardDidShow', _keyboardDidShow);
|
||||
Keyboard.addListener('keyboardDidHide', _keyboardDidHide);
|
||||
const showSubscription = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', _keyboardDidShow);
|
||||
const hideSubscription = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide', _keyboardDidHide);
|
||||
return () => {
|
||||
Keyboard.removeAllListeners('keyboardDidShow');
|
||||
Keyboard.removeAllListeners('keyboardDidHide');
|
||||
showSubscription.remove();
|
||||
hideSubscription.remove();
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
@ -59,15 +59,20 @@ const WalletsImport = () => {
|
||||
|
||||
useEffect(() => {
|
||||
enableBlur();
|
||||
Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', () => setIsToolbarVisibleForAndroid(true));
|
||||
Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide', () => setIsToolbarVisibleForAndroid(false));
|
||||
|
||||
const showSubscription = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', () => setIsToolbarVisibleForAndroid(true),
|
||||
);
|
||||
const hideSubscription = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide', () => setIsToolbarVisibleForAndroid(false),
|
||||
);
|
||||
return () => {
|
||||
Keyboard.removeAllListeners(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow');
|
||||
Keyboard.removeAllListeners(Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide');
|
||||
showSubscription.remove();
|
||||
hideSubscription.remove();
|
||||
disableBlur();
|
||||
|
||||
};
|
||||
}, [disableBlur, enableBlur]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (triggerImport) importButtonPressed();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
@ -38,11 +38,15 @@ const SignVerify = () => {
|
||||
const isToolbarVisibleForAndroid = Platform.OS === 'android' && messageHasFocus && isKeyboardVisible;
|
||||
|
||||
useEffect(() => {
|
||||
Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', () => setIsKeyboardVisible(true));
|
||||
Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide', () => setIsKeyboardVisible(false));
|
||||
const showSubscription = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', () =>
|
||||
setIsKeyboardVisible(true),
|
||||
);
|
||||
const hideSubscription = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide', () =>
|
||||
setIsKeyboardVisible(false),
|
||||
);
|
||||
return () => {
|
||||
Keyboard.removeAllListeners(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow');
|
||||
Keyboard.removeAllListeners(Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide');
|
||||
showSubscription.remove();
|
||||
hideSubscription.remove();
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user