From mboxrd@z Thu Jan 1 00:00:00 1970 From: grant@antiflux.org (Grant Hollingworth) Date: Mon, 26 Nov 2007 13:57:49 -0500 Subject: [sup-talk] [PATCH] label-list-mode with no unread messages In-Reply-To: <1195936974-sup-3449@south> References: <1195673904-sup-7215@spooky> <1195936974-sup-3449@south> Message-ID: <1196103315-sup-3020@spooky.local> Excerpts from William Morgan's message of Sat Nov 24 15:47:34 -0500 2007: > Shouldn't be too hard to do this if you use catch the appropriate > events from UpdateManager. I hadn't looked at the UpdateManager before... that's pretty cool. The problem is that the text in label-list-mode is created by LabelListMode#regen_text. It would be awkward to fiddle with @text outside of there. Since regen_text gets its numbers from Index.num_results_for, the other buffer has to sync to the index before the label list will know about it. So it seems to be just as effective to add 'def focus; reload; end' to LabelListMode. Handling the unread counts in LabelListMode seems dirty, anyway. You'd have to watch more than just the :read event, right? If a thread is archived from the inbox, for instance, the unread count for 'Inbox' should go down. So I haven't done any of that... but I found a related problem: the inbox doesn't update if you unarchive a thread elsewhere. I made a na?ve patch that works in some cases. -------------- next part -------------- A non-text attachment was scrubbed... Name: sup-inbox-unarchived.diff Type: application/octet-stream Size: 988 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20071126/5ad3bba1/attachment.obj