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
|
setClientSetting
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
// If no true / false value set, default to true
|
||||||
|
const actualKeepDaemonRunning = (keepDaemonRunning === undefined || keepDaemonRunning === null) ? true : keepDaemonRunning;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View>
|
<View>
|
||||||
<PageHeader title={"Settings"}
|
<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>
|
<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>
|
||||||
<View style={settingsStyle.switchContainer}>
|
<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>
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
Loading…
Reference in a new issue