]> git.cworth.org Git - sup/blobdiff - lib/sup/modes/thread-index-mode.rb
many many changes. this is what happens when i have 5 hours on an airplane
[sup] / lib / sup / modes / thread-index-mode.rb
index 1f61f2069a671d005f967cc4f0f22b0bae6c7647..8dec42d1e842b41e217d6bafcf422eb3b1ae3198 100644 (file)
@@ -65,7 +65,6 @@ EOS
 
   def lines; @text.length; end
   def [] i; @text[i]; end
-  #def contains_thread? t; !@lines[t].nil?; end
   def contains_thread? t; @threads.include?(t) end
 
   def reload
@@ -78,8 +77,7 @@ EOS
   def select t=nil
     t ||= cursor_thread or return
 
-    ## TODO: don't regen text completely
-    Redwood::reporting_thread do
+    Redwood::reporting_thread("load messages for thread-view-mode") do
       num = t.size
       message = "Loading #{num.pluralize 'message body'}..."
       BufferManager.say(message) do |sid|
@@ -402,7 +400,7 @@ EOS
 
   def load_n_threads_background n=LOAD_MORE_THREAD_NUM, opts={}
     return if @load_thread # todo: wrap in mutex
-    @load_thread = Redwood::reporting_thread do
+    @load_thread = Redwood::reporting_thread("load threads for thread-index-mode") do
       num = load_n_threads n, opts
       opts[:when_done].call(num) if opts[:when_done]
       @load_thread = nil