aboutsummaryrefslogtreecommitdiff
path: root/src/snap.cpp
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2016-04-01 10:13:49 -0300
committerRobert Tari <robert@tari.in>2021-07-05 18:40:53 +0200
commitc1fb6eece72a362bbc801e9a1d84d05fc8a06532 (patch)
treef5bf2c8419b444a36a577494f4fbb64cca488919 /src/snap.cpp
parente4e139f59dbff3cdd5db2f2e175dd78ce56ad956 (diff)
downloadayatana-indicator-datetime-c1fb6eece72a362bbc801e9a1d84d05fc8a06532.tar.gz
ayatana-indicator-datetime-c1fb6eece72a362bbc801e9a1d84d05fc8a06532.tar.bz2
ayatana-indicator-datetime-c1fb6eece72a362bbc801e9a1d84d05fc8a06532.zip
better code.
Diffstat (limited to 'src/snap.cpp')
-rw-r--r--src/snap.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/snap.cpp b/src/snap.cpp
index ca89851..259592e 100644
--- a/src/snap.cpp
+++ b/src/snap.cpp
@@ -101,7 +101,7 @@ public:
// calendar events are muted in silent mode; alarm clocks never are
std::shared_ptr<ain::Sound> sound;
- if (appointment.is_ubuntu_alarm() || !silent_mode()) {
+ if (appointment.is_ubuntu_alarm() || (alarm.has_sound() && !silent_mode())) {
// create the sound.
const auto role = appointment.is_ubuntu_alarm() ? "alarm" : "alert";
const auto uri = get_alarm_uri(appointment, alarm, m_settings);
@@ -226,8 +226,6 @@ private:
};
std::string uri;
- if (!alarm.has_sound() && !is_alarm)
- return uri;
for(const auto& candidate : candidates)
{