From 353d6761b44d0672b90748d592878b83f8e57dcd Mon Sep 17 00:00:00 2001 From: Camille Moussu Date: Mon, 8 Sep 2025 09:37:01 +0200 Subject: [PATCH] [#77] event date modification doesnt duplicate anymore --- src/features/Events/EventDisplay.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/features/Events/EventDisplay.tsx b/src/features/Events/EventDisplay.tsx index b310542..3509794 100644 --- a/src/features/Events/EventDisplay.tsx +++ b/src/features/Events/EventDisplay.tsx @@ -162,6 +162,16 @@ export default function EventDisplayModal({ color: userPersonnalCalendars[calendarid]?.color, }; + const [baseId, recurrenceId] = event.uid.split("/"); + if (recurrenceId) { + Object.keys(userPersonnalCalendars[calendarid].events).forEach( + (element) => { + if (element.split("/")[0] === baseId) { + dispatch(removeEvent({ calendarUid: calId, eventUid: element })); + } + } + ); + } await dispatch( putEventAsync({ cal: userPersonnalCalendars[calendarid],