diff options
author | Yuri D'Elia <wavexx@thregr.org> | 2011-01-06 23:44:33 +0100 |
---|---|---|
committer | Yuri D'Elia <wavexx@thregr.org> | 2011-01-06 23:44:33 +0100 |
commit | 6a1071b0ca7abd6cb87c33ce4d1bd5f9ddb18df1 (patch) | |
tree | e820d2aa1dab658d2f23ddc03c27208eb2734416 | |
parent | 6a92e688205d48e8f91eba97e305540321b444c6 (diff) |
Fix the read count by properly parsing the 'read' range.
-rw-r--r-- | gnus-desktop-notify.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gnus-desktop-notify.el b/gnus-desktop-notify.el index f52f900..28bbc1e 100644 --- a/gnus-desktop-notify.el +++ b/gnus-desktop-notify.el @@ -208,12 +208,16 @@ with the behavior defined by `gnus-desktop-notify-send-mode'." ;; Internals (setq gnus-desktop-notify-counts '()) +(defun gnus-desktop-notify-read-count (group) + (let ( (count (gnus-last-element (gnus-range-normalize (gnus-info-read group)))) ) + (if (listp count) (cdr count) count))) + (defun gnus-desktop-notify-check (&rest ignored) (interactive) (let ( (updated-groups '()) ) (dolist (g gnus-newsrc-alist) (let* ( (name (gnus-info-group g)) - (read (cdar (gnus-range-normalize (gnus-info-read g)))) + (read (gnus-desktop-notify-read-count g)) (unread (gnus-group-unread name)) ) (when (and (numberp read) (numberp unread)) (let ( (count (+ read unread)) |