]> git.notmuchmail.org Git - sup/commitdiff
bugfix: killed threads shouldn't be hidden a priori by thread-index-mode
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 21 May 2007 16:48:59 +0000 (16:48 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 21 May 2007 16:48:59 +0000 (16:48 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@407 5c8cc53c-5e98-4d25-b20a-d8db53a31250

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

index 1940e3b0c2684ae450aad4a0d9ed5575a8a35cfc..0ee728f01d1caea2e73909d6568eb6e72da3bd16 100644 (file)
@@ -124,7 +124,7 @@ class ThreadIndexMode < LineCursorMode
 
   def update
     ## let's see you do THIS in python
-    @threads = @ts.threads.select { |t| !@hidden_threads[t] && !t.has_label?(:killed) }.sort_by { |t| t.date }.reverse
+    @threads = @ts.threads.select { |t| !@hidden_threads[t] }.sort_by { |t| t.date }.reverse
     @size_width = (@threads.map { |t| t.size }.max || 0).num_digits
     regen_text
   end
@@ -337,8 +337,8 @@ class ThreadIndexMode < LineCursorMode
   end
 
   def load_n_threads_background n=LOAD_MORE_THREAD_NUM, opts={}
-    return if @load_thread
-    @load_thread = Redwood::reporting_thread do 
+    return if @load_thread # todo: wrap in mutex
+    @load_thread = Redwood::reporting_thread do
       num = load_n_threads n, opts
       opts[:when_done].call(num) if opts[:when_done]
       @load_thread = nil
index 88611a16be7e271bbab18878444b1c34d4b6ffd2..e31955382f7e819bb87d786ea5ed6118fd09bab7 100644 (file)
@@ -305,7 +305,7 @@ class ThreadSet
       m = builder.call
       add_message m
       load_thread_for_message m, :load_killed => opts[:load_killed]
-      yield @threads.size if block_given?
+      yield size if block_given?
     end
   end