From 34b939e5a81324e75e150ae12bbcb1d489cbe7ee Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 30 Sep 2000 00:21:55 +0000 Subject: [PATCH] Don't count a message as unseen if it is deleted -- even if the SEEN flag isn't set. It's common to delete messages without seeing them, and the act of deletion is an indication that the user isn't interested in seeing them. However, don't mark these messages as seen; they might later be undeleted, in which case they want to retain their unseen status. --- v7/src/imail/imail-top.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index a4cd8576d..ef632ab12 100644 --- a/v7/src/imail/imail-top.scm +++ b/v7/src/imail/imail-top.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-top.scm,v 1.214 2000/09/07 03:21:28 cph Exp $ +;;; $Id: imail-top.scm,v 1.215 2000/09/30 00:21:55 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -1930,9 +1930,11 @@ Negative argument means search in reverse." (let ((n (folder-length folder))) (do ((i 0 (+ i 1)) (unseen 0 - (if (message-unseen? (get-message folder i)) - (+ unseen 1) - unseen))) + (if (let ((m (get-message folder i))) + (or (message-seen? m) + (message-deleted? m))) + unseen + (+ unseen 1)))) ((= i n) unseen)))) ;;;; Probe-folder thread -- 2.25.1