Prevent unselecting machine reminder value

This commit is contained in:
keplyx 2020-03-08 13:57:09 +01:00
parent a9fcbfe719
commit 97d84d92f5

View file

@ -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