Comment 9 for bug 1533681

Revision history for this message
Charles Kerr (charlesk) wrote :

Renato, thanks for working on some of the indicator-datetime backlog. =)

For this one, after the EDS engine collects all the alarms for an event, it should cull out the ones that have neither an audio_url nor display text, ie:

=== modified file 'src/engine-eds.cpp'
--- src/engine-eds.cpp 2016-02-03 16:33:39 +0000
+++ src/engine-eds.cpp 2016-03-29 17:53:12 +0000
@@ -960,7 +960,8 @@
             appointment.end = i.first.second;
             appointment.alarms.reserve(i.second.size());
             for (auto& j : i.second)
- appointment.alarms.push_back(j.second);
+ if (!j.second.text.empty() || !j.second.audio_url.empty())
+ appointment.alarms.push_back(j.second);
             subtask->task->appointments.push_back(appointment);
         }
     }

A few important notes:

1. I believe the clock app used to (and possibly still does?) write empty valarms, so when testing this or any other fix you should confirm that it doesn't break the clock. For backwards compatibility with existing clock-app alarms, we may need indicator-datetime to inject an Alarm if none is present for any event containing the "x-canonical-alarm" tag.

2. Most of indicator-datetime's EDS tests were created with output from clock-app, so new ical tests are needed to cover these other valarm action types.