Support one-time events
authorAndy Spencer <andy753421@gmail.com>
Tue, 22 Nov 2016 06:53:28 +0000 (06:53 +0000)
committerAndy Spencer <andy753421@gmail.com>
Tue, 22 Nov 2016 06:53:28 +0000 (06:53 +0000)
cals/ical.c

index bd41b72..3ee3c68 100644 (file)
@@ -114,6 +114,18 @@ static void add_recur(cal_t *cal,
 
                /* Add all recurrences */
                rrule = icalcomponent_get_first_property(comp, ICAL_RRULE_PROPERTY);
+
+               /* One-time event */
+               if (!rrule) {
+                       icalarray_append(array, &(ical_inst){
+                               .cal   = cal,
+                               .comp  = comp,
+                               .start = cstart,
+                               .end   = cend,
+                       });
+               }
+
+               /* Recurring events */
                while (rrule) {
                        recur = icalproperty_get_rrule(rrule);
                        iter  = icalrecur_iterator_new(recur, cstart);