emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/notmuch-indicator 83e1bd3ceb 07/36: Tweak code to avoid


From: ELPA Syncer
Subject: [elpa] externals/notmuch-indicator 83e1bd3ceb 07/36: Tweak code to avoid multiple timers
Date: Wed, 21 Sep 2022 00:59:20 -0400 (EDT)

branch: externals/notmuch-indicator
commit 83e1bd3ceb0e742ea2656ba65245b314c31dc232
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Tweak code to avoid multiple timers
    
    This seems to work, though it's been a long day...
---
 notmuch-indicator.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/notmuch-indicator.el b/notmuch-indicator.el
index 10487b54a0..0db1c5078c 100644
--- a/notmuch-indicator.el
+++ b/notmuch-indicator.el
@@ -102,14 +102,12 @@ These form a string like: @50 🤡10."
                   (eq (timer--function timer) 'notmuch-indicator--indicator))
                 timer-list)))
 
-;; TODO 2022-09-19: If length of `notmuch-indicator--running-p' is > 1
-;; we need to reduce it to 1.
 (defun notmuch-indicator--run ()
   "Run the timer with a delay, starting it if necessary.
 The delay is specified by `notmuch-indicator-refresh-count'."
   (unless (notmuch-indicator--running-p)
-    (notmuch-indicator--indicator))
-  (run-at-time t notmuch-indicator-refresh-count 
#'notmuch-indicator--indicator))
+    (notmuch-indicator--indicator)
+    (run-at-time t notmuch-indicator-refresh-count 
#'notmuch-indicator--indicator)))
 
 ;;;###autoload
 (define-minor-mode notmuch-indicator-mode



reply via email to

[Prev in Thread] Current Thread [Next in Thread]