sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit dc41e749cc7b18ff143ed57b7e1df745088c9599
parent fe9e9bab2cf3c1ced81c542a77af2c37afd0590f
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date:   Mon, 21 May 2007 16:48:59 +0000

bugfix: killed threads shouldn't be hidden a priori by thread-index-mode

git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@407 5c8cc53c-5e98-4d25-b20a-d8db53a31250

Diffstat:
M lib/sup/modes/thread-index-mode.rb | 6 +++---
M lib/sup/thread.rb | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
@@ -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
diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb
@@ -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