Merge pull request #2697 from BlueWallet/25468

FIX:  Custom fee cancelation on iPadOS 14.4 fade into black screen #2568
This commit is contained in:
GLaDOS 2021-02-25 20:23:55 +00:00 committed by GitHub
commit 2126ba1b83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 45 additions and 26 deletions

2
App.js
View File

@ -302,7 +302,7 @@ const App = () => {
isVisible={isClipboardContentModalVisible}
onClose={hideClipboardContentModal}
>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={[styles.modalContent, stylesHook.modalContent]}>
<BlueTextCentered>
{clipboardContentType === ClipboardContentType.BITCOIN && loc.wallets.clipboard_bitcoin}

View File

@ -9,6 +9,7 @@ import {
StyleSheet,
Text,
TextInput,
Platform,
TouchableOpacity,
TouchableWithoutFeedback,
View,
@ -360,7 +361,7 @@ const LNDCreateInvoice = () => {
<View style={[styles.root, styleHooks.root]}>
<StatusBar barStyle="light-content" />
<View style={[styles.amount, styleHooks.amount]}>
<KeyboardAvoidingView behavior="position">
<KeyboardAvoidingView enabled={!Platform.isPad} behavior="position">
<BlueBitcoinAmount
isLoading={isLoading}
amount={amount}

View File

@ -313,7 +313,7 @@ const ReceiveDetails = () => {
const renderCustomAmountModal = () => {
return (
<BottomModal isVisible={isCustomModalVisible} onClose={dismissCustomAmountModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContent}>
<BlueBitcoinAmount
unit={customUnit}

View File

@ -115,7 +115,11 @@ const Broadcast = () => {
return (
<SafeBlueArea style={styles.blueArea}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null} keyboardShouldPersistTaps="handled">
<KeyboardAvoidingView
enabled={!Platform.isPad}
behavior={Platform.OS === 'ios' ? 'position' : null}
keyboardShouldPersistTaps="handled"
>
<View style={styles.wrapper}>
{BROADCAST_RESULT.success !== broadcastResult && (
<BlueCard style={styles.mainCard}>

View File

@ -409,7 +409,7 @@ const CoinControl = () => {
setOutput(false);
}}
>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={[styles.modalContent, { backgroundColor: colors.elevated }]}>{output && renderOutputModalContent()}</View>
</KeyboardAvoidingView>
</BottomModal>

View File

@ -807,7 +807,7 @@ export default class SendDetails extends Component {
isVisible={this.state.isFeeSelectionModalVisible}
onClose={this.hideFeeSelectionModal}
>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContent}>
{options.map(({ label, time, fee, rate, active }, index) => (
<TouchableOpacity
@ -1165,7 +1165,7 @@ export default class SendDetails extends Component {
isVisible={this.state.isAdvancedTransactionOptionsVisible}
onClose={this.hideAdvancedTransactionOptionsModal}
>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.advancedTransactionOptionsModalContent}>
{this.state.fromWallet.allowSendMax() && (
<BlueListItem
@ -1474,7 +1474,7 @@ export default class SendDetails extends Component {
<View style={styles.root} onLayout={this.onLayout}>
<StatusBar barStyle="light-content" />
<View>
<KeyboardAvoidingView behavior="position">
<KeyboardAvoidingView enabled={!Platform.isPad} behavior="position">
<FlatList
keyboardShouldPersistTaps="always"
scrollEnabled={this.state.addresses.length > 1}

View File

@ -78,7 +78,11 @@ const IsItMyAddress = () => {
return (
<SafeBlueArea style={[styles.blueArea, stylesHooks.blueArea]}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null} keyboardShouldPersistTaps="handled">
<KeyboardAvoidingView
enabled={!Platform.isPad}
behavior={Platform.OS === 'ios' ? 'position' : null}
keyboardShouldPersistTaps="handled"
>
<View style={styles.wrapper}>
<BlueCard style={styles.mainCard}>
<View style={[styles.input, stylesHooks.input]}>

View File

@ -1,7 +1,17 @@
/* global alert */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { ActivityIndicator, View, TextInput, TouchableOpacity, Linking, ScrollView, StyleSheet, KeyboardAvoidingView } from 'react-native';
import {
ActivityIndicator,
Platform,
View,
TextInput,
TouchableOpacity,
Linking,
ScrollView,
StyleSheet,
KeyboardAvoidingView,
} from 'react-native';
import Clipboard from '@react-native-community/clipboard';
import { Text } from 'react-native-elements';
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
@ -158,7 +168,7 @@ export default class CPFP extends Component {
renderStage1(text) {
return (
<KeyboardAvoidingView behavior="position">
<KeyboardAvoidingView enabled={!Platform.isPad} behavior="position">
<SafeBlueArea style={styles.root}>
<BlueSpacing />
<BlueCard style={styles.center}>

View File

@ -102,7 +102,7 @@ const WalletsAddMultisig = () => {
const renderModal = () => {
return (
<BottomModal isVisible={isModalVisible} onClose={closeModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={[styles.modalContentShort, stylesHook.modalContentShort]}>
<Text style={[styles.textHeader, stylesHook.textHeader]}>{loc.multisig.quorum_header}</Text>
<Text style={[styles.textSubtitle, stylesHook.textSubtitle]}>{loc.multisig.required_keys_out_of_total}</Text>

View File

@ -603,7 +603,7 @@ const WalletsAddMultisigStep2 = () => {
const renderProvideMnemonicsModal = () => {
return (
<BottomModal isVisible={isProvideMnemonicsModalVisible} onClose={hideProvideMnemonicsModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={[styles.modalContent, stylesHook.modalContent]}>
<BlueTextCentered>{loc.multisig.type_your_mnemonics}</BlueTextCentered>
<BlueSpacing20 />
@ -634,7 +634,7 @@ const WalletsAddMultisigStep2 = () => {
const renderCosignersXpubModal = () => {
return (
<BottomModal isVisible={isRenderCosignersXpubModalVisible} onClose={hideCosignersXpubModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={[styles.modalContent, stylesHook.modalContent, styles.alignItemsCenter]}>
<Text style={[styles.headerText, stylesHook.textDestination]}>{loc.multisig.this_is_cosigners_xpub}</Text>
<BlueSpacing20 />

View File

@ -413,7 +413,7 @@ const WalletDetails = () => {
}
})()}
<Text style={[styles.textLabel2, stylesHook.textLabel2]}>{loc.wallets.add_wallet_name.toLowerCase()}</Text>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={[styles.input, stylesHook.input]}>
<TextInput
placeholder={loc.send.details_note_placeholder}

View File

@ -328,7 +328,7 @@ export default class HodlHodl extends Component {
renderChooseSideModal = () => {
return (
<BottomModal isVisible={this.state.isChooseSideModalVisible} onClose={this.hideChooseSideModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContentShort}>
<FlatList
scrollEnabled={false}
@ -377,7 +377,7 @@ export default class HodlHodl extends Component {
}
}}
>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContentShort}>
<FlatList
scrollEnabled={false}
@ -472,7 +472,7 @@ export default class HodlHodl extends Component {
return (
<BottomModal isVisible={this.state.isChooseCountryModalVisible} onClose={this.hideChooseCountryModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContent}>
<View style={styles.searchInputContainer}>
<TextInput
@ -546,7 +546,7 @@ export default class HodlHodl extends Component {
return (
<BottomModal isVisible={this.state.isChooseCurrencyVisible} onClose={this.hideChooseCurrencyModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContent}>
<View style={styles.searchInputContainer}>
<TextInput
@ -620,7 +620,7 @@ export default class HodlHodl extends Component {
return (
<BottomModal isVisible={this.state.isChooseMethodVisible} deviceHeight={windowHeight} onClose={this.hideChooseMethodModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContent}>
<View style={styles.searchInputContainer}>
<TextInput

View File

@ -172,7 +172,7 @@ export default class HodlHodlMyContracts extends Component {
return (
<BottomModal isVisible={this.state.isRenderContractVisible} onClose={this.hideContractModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContent}>
<View style={styles.modalContentCentered}>
<Text style={styles.btcText}>

View File

@ -176,7 +176,7 @@ export default class HodlHodlViewOffer extends Component {
) : (
<SafeBlueArea>
<ScrollView>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={styles.modalContent}>
<Text style={styles.Title}>{this.state.offerToDisplay.title}</Text>

View File

@ -272,7 +272,7 @@ const WalletTransactions = () => {
const renderManageFundsModal = () => {
return (
<BottomModal isVisible={isManageFundsModalVisible} onClose={hideManageFundsModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={[styles.advancedTransactionOptionsModalContent, stylesHook.advancedTransactionOptionsModalContent]}>
<BlueListItem
hideChevron

View File

@ -510,7 +510,7 @@ const ViewEditMultisigCosigners = () => {
const renderProvideMnemonicsModal = () => {
return (
<BottomModal isVisible={isProvideMnemonicsModalVisible} onClose={hideProvideMnemonicsModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={[styles.modalContent, stylesHook.modalContent]}>
<BlueTextCentered>{loc.multisig.type_your_mnemonics}</BlueTextCentered>
<BlueSpacing20 />
@ -535,7 +535,7 @@ const ViewEditMultisigCosigners = () => {
const renderShareModal = () => {
return (
<BottomModal isVisible={isShareModalVisible} onClose={hideShareModal}>
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
<KeyboardAvoidingView enabled={!Platform.isPad} behavior={Platform.OS === 'ios' ? 'position' : null}>
<View style={[styles.modalContent, stylesHook.modalContent, styles.alignItemsCenter]}>
<Text style={[styles.headerText, stylesHook.textDestination]}>{loc.multisig.this_is_cosigners_xpub}</Text>
<View style={styles.qrCodeContainer}>
@ -601,7 +601,7 @@ const ViewEditMultisigCosigners = () => {
<View style={[styles.root, stylesHook.root]}>
<StatusBar barStyle="light-content" />
<KeyboardAvoidingView
enabled
enabled={!Platform.isPad}
behavior={Platform.OS === 'ios' ? 'padding' : null}
keyboardVerticalOffset={62}
style={[styles.mainBlock, styles.root]}