[evolution/gnome-41] I#1672 - ECalModel: Show DTSTAMP, when LAST-MODIFIED is missing



commit 4064e18f4932ab8dc3773b18f58b339975081acb
Author: Дилян Палаузов <git-dpa aegee org>
Date:   Sun Oct 24 20:30:58 2021 +0300

    I#1672 - ECalModel: Show DTSTAMP, when LAST-MODIFIED is missing
    
    ...and when applicable. See:
    https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.7.2
    
    Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1672

 src/calendar/gui/e-cal-model.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/calendar/gui/e-cal-model.c b/src/calendar/gui/e-cal-model.c
index 0abb0b715a..21b898004e 100644
--- a/src/calendar/gui/e-cal-model.c
+++ b/src/calendar/gui/e-cal-model.c
@@ -1559,9 +1559,16 @@ cal_model_value_at (ETableModel *etm,
                        model, comp_data, I_CAL_CREATED_PROPERTY,
                        i_cal_property_get_created, &comp_data->created);
        case E_CAL_MODEL_FIELD_LASTMODIFIED :
-               return (gpointer) get_datetime_from_utc (
+       {
+               gpointer result = (gpointer) get_datetime_from_utc (
                        model, comp_data, I_CAL_LASTMODIFIED_PROPERTY,
                        i_cal_property_get_lastmodified, &comp_data->lastmodified);
+               if (!result && !e_cal_util_component_has_property (comp_data->icalcomp, 
I_CAL_METHOD_PROPERTY))
+                       return get_datetime_from_utc (model, comp_data, I_CAL_DTSTAMP_PROPERTY, 
i_cal_property_get_dtstamp, &comp_data->lastmodified);
+
+               return result;
+
+       }
        case E_CAL_MODEL_FIELD_HAS_ALARMS :
                return GINT_TO_POINTER (e_cal_util_component_has_alarms (comp_data->icalcomp));
        case E_CAL_MODEL_FIELD_ICON :


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