Use new repeat until logic

Repeat up to and including repeat until date, ignoring repeat until time
pull/321/head
Alex Baker 9 years ago
parent 0f1f692984
commit b51516e94a

@ -422,7 +422,7 @@ public class RepeatControlSet extends PopupControlSet {
arrayResource);
String date = String.format("%s %s", repeatValue, dates[intervalValue]); //$NON-NLS-1$
if (repeatUntilValue > 0) {
return activity.getString(R.string.repeat_detail_duedate_until, date, DateAndTimePicker.getDisplayString(activity, repeatUntilValue, false, false));
return activity.getString(R.string.repeat_detail_duedate_until, date, DateAndTimePicker.getDisplayString(activity, repeatUntilValue, true, true));
} else {
return activity.getString(R.string.repeat_detail_duedate, date); // Every freq int
}

@ -99,9 +99,7 @@ public class RepeatTaskCompleteListener extends InjectingBroadcastReceiver {
}
static boolean repeatFinished(long newDueDate, long repeatUntil) {
return repeatUntil > 0 && newDateTime(repeatUntil).getMillisOfDay() == 0
? newDateTime(newDueDate).withMillisOfDay(0).isAfter(repeatUntil)
: newDueDate >= repeatUntil;
return repeatUntil > 0 && newDateTime(newDueDate).withMillisOfDay(0).isAfter(newDateTime(repeatUntil).withMillisOfDay(0));
}
public static void rescheduleTask(Context context, GCalHelper gcalHelper, TaskService taskService, Task task, long newDueDate) {

Loading…
Cancel
Save