[evolution/gnome-3-38] I#1073 - Calendar: Recurring DATE value can match DTSTART and DTEND



commit 24c4955fa144a91f3646084af6e4e62d301b8284
Author: Milan Crha <mcrha redhat com>
Date:   Fri Sep 11 08:58:01 2020 +0200

    I#1073 - Calendar: Recurring DATE value can match DTSTART and DTEND
    
    Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1073

 src/calendar/gui/comp-util.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/calendar/gui/comp-util.c b/src/calendar/gui/comp-util.c
index 3c0375abc3..9e286d9a7d 100644
--- a/src/calendar/gui/comp-util.c
+++ b/src/calendar/gui/comp-util.c
@@ -809,9 +809,18 @@ comp_util_sanitize_recurrence_master_sync (ECalComponent *comp,
                i_cal_time_get_date (e_cal_component_datetime_get_value (medt), &yy, &mm, &dd);
                i_cal_time_set_date (e_cal_component_datetime_get_value (edt), yy, mm, dd);
 
+               /* Make sure the DATE value of the DTSTART and DTEND do not match */
+               if (i_cal_time_is_date (e_cal_component_datetime_get_value (sdt)) &&
+                   i_cal_time_is_date (e_cal_component_datetime_get_value (edt)) &&
+                   i_cal_time_compare_date_only (e_cal_component_datetime_get_value (sdt), 
e_cal_component_datetime_get_value (edt)) == 0) {
+                       i_cal_time_adjust (e_cal_component_datetime_get_value (edt), 1, 0, 0, 0);
+               }
+
                e_cal_component_set_dtstart (comp, sdt);
                e_cal_component_set_dtend (comp, edt);
 
+               e_cal_component_abort_sequence (comp);
+
                e_cal_component_datetime_free (msdt);
                e_cal_component_datetime_free (medt);
                e_cal_component_datetime_free (edt);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]