branch: elpa/gnosis
commit a6d64c1b3c7e05de27d47792392d8c3309468030
Author: Thanos Apollo <pub...@thanosapollo.org>
Commit: Thanos Apollo <pub...@thanosapollo.org>

    modeline: Remove due note indication when 0.
---
 gnosis.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/gnosis.el b/gnosis.el
index 6cef4d4bd5..5935551efd 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -2978,6 +2978,7 @@ DASHBOARD-TYPE: either Notes or Decks to display the 
respective dashboard."
     (shell-command (format "%s pull" (executable-find "git")))
     (setf gnosis-db
          (emacsql-sqlite-open (expand-file-name "gnosis.db" gnosis-dir)))))
+
 ;; Gnosis mode ;;
 ;;;;;;;;;;;;;;;;;
 
@@ -2988,17 +2989,19 @@ DASHBOARD-TYPE: either Notes or Decks to display the 
respective dashboard."
   :group 'gnosis
   :lighter nil
   (setq gnosis-due-notes-total (length (gnosis-review-get-due-notes)))
-  (if (and gnosis-modeline-mode (> gnosis-due-notes-total 0))
+  (if gnosis-modeline-mode
       (progn
         (add-to-list 'global-mode-string
-                    '(:eval
-                      (format " G:%d" gnosis-due-notes-total) 'face 'warning))
+                     '(:eval
+                       (if (and gnosis-due-notes-total (> 
gnosis-due-notes-total 0))
+                           (format " G:%d" gnosis-due-notes-total)
+                         "")))
         (force-mode-line-update))
     (setq global-mode-string
           (seq-remove (lambda (item)
                         (and (listp item) (eq (car item) :eval)
                              (string-prefix-p " G:" (format "%s" (eval (cadr 
item))))))
-                     global-mode-string))
+                      global-mode-string))
     (force-mode-line-update)))
 
 (define-derived-mode gnosis-mode special-mode "Gnosis"

Reply via email to