]> git.cworth.org Git - sup/commitdiff
reload label list on focus
authorGrant Hollingworth <grant@antiflux.org>
Tue, 1 Apr 2008 21:49:36 +0000 (17:49 -0400)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Thu, 1 May 2008 01:03:09 +0000 (18:03 -0700)
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.

lib/sup/modes/label-list-mode.rb

index 514e9c4d93cebb3b6a594a6fabd6440bb3ce84c6..132b654066a8f107e2e52d7d2622c722e1e65ea6 100644 (file)
@@ -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