Merge pull request #1177 from BlueWallet/strg

Status bar visibility
This commit is contained in:
Overtorment 2020-06-04 19:05:55 +01:00 committed by GitHub
commit 431e3fa37d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 54 additions and 68 deletions

View file

@ -684,7 +684,6 @@ export class BlueHeader extends Component {
borderBottomColor: 'transparent', borderBottomColor: 'transparent',
borderBottomWidth: 0, borderBottomWidth: 0,
}} }}
statusBarProps={{ barStyle: 'default' }}
/> />
); );
} }
@ -701,7 +700,6 @@ export class BlueHeaderDefaultSub extends Component {
borderBottomColor: 'transparent', borderBottomColor: 'transparent',
borderBottomWidth: 0, borderBottomWidth: 0,
}} }}
statusBarProps={{ barStyle: 'default' }}
leftComponent={ leftComponent={
<Text <Text
adjustsFontSizeToFit adjustsFontSizeToFit
@ -740,7 +738,6 @@ export class BlueHeaderDefaultMain extends Component {
<SafeAreaView style={{ paddingVertical: 8, paddingHorizontal: 4, backgroundColor: BlueApp.settings.brandingColor }}> <SafeAreaView style={{ paddingVertical: 8, paddingHorizontal: 4, backgroundColor: BlueApp.settings.brandingColor }}>
<Header <Header
{...this.props} {...this.props}
statusBarProps={{ barStyle: 'default' }}
leftComponent={{ leftComponent={{
text: this.props.leftText, text: this.props.leftText,
style: { style: {
@ -1812,9 +1809,7 @@ const WalletCarouselItem = ({ item, index, onPress, handleLongPress }) => {
return ( return (
<NewWalletPanel <NewWalletPanel
onPress={() => { onPress={() => {
onPressedOut();
onPress(index); onPress(index);
onPressedOut();
}} }}
/> />
); );
@ -1833,9 +1828,7 @@ const WalletCarouselItem = ({ item, index, onPress, handleLongPress }) => {
onPressOut={item.getIsFailure() ? onPressedOut : null} onPressOut={item.getIsFailure() ? onPressedOut : null}
onPress={() => { onPress={() => {
if (item.getIsFailure()) { if (item.getIsFailure()) {
onPressedOut();
onPress(index); onPress(index);
onPressedOut();
} }
}} }}
> >
@ -1903,9 +1896,7 @@ const WalletCarouselItem = ({ item, index, onPress, handleLongPress }) => {
onPressOut={onPressedOut} onPressOut={onPressedOut}
onLongPress={handleLongPress} onLongPress={handleLongPress}
onPress={() => { onPress={() => {
onPressedOut();
onPress(index); onPress(index);
onPressedOut();
}} }}
> >
<LinearGradient <LinearGradient

View file

@ -94,7 +94,7 @@
<key>NSCalendarsUsageDescription</key> <key>NSCalendarsUsageDescription</key>
<string>This alert should not show up as we do not require this data</string> <string>This alert should not show up as we do not require this data</string>
<key>NSCameraUsageDescription</key> <key>NSCameraUsageDescription</key>
<string>In order to quickly scan the recipient's address, we need your permission to use the camera to scan their QR Code.</string> <string>In order to quickly scan the recipient&apos;s address, we need your permission to use the camera to scan their QR Code.</string>
<key>NSFaceIDUsageDescription</key> <key>NSFaceIDUsageDescription</key>
<string>In order to use FaceID please confirm your permission.</string> <string>In order to use FaceID please confirm your permission.</string>
<key>NSLocationAlwaysUsageDescription</key> <key>NSLocationAlwaysUsageDescription</key>
@ -147,8 +147,6 @@
<string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationPortraitUpsideDown</string>
</array> </array>
<key>UIUserInterfaceStyle</key>
<string>Light</string>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<false/> <false/>
<key>UTExportedTypeDeclarations</key> <key>UTExportedTypeDeclarations</key>

View file

@ -557,4 +557,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 932f5bffd3ddea34b78c9ed0921a6f8cccf442b5 PODFILE CHECKSUM: 932f5bffd3ddea34b78c9ed0921a6f8cccf442b5
COCOAPODS: 1.9.1 COCOAPODS: 1.9.3

View file

@ -159,6 +159,7 @@ const ScanQRCode = () => {
return ( return (
<View style={styles.root}> <View style={styles.root}>
<StatusBar hidden />
{!isLoading && isFocused && ( {!isLoading && isFocused && (
<RNCamera <RNCamera
captureAudio={false} captureAudio={false}

View file

@ -1,7 +1,6 @@
/* global alert */ /* global alert */
import React, { Component } from 'react'; import React, { Component } from 'react';
import { import {
ActivityIndicator,
View, View,
TextInput, TextInput,
Alert, Alert,
@ -14,6 +13,7 @@ import {
Dimensions, Dimensions,
Platform, Platform,
ScrollView, ScrollView,
ActivityIndicator,
Text, Text,
} from 'react-native'; } from 'react-native';
import { Icon } from 'react-native-elements'; import { Icon } from 'react-native-elements';
@ -24,7 +24,6 @@ import {
BlueBitcoinAmount, BlueBitcoinAmount,
BlueAddressInput, BlueAddressInput,
BlueDismissKeyboardInputAccessory, BlueDismissKeyboardInputAccessory,
BlueLoading,
BlueUseAllFundsButton, BlueUseAllFundsButton,
BlueListItem, BlueListItem,
BlueText, BlueText,
@ -787,7 +786,7 @@ export default class SendDetails extends Component {
const isSendMaxUsed = this.state.addresses.some(element => element.amount === BitcoinUnit.MAX); const isSendMaxUsed = this.state.addresses.some(element => element.amount === BitcoinUnit.MAX);
return ( return (
<Modal <Modal
isVisible={this.state.isAdvancedTransactionOptionsVisible} isVisible={this.state.isAdvancedTransactionOptionsVisible && !this.state.isLoading}
style={styles.bottomModal} style={styles.bottomModal}
onBackdropPress={() => { onBackdropPress={() => {
Keyboard.dismiss(); Keyboard.dismiss();
@ -1013,17 +1012,12 @@ export default class SendDetails extends Component {
}; };
render() { render() {
if (this.state.isLoading || typeof this.state.fromWallet === 'undefined') { const opacity = this.state.isLoading ? 0.5 : 1.0;
return (
<View style={styles.loading}>
<BlueLoading />
</View>
);
}
return ( return (
<TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}> <TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}>
<View style={styles.root}> <View style={styles.root} pointerEvents={this.state.isLoading ? 'none' : 'auto'}>
<View> <View>
<View style={{ opacity: opacity }}>
<KeyboardAvoidingView behavior="position"> <KeyboardAvoidingView behavior="position">
<ScrollView <ScrollView
pagingEnabled pagingEnabled
@ -1061,11 +1055,12 @@ export default class SendDetails extends Component {
<Text style={styles.feeUnit}>sat/b</Text> <Text style={styles.feeUnit}>sat/b</Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
{this.renderCreateButton()}
{this.renderFeeSelectionModal()} {this.renderFeeSelectionModal()}
{this.renderAdvancedTransactionOptionsModal()} {this.renderAdvancedTransactionOptionsModal()}
</KeyboardAvoidingView> </KeyboardAvoidingView>
</View> </View>
{this.renderCreateButton()}
</View>
<BlueDismissKeyboardInputAccessory /> <BlueDismissKeyboardInputAccessory />
{Platform.select({ {Platform.select({
ios: <BlueUseAllFundsButton onUseAllPressed={this.onUseAllPressed} wallet={this.state.fromWallet} />, ios: <BlueUseAllFundsButton onUseAllPressed={this.onUseAllPressed} wallet={this.state.fromWallet} />,

View file

@ -134,6 +134,7 @@ const styles = StyleSheet.create({
export default class TransactionsStatus extends Component { export default class TransactionsStatus extends Component {
static navigationOptions = () => ({ static navigationOptions = () => ({
...BlueNavigationStyle(), ...BlueNavigationStyle(),
title: '',
}); });
constructor(props) { constructor(props) {

View file

@ -553,7 +553,6 @@ export default class WalletsList extends Component {
}; };
onNavigationEventFocus = () => { onNavigationEventFocus = () => {
StatusBar.setBarStyle('dark-content');
this.redrawScreen(); this.redrawScreen();
}; };
@ -647,6 +646,7 @@ export default class WalletsList extends Component {
render() { render() {
return ( return (
<View style={styles.root}> <View style={styles.root}>
<StatusBar barStyle="dark-content" />
<View style={styles.walletsListWrapper}> <View style={styles.walletsListWrapper}>
<SectionList <SectionList
refreshControl={<RefreshControl onRefresh={this.refreshTransactions} refreshing={!this.state.isFlatListRefreshControlHidden} />} refreshControl={<RefreshControl onRefresh={this.refreshTransactions} refreshing={!this.state.isFlatListRefreshControlHidden} />}

View file

@ -226,7 +226,7 @@ export default class WalletTransactions extends Component {
}; };
} }
async componentDidMount() { componentDidMount() {
this._unsubscribeFocus = this.props.navigation.addListener('focus', this.onFocus); this._unsubscribeFocus = this.props.navigation.addListener('focus', this.onFocus);
this._unsubscribeBlur = this.props.navigation.addListener('blur', this.onBlur); this._unsubscribeBlur = this.props.navigation.addListener('blur', this.onBlur);
@ -234,8 +234,8 @@ export default class WalletTransactions extends Component {
this.interval = setInterval(() => { this.interval = setInterval(() => {
this.setState(prev => ({ timeElapsed: prev.timeElapsed + 1 })); this.setState(prev => ({ timeElapsed: prev.timeElapsed + 1 }));
}, 60000); }, 60000);
const isHandOffUseEnabled = await HandoffSettings.isHandoffUseEnabled(); HandoffSettings.isHandoffUseEnabled().then(enabled => this.setState({ isHandOffUseEnabled: enabled }));
this.setState({ isHandOffUseEnabled, isLoading: false }); this.setState({ isLoading: false });
} }
/** /**