mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-18 21:35:21 +01:00
REF: Move OnLaunch to General
This commit is contained in:
parent
b73450a19a
commit
2c6ab64474
@ -1,10 +1,10 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { ScrollView, Platform } from 'react-native';
|
||||
import { ScrollView, Platform, TouchableOpacity } from 'react-native';
|
||||
import { BlueLoading, BlueText, BlueSpacing20, BlueListItem, SafeBlueArea, BlueNavigationStyle, BlueCard } from '../../BlueComponents';
|
||||
import PropTypes from 'prop-types';
|
||||
import { AppStorage } from '../../class';
|
||||
import { useNavigation } from 'react-navigation-hooks';
|
||||
import HandoffSettings from '../../class/handoff';
|
||||
|
||||
let BlueApp: AppStorage = require('../../BlueApp');
|
||||
let loc = require('../../loc');
|
||||
|
||||
@ -12,7 +12,7 @@ const GeneralSettings = () => {
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const [isAdancedModeEnabled, setIsAdancedModeEnabled] = useState(false);
|
||||
const [isHandoffUseEnabled, setIsHandoffUseEnabled] = useState(false);
|
||||
|
||||
const { navigate } = useNavigation();
|
||||
const onAdvancedModeSwitch = async value => {
|
||||
await BlueApp.setIsAdancedModeEnabled(value);
|
||||
setIsAdancedModeEnabled(value);
|
||||
@ -37,6 +37,14 @@ const GeneralSettings = () => {
|
||||
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1 }}>
|
||||
<ScrollView>
|
||||
<BlueCard>
|
||||
{BlueApp.getWallets().length > 1 && (
|
||||
<>
|
||||
<BlueListItem component={TouchableOpacity} onPress={() => navigate('DefaultView')} title="On Launch" />
|
||||
<BlueCard>
|
||||
<BlueText>When enabled, BlueWallet will immediately open the selected wallet at launch.</BlueText>
|
||||
</BlueCard>
|
||||
</>
|
||||
)}
|
||||
{Platform.OS === 'ios' ? (
|
||||
<>
|
||||
<BlueListItem
|
||||
|
@ -1,9 +1,7 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { ScrollView, TouchableOpacity } from 'react-native';
|
||||
import { BlueNavigationStyle, BlueLoading, SafeBlueArea, BlueHeaderDefaultSub, BlueListItem } from '../../BlueComponents';
|
||||
import { AppStorage } from '../../class';
|
||||
import { useNavigation } from 'react-navigation-hooks';
|
||||
const BlueApp: AppStorage = require('../../BlueApp');
|
||||
const loc = require('../../loc');
|
||||
|
||||
const Settings = () => {
|
||||
@ -21,9 +19,6 @@ const Settings = () => {
|
||||
<BlueHeaderDefaultSub leftText={loc.settings.header} rightComponent={null} />
|
||||
<ScrollView>
|
||||
<BlueListItem title={'General'} component={TouchableOpacity} onPress={() => navigate('GeneralSettings')} />
|
||||
{BlueApp.getWallets().length > 1 && (
|
||||
<BlueListItem component={TouchableOpacity} onPress={() => navigate('DefaultView')} title="On Launch" />
|
||||
)}
|
||||
<BlueListItem title="Security" onPress={() => navigate('EncryptStorage')} component={TouchableOpacity} testID="SecurityButton" />
|
||||
<BlueListItem title={loc.settings.lightning_settings} component={TouchableOpacity} onPress={() => navigate('LightningSettings')} />
|
||||
<BlueListItem title={loc.settings.language} component={TouchableOpacity} onPress={() => navigate('Language')} />
|
||||
|
Loading…
Reference in New Issue
Block a user