From 0d915e9647752f86311a03c13fb9ac04131760b4 Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Sat, 27 May 2023 05:23:24 -0700 Subject: [PATCH] Fix notify-mail.hy again --- mail/notify-mail.hy | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mail/notify-mail.hy b/mail/notify-mail.hy index 3d07359..21795a8 100755 --- a/mail/notify-mail.hy +++ b/mail/notify-mail.hy @@ -29,9 +29,9 @@ (output.add msg)))) output)) (defn mark-all-read [self uid [exclude-msgs None]] - (let [files (self.find-by-uid uid exclude-msgs)] - (for [file files] - (file.mark-read))))) + (let [msgs (self.find-by-uid uid exclude-msgs)] + (for [msg msgs] + (msg.mark-read))))) (defclass MailMessage [] (setv inbox None @@ -139,9 +139,12 @@ msg.subject :time 10000 :actions ["Mark Read" "Delete"]) - 0 (msg.inbox.mark-all-read msg.uid) + 0 (do + (msg.mark-read) + (msg.inbox.mark-all-read msg.uid :exclude-msgs [msg])) 1 (do - (msg.inbox.mark-all-read msg.uid) + (msg.mark-read) + (msg.inbox.mark-all-read msg.uid :exclude-msgs [msg]) (msg.move "Trash"))))) (when (< (len sys.argv) 2)