* [sup-talk] [PATCH] reload label list on focus
@ 2008-04-01 20:48 Grant Hollingworth
2008-04-01 21:49 ` Grant Hollingworth
0 siblings, 1 reply; 3+ messages in thread
From: Grant Hollingworth @ 2008-04-01 20:48 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [sup-talk] [PATCH] reload label list on focus
2008-04-01 20:48 [sup-talk] [PATCH] reload label list on focus Grant Hollingworth
@ 2008-04-01 21:49 ` Grant Hollingworth
2008-05-01 1:04 ` William Morgan
0 siblings, 1 reply; 3+ messages in thread
From: Grant Hollingworth @ 2008-04-01 21:49 UTC (permalink / raw)
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.
---
Oops... last patch had focus under protected.
lib/sup/modes/label-list-mode.rb | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/lib/sup/modes/label-list-mode.rb b/lib/sup/modes/label-list-mode.rb
index 514e9c4..132b654 100644
--- 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
--
1.5.4.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [sup-talk] [PATCH] reload label list on focus
2008-04-01 21:49 ` Grant Hollingworth
@ 2008-05-01 1:04 ` William Morgan
0 siblings, 0 replies; 3+ messages in thread
From: William Morgan @ 2008-05-01 1:04 UTC (permalink / raw)
Reformatted excerpts from Grant Hollingworth's message of 2008-04-01:
> 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.
It's probably not ideal but we do the same thing elsewhere because it's
simple.
Applied directly to master. Thanks!
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-01 1:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-01 20:48 [sup-talk] [PATCH] reload label list on focus Grant Hollingworth
2008-04-01 21:49 ` Grant Hollingworth
2008-05-01 1:04 ` William Morgan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox