sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 846b2025f29e48e4165b8373be0d19a3ddc561de
parent 5ccd5dcb324aaed84e2775729f953384f780d43c
Author: Grant Hollingworth <grant@antiflux.org>
Date:   Tue,  1 Apr 2008 17:49:36 -0400

reload label list on focus

This ensures the unread count for each label is correct.

I often read my list mail from the label list. When I close the thread index
and go back to the label list the unread message count is wrong. This bugs me.

I'm sure a less brutal way of doing this is possible with the UpdateManager
but that seems complicated and therefore prone to errors.

Diffstat:
M lib/sup/modes/label-list-mode.rb | 5 +++++
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/lib/sup/modes/label-list-mode.rb b/lib/sup/modes/label-list-mode.rb
@@ -29,6 +29,11 @@ class LabelListMode < LineCursorMode
       BufferManager.flash "No labels messages with unread messages."
     end
   end
+
+  def focus
+    reload # make sure unread message counts are up-to-date
+  end
+
 protected
 
   def toggle_show_unread_only