[gnome-clocks: 1/2] Fix alarm muted after first snooze.



commit e8f220f825f2ad4bb6888de7d47a150726ccabb6
Author: louib <l0u13 protonmail com>
Date:   Thu Dec 5 22:58:31 2019 +0000

    Fix alarm muted after first snooze.
    
    This fixes a bug where the alarm gets muted after the first snooze.
    This is happening because the same cancellable object is re-used
    after calling `stop()`, even though it was cancelled by the first
    snooze.

 src/utils.vala | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/utils.vala b/src/utils.vala
index 394e0b8..84af1b8 100644
--- a/src/utils.vala
+++ b/src/utils.vala
@@ -321,6 +321,10 @@ public class Bell : Object {
             return;
         }
 
+        if (cancellable.is_cancelled()) {
+            cancellable.reset ();
+        }
+
         try {
             do {
                 yield gsound.play_full (cancellable,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]