fix a bug

This commit is contained in:
hlq07 2018-05-29 03:35:49 +08:00
parent f6730e0e6b
commit 454eb73179
1 changed files with 8 additions and 11 deletions

View File

@ -44,21 +44,18 @@ public abstract class NewItemBuilder extends VBox {
switch (key) {
case "begin":
case "end":
case ALARM_START: {
case ALARM_START:
return CalendarUtil.isValidCalendarString(value);
}
case REPEAT_WEEKS: {
case REPEAT_WEEKS:
return value.matches("\\d+");
}
case ALARM_INTERVAL: {
case ALARM_INTERVAL:
return TodoItemUtil.isValidAlarmIntString(value);
}
case ALARM_METHOD: {
return value.equals("area") || value.equals("dialog") || value.equals("none");
}
default: {
case ALARM_METHOD:
return Objects.equals(value, "area")
|| Objects.equals(value, "dialog")
|| Objects.equals(value, "none");
default:
return true;
}
}
}