From: Andy Spencer Date: Tue, 22 Nov 2016 06:53:28 +0000 (+0000) Subject: Support one-time events X-Git-Url: http://pileus.org/git/?p=lackey;a=commitdiff_plain;h=8f393429aacaa85f68e92070775ecd110269d467 Support one-time events --- diff --git a/cals/ical.c b/cals/ical.c index bd41b72..3ee3c68 100644 --- a/cals/ical.c +++ b/cals/ical.c @@ -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);