feat: add location and description fields to reminders

This commit is contained in:
2026-05-18 14:36:54 +02:00
parent b64f3061f5
commit 37ecfd6130
3 changed files with 69 additions and 7 deletions

View File

@@ -190,6 +190,22 @@ let get_recurrence_id ev =
| _ -> None)
ev.props
let get_location ev =
List.find_map
(fun prop ->
match prop with
| `Location (_, loc) -> Some loc
| _ -> None)
ev.props
let get_description ev =
List.find_map
(fun prop ->
match prop with
| `Description (_, desc) -> Some desc
| _ -> None)
ev.props
let separate_master_and_recurrence (events : Icalendar.event list) : Icalendar.event * Icalendar.event list =
(* List.iteri (fun i e -> Printf.eprintf "%02d: %s\n" (i + 1) (Icalendar.show_component (`Event e))) events; *)
let recur_ids = List.map (fun ev -> (ev, get_recurrence_id ev)) events in