Open carrizo opened 6 years ago
@carrizo - I believe a cleaner way to fix this would be to make recurrence.byday
be null
I made the following changes to fix this issue. Give it a shot and let me know if you run into any issues.
byday = null;
to resetFields
in EventRecurrence.java
This takes care of updates via a parse.
eventRecurrence.byday = null;
to the end of the first if
block in case RecurrenceModel.FREQ_MONTHLY:
in copyModelToEventRecurrence
in RecurrencePickerDialogFragment.java
This takes care of updates via the UI.Cheers!
This solves bug #350
I did reproduce the error described by @Rx2TF which throws this exception:
java.lang.ArrayIndexOutOfBoundsException: length=5; index=-1
Looks like
EventRecurrence#parse()
method is leaving some garbage data in theEventRecurrence#byday
field. This can be reproduced callingparse()
two times, one with a weekly recurrence and then with a monthly recurrence; after this, thebyday
field keeps some data from the first call.I didn't solve the root problem in
EventRecurrence
class because it looks like I can easily break something there.