aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-02-23 22:14:51 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-02-23 22:14:51 -0600
commitce576453c6e8dbc38918600480c7cb4b68e37688 (patch)
treed704a0c800fc568a542b310b08cab9cad8e4a465
parente3ce38f4690f01968fb9cc5da5aa606fe9fcc499 (diff)
downloadayatana-indicator-datetime-ce576453c6e8dbc38918600480c7cb4b68e37688.tar.gz
ayatana-indicator-datetime-ce576453c6e8dbc38918600480c7cb4b68e37688.tar.bz2
ayatana-indicator-datetime-ce576453c6e8dbc38918600480c7cb4b68e37688.zip
don't let each iteration of a recurring event/alarm spam out other upcoming event/alarms in the menu.
-rw-r--r--src/menu.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/menu.cpp b/src/menu.cpp
index b2562db..a1cd18c 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -267,14 +267,14 @@ private:
for (const auto& appt : m_upcoming)
{
- // don't show too many
- if (n++ >= MAX_APPTS)
- break;
-
// don't show duplicates
if (added.count(appt.uid))
continue;
+ // don't show too many
+ if (n++ >= MAX_APPTS)
+ break;
+
added.insert(appt.uid);
GDateTime* begin = appt.begin();