Merge pull request #136 from lbryio/keep-daemon-running-default
display the correct default value for the keep daemon running option
This commit is contained in:
commit
c533e7832b
1 changed files with 5 additions and 2 deletions
|
@ -16,7 +16,10 @@ class SettingsPage extends React.PureComponent {
|
|||
showNsfw,
|
||||
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