display the correct default value for the keep daemon running option
This commit is contained in:
parent
ceeef6324e
commit
0cd33ddada
1 changed files with 5 additions and 2 deletions
|
@ -17,6 +17,9 @@ class SettingsPage extends React.PureComponent {
|
|||
setClientSetting
|
||||
} = this.props;
|
||||
|
||||
// If no true / false value set, default to true
|
||||
const actualKeepDaemonRunning = (keepDaemonRunning === undefined || keepDaemonRunning === null) ? true : keepDaemonRunning;
|
||||
|
||||
return (
|
||||
<View>
|
||||
<PageHeader title={"Settings"}
|
||||
|
@ -47,7 +50,7 @@ class SettingsPage extends React.PureComponent {
|
|||
<Text style={settingsStyle.description}>Enable this option for quicker app launch and to keep the synchronisation with the blockchain up to date.</Text>
|
||||
</View>
|
||||
<View style={settingsStyle.switchContainer}>
|
||||
<Switch value={keepDaemonRunning} onValueChange={(value) => setClientSetting(SETTINGS.KEEP_DAEMON_RUNNING, value)} />
|
||||
<Switch value={actualKeepDaemonRunning} onValueChange={(value) => setClientSetting(SETTINGS.KEEP_DAEMON_RUNNING, value)} />
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
|
|
Loading…
Reference in a new issue