commit e2ddccac5e38efc91899d030853421a56dc76eca
parent bd9f8f2062a19bda435ab2941d8592e0d9707679
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Sat, 24 Nov 2007 17:55:15 +0000
made "loading message bodies" message have a counter. useful for slow-ass imap connections.
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@714 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
@@ -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