From 8f393429aacaa85f68e92070775ecd110269d467 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Tue, 22 Nov 2016 06:53:28 +0000 Subject: [PATCH] Support one-time events --- cals/ical.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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); -- 2.41.0