-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
recur_expansion.js: fix iterator with RDATE-only recurrence #534
base: main
Are you sure you want to change the base?
Conversation
kewisch#534 When iterating with e is an event-component if (e.isRecurring() { let i = e.iterator(); while (n = i.next()) { o = g.getOccurrenceDetails(obj) … } } on the first iteration the DTSTART instance shall be returned. It is returned, when there is RRULE. In the lack of this change, on the first iteration, when RDATE is present without RRULE, the first RDATE instance is returned.
kewisch#534 When iterating with e is an event-component if (e.isRecurring() { let i = e.iterator(); while (n = i.next()) { o = g.getOccurrenceDetails(obj) … } } on the first iteration the DTSTART instance shall be returned. It is returned, when there is RRULE. In the lack of this change, on the first iteration, when RDATE is present without RRULE, the first RDATE instance is returned.
kewisch#534 When iterating with e is an event-component if (e.isRecurring() { let i = e.iterator(); while (n = i.next()) { o = g.getOccurrenceDetails(obj) … } } on the first iteration the DTSTART instance shall be returned. It is returned, when there is RRULE. In the lack of this change, on the first iteration, when RDATE is present without RRULE, the first RDATE instance is returned.
e55b0bd
to
9dea990
Compare
Pull Request Test Coverage Report for Build 3076542534
💛 - Coveralls |
When iterating with e is an event-component if (e.isRecurring() { let i = e.iterator(); while (n = i.next()) { o = g.getOccurrenceDetails(obj) … } } on the first iteration the DTSTART instance shall be returned. It is returned, when there is RRULE. In the lack of this change, on the first iteration, when RDATE is present without RRULE, the first RDATE instance is returned.
9dea990
to
4f5c2d6
Compare
kewisch#534 When iterating with e is an event-component if (e.isRecurring() { let i = e.iterator(); while (n = i.next()) { o = g.getOccurrenceDetails(obj) … } } on the first iteration the DTSTART instance shall be returned. It is returned, when there is RRULE. In the lack of this change, on the first iteration, when RDATE is present without RRULE, the first RDATE instance is returned.
Thunderbird doesn't use this code for RDATEs, it maintains a list of them and does iteration itself. So I'm not familiar with how this bit works at all. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my very limited understanding of how this particular bit works, this looks okay to me. But it needs updating for ES6.
kewisch#534 When iterating with e is an event-component if (e.isRecurring() { let i = e.iterator(); while (n = i.next()) { o = g.getOccurrenceDetails(obj) … } } on the first iteration the DTSTART instance shall be returned. It is returned, when there is RRULE. In the lack of this change, on the first iteration, when RDATE is present without RRULE, the first RDATE instance is returned.
kewisch#534 When iterating with e is an event-component if (e.isRecurring() { let i = e.iterator(); while (n = i.next()) { o = g.getOccurrenceDetails(obj) … } } on the first iteration the DTSTART instance shall be returned. It is returned, when there is RRULE. In the lack of this change, on the first iteration, when RDATE is present without RRULE, the first RDATE instance is returned.
kewisch#534 When iterating with e is an event-component if (e.isRecurring() { let i = e.iterator(); while (n = i.next()) { o = g.getOccurrenceDetails(obj) … } } on the first iteration the DTSTART instance shall be returned. It is returned, when there is RRULE. In the lack of this change, on the first iteration, when RDATE is present without RRULE, the first RDATE instance is returned.
@dilyanpalauzov looks like you are actively working on this one, anything I can do to help get this merged? |
kewisch#534 When iterating with e is an event-component if (e.isRecurring() { let i = e.iterator(); while (n = i.next()) { o = g.getOccurrenceDetails(obj) … } } on the first iteration the DTSTART instance shall be returned. It is returned, when there is RRULE. In the lack of this change, on the first iteration, when RDATE is present without RRULE, the first RDATE instance is returned.
This change for proposal is one and a half years old. I do not know what is missing to get it merged. I see now it contains a test, which is failing. Sorry, I do not know anymore what was going on. |
Ah no problem, I had seen a recently referenced commit which made me assume. If you do feel like picking this up again I'm happy to give reviews some priority. |
When iterating with
on the first iteration the DTSTART instance shall be returned. It is returned, when there is RRULE. In the lack of this change, on the first iteration, when RDATE is present without RRULE, the first RDATE instance is returned.
@darktrojan how does Thunderbird handle VEVENTS with RDATE but without RRULE. These are presented correct in the UI. But the instances cannot be obtained by getting an iteratior of the event and then calling .next(). The reason is, that the very first iteration skips then the DTSTART-instance. The DTSTART instance is not skipped by the iterator.next() when the VEVENT has RRULE.