diff options
author | Renato Araujo Oliveira Filho <renato.filho@canonical.com> | 2016-04-01 10:13:49 -0300 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-29 14:37:39 +0200 |
commit | 274ac6aa8898fb6621dbba8161a08ca41f451952 (patch) | |
tree | e432e25117a6f0392f284efac4427e02e9309a9b /src | |
parent | b7e9673460d55d07020728bd981eb61e956336f0 (diff) | |
download | ayatana-indicator-datetime-274ac6aa8898fb6621dbba8161a08ca41f451952.tar.gz ayatana-indicator-datetime-274ac6aa8898fb6621dbba8161a08ca41f451952.tar.bz2 ayatana-indicator-datetime-274ac6aa8898fb6621dbba8161a08ca41f451952.zip |
better code.
Diffstat (limited to 'src')
-rw-r--r-- | src/snap.cpp | 4 |
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) { |