[evolution-ews] I#144 - Calendar: Dismiss of a reminder doesn't provide recurrence ID
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] I#144 - Calendar: Dismiss of a reminder doesn't provide recurrence ID
- Date: Tue, 23 Feb 2021 10:08:11 +0000 (UTC)
commit 5ed2b9c970e60d940d233c45bba96d84ab4092f0
Author: Milan Crha <mcrha redhat com>
Date: Tue Feb 23 11:07:08 2021 +0100
I#144 - Calendar: Dismiss of a reminder doesn't provide recurrence ID
Change how the recurrence index is computed when dismissing a reminder.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/-/issues/144
src/EWS/calendar/e-cal-backend-ews.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/EWS/calendar/e-cal-backend-ews.c b/src/EWS/calendar/e-cal-backend-ews.c
index 210ea658..d43e7af1 100644
--- a/src/EWS/calendar/e-cal-backend-ews.c
+++ b/src/EWS/calendar/e-cal-backend-ews.c
@@ -3275,24 +3275,24 @@ ecb_ews_discard_alarm_sync (ECalBackendSync *cal_backend_sync,
}
convert_data.timezone_cache = E_TIMEZONE_CACHE (cbews);
+ convert_data.change_type = E_EWS_ITEMCHANGE_TYPE_ITEM;
+ convert_data.index = -1;
- if (e_cal_component_has_recurrences (comp)) {
+ if (rid && *rid) {
+ ICalComponent *icomp;
gint index;
- convert_data.change_type = E_EWS_ITEMCHANGE_TYPE_OCCURRENCEITEM;
- index = e_cal_component_get_sequence (comp);
+ icomp = e_cal_component_get_icalcomponent (comp);
+ index = e_cal_backend_ews_rid_to_index (
+ ecb_ews_get_timezone_from_icomponent (cbews, icomp),
+ rid,
+ icomp,
+ NULL);
if (index > 0) {
- /*Microsoft is counting the occurrences starting from 1
- where EcalComponent is starting from zerro */
- convert_data.index = index + 1;
- } else {
- convert_data.change_type = E_EWS_ITEMCHANGE_TYPE_ITEM;
- convert_data.index = -1;
+ convert_data.change_type = E_EWS_ITEMCHANGE_TYPE_OCCURRENCEITEM;
+ convert_data.index = index;
}
- } else {
- convert_data.change_type = E_EWS_ITEMCHANGE_TYPE_ITEM;
- convert_data.index = -1;
}
ecb_ews_extract_item_id (comp, &convert_data.item_id, &convert_data.change_key);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]