From mboxrd@z Thu Jan 1 00:00:00 1970 From: grant@antiflux.org (Grant Hollingworth) Date: Tue, 01 Apr 2008 16:48:47 -0400 Subject: [sup-talk] [PATCH] reload label list on focus Message-ID: <1207082674-sup-4879@spooky.local> 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 | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/sup/modes/label-list-mode.rb b/lib/sup/modes/label-list-mode.rb index 514e9c4..662bb44 100644 --- a/lib/sup/modes/label-list-mode.rb +++ b/lib/sup/modes/label-list-mode.rb @@ -41,6 +41,10 @@ protected buffer.mark_dirty if buffer end + def focus + reload # make sure counts are up-to-date + end + def regen_text @text = [] labels = LabelManager.listable_labels -- 1.5.4.4