]> git.cworth.org Git - sup/commitdiff
bugfix: thread ordering in thread-index-mode "jumping around"
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Fri, 4 Jan 2008 02:23:16 +0000 (18:23 -0800)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Fri, 4 Jan 2008 02:23:16 +0000 (18:23 -0800)
happens when more than one thread exists with the exact same date.

doc/TODO
lib/sup/modes/thread-index-mode.rb

index 5704ea40876595ee9471744d15414f8e1e3a53f0..2dcefaa9362667e77e016d3209c6580c60c97321 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -15,8 +15,6 @@ _ have "notes" (treated as emails to oneself, never sent) as
 
 for 0.4
 -------
-_ bugfix: pressing S on an email address should search to/from
-_ bugfix: thread ordering in thread-index-mode sometimes jumps around with 'M'
 _ bugfix in completion: capitalization for contact names
 _ imap: cache headers
 _ imap: share connection to the same server.
@@ -79,6 +77,7 @@ x gmail support: obsoleted by imap
 
 done
 ----
+x bugfix: thread ordering in thread-index-mode sometimes jumps around with 'M'
 x forwards optionally include attachments
 x flesh out gpg integration: sign & encrypt outgoing
 x pressing A in thread-view-mode should jump to next message
index af1761f5fe4e715ea10cae31a712222f33633e0e..c82e64946e1e9ec8910b80968fee88f96b2c25af 100644 (file)
@@ -167,7 +167,7 @@ EOS
   def update
     @mutex.synchronize do
       ## let's see you do THIS in python
-      @threads = @ts.threads.select { |t| !@hidden_threads[t] }.sort_by { |t| t.date }.reverse
+      @threads = @ts.threads.select { |t| !@hidden_threads[t] }.sort_by { |t| [t.date, t.first.id] }.reverse
       @size_widgets = @threads.map { |t| size_widget_for_thread t }
       @size_widget_width = @size_widgets.max_of { |w| w.length }
     end