From b5b5ad980f72d2b7622d311f31fda5695f49ed8e Mon Sep 17 00:00:00 2001 From: Steve Stevens Date: Sun, 9 Jan 2022 12:06:47 -0700 Subject: [PATCH 07/16] Fixed infinite alarming This issue is caused by the start_ringing() function being called every time the tick() function is called. Thus causing multiple rings to start happening if an alarm isn't stopped soon enough all from the same alarm. Origin: https://gitlab.gnome.org/GNOME/gnome-clocks/-/merge_requests/185 Dependancy: alarms-Make-alarms-persisted-and-add-missed-alarms-n.patch Applied-Upstream: False --- src/alarm-item.vala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/alarm-item.vala b/src/alarm-item.vala index ab9ca9b..6dcb73d 100644 --- a/src/alarm-item.vala +++ b/src/alarm-item.vala @@ -198,8 +198,10 @@ private class Item : Object, ContentItem { } private void start_ringing (GLib.DateTime now) { - state = State.RINGING; - ring (); + if ( state != State.RINGING ) { + state = State.RINGING; + ring (); + } } public void snooze () { -- 2.34.1