Don't count a message as unseen if it is deleted -- even if the SEEN
authorChris Hanson <org/chris-hanson/cph>
Sat, 30 Sep 2000 00:21:55 +0000 (00:21 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sat, 30 Sep 2000 00:21:55 +0000 (00:21 +0000)
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

index a4cd8576dc664945d740d4eb45c808957b7790f6..ef632ab12fdd9e4a3c178bfede02b1658d530668 100644 (file)
@@ -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))))
 \f
 ;;;; Probe-folder thread