]> git.notmuchmail.org Git - sup/commitdiff
made "loading message bodies" message have a counter. useful for slow-ass imap connec...
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sat, 24 Nov 2007 17:55:15 +0000 (17:55 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sat, 24 Nov 2007 17:55:15 +0000 (17:55 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@714 5c8cc53c-5e98-4d25-b20a-d8db53a31250

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

index 10abfaf98abb93fb442c0eb96d4076acb8ff05da..aec4ba4c9095c4114d412fb4a800c8c76e285418 100644 (file)
@@ -82,8 +82,13 @@ EOS
 
     ## TODO: don't regen text completely
     Redwood::reporting_thread do
+      num = t.size
       BufferManager.say("Loading message bodies...") do |sid|
-        t.each { |m, *o| m.load_from_source! if m }
+        t.each_with_index do |(m, *o), i|
+          next unless m
+          BufferManager.say "Loading message bodies... (#{i + 1}/#{num})", sid if t.size > 1
+          m.load_from_source! 
+        end
       end
       mode = ThreadViewMode.new t, @hidden_labels
       BufferManager.spawn t.subj, mode