|
@@ -52,9 +52,6 @@ class SettingsScreen extends React.Component<PropsType, StateType> {
|
52
|
52
|
startScreenPickerSelected: AsyncStorageManager.getString(
|
53
|
53
|
AsyncStorageManager.PREFERENCES.defaultStartScreen.key,
|
54
|
54
|
),
|
55
|
|
- selectedWash: AsyncStorageManager.getString(
|
56
|
|
- AsyncStorageManager.PREFERENCES.selectedWash.key,
|
57
|
|
- ),
|
58
|
55
|
isDebugUnlocked: AsyncStorageManager.getBool(
|
59
|
56
|
AsyncStorageManager.PREFERENCES.debugUnlocked.key,
|
60
|
57
|
),
|
|
@@ -89,21 +86,6 @@ class SettingsScreen extends React.Component<PropsType, StateType> {
|
89
|
86
|
};
|
90
|
87
|
|
91
|
88
|
/**
|
92
|
|
- * Saves the value for the proxiwash reminder notification time
|
93
|
|
- *
|
94
|
|
- * @param value The value to store
|
95
|
|
- */
|
96
|
|
- onSelectWashValueChange = (value: string) => {
|
97
|
|
- if (value != null) {
|
98
|
|
- this.setState({selectedWash: value});
|
99
|
|
- AsyncStorageManager.set(
|
100
|
|
- AsyncStorageManager.PREFERENCES.selectedWash.key,
|
101
|
|
- value,
|
102
|
|
- );
|
103
|
|
- }
|
104
|
|
- };
|
105
|
|
-
|
106
|
|
- /**
|
107
|
89
|
* Returns a picker allowing the user to select the proxiwash reminder notification time
|
108
|
90
|
*
|
109
|
91
|
* @returns {React.Node}
|
|
@@ -125,24 +107,6 @@ class SettingsScreen extends React.Component<PropsType, StateType> {
|
125
|
107
|
}
|
126
|
108
|
|
127
|
109
|
/**
|
128
|
|
- * Returns a picker allowing the user to select the wash
|
129
|
|
- *
|
130
|
|
- * @returns {React.Node}
|
131
|
|
- */
|
132
|
|
- getSelectWashPicker(): React.Node {
|
133
|
|
- const {selectedWash} = this.state;
|
134
|
|
- return (
|
135
|
|
- <ToggleButton.Row
|
136
|
|
- onValueChange={this.onSelectWashValueChange}
|
137
|
|
- value={selectedWash}
|
138
|
|
- style={{marginLeft: 'auto', marginRight: 'auto'}}>
|
139
|
|
- <ToggleButton icon="school-outline" value="washinsa" />
|
140
|
|
- <ToggleButton icon="domain" value="tripodeB" />
|
141
|
|
- </ToggleButton.Row>
|
142
|
|
- );
|
143
|
|
- }
|
144
|
|
-
|
145
|
|
- /**
|
146
|
110
|
* Returns a picker allowing the user to select the start screen
|
147
|
111
|
*
|
148
|
112
|
* @returns {React.Node}
|
|
@@ -324,20 +288,6 @@ class SettingsScreen extends React.Component<PropsType, StateType> {
|
324
|
288
|
<View style={{marginLeft: 30}}>
|
325
|
289
|
{this.getProxiwashNotifPicker()}
|
326
|
290
|
</View>
|
327
|
|
-
|
328
|
|
- <List.Item
|
329
|
|
- title={i18n.t('screens.settings.proxiwashNotifReminder')}
|
330
|
|
- description={i18n.t('screens.settings.proxiwashNotifReminderSub')}
|
331
|
|
- left={(props: ListIconPropsType): React.Node => (
|
332
|
|
- <List.Icon
|
333
|
|
- color={props.color}
|
334
|
|
- style={props.style}
|
335
|
|
- icon="washing-machine"
|
336
|
|
- />
|
337
|
|
- )}
|
338
|
|
- />
|
339
|
|
-
|
340
|
|
- <View style={{marginLeft: 30}}>{this.getSelectWashPicker()}</View>
|
341
|
291
|
</List.Section>
|
342
|
292
|
</Card>
|
343
|
293
|
<Card style={{margin: 5}}>
|