forked from vergnet/application-amicale
Prevent unselecting machine reminder value
This commit is contained in:
parent
a9fcbfe719
commit
97d84d92f5
1 changed files with 11 additions and 9 deletions
|
@ -45,6 +45,7 @@ export default class SettingsScreen extends React.Component<Props, State> {
|
||||||
* @param value The value to store
|
* @param value The value to store
|
||||||
*/
|
*/
|
||||||
onProxiwashNotifPickerValueChange(value: string) {
|
onProxiwashNotifPickerValueChange(value: string) {
|
||||||
|
if (value != null) {
|
||||||
let key = AsyncStorageManager.getInstance().preferences.proxiwashNotifications.key;
|
let key = AsyncStorageManager.getInstance().preferences.proxiwashNotifications.key;
|
||||||
AsyncStorageManager.getInstance().savePref(key, value);
|
AsyncStorageManager.getInstance().savePref(key, value);
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -55,6 +56,7 @@ export default class SettingsScreen extends React.Component<Props, State> {
|
||||||
intVal = parseInt(value);
|
intVal = parseInt(value);
|
||||||
NotificationsManager.setMachineReminderNotificationTime(intVal);
|
NotificationsManager.setMachineReminderNotificationTime(intVal);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save the value for the proxiwash reminder notification time
|
* Save the value for the proxiwash reminder notification time
|
||||||
|
|
Loading…
Reference in a new issue