]> git.notmuchmail.org Git - sup/commitdiff
minor tweaks
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sun, 21 Jan 2007 17:47:46 +0000 (17:47 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sun, 21 Jan 2007 17:47:46 +0000 (17:47 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@270 5c8cc53c-5e98-4d25-b20a-d8db53a31250

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

index e023c2660d4e47a7e654aeeb7f637613680df89b..2549a1fe09c3a01f348e7c831628a181c008b872 100644 (file)
@@ -61,7 +61,7 @@ class ThreadViewMode < LineCursorMode
     @layout[latest].state = :open if @layout[latest].state == :closed
     @layout[earliest].state = :detailed if earliest.has_label?(:unread) || @thread.size == 1
 
-    BufferManager.say("Loading message bodies...") { regen_text }
+    BufferManager.say("Loading message bodies...") { update }
   end
 
   def draw_line ln, opts={}
@@ -104,7 +104,7 @@ class ThreadViewMode < LineCursorMode
   def alias
     p = @person_lines[curpos] or return
     alias_contact p
-    regen_text
+    update
   end
 
   def search
@@ -237,7 +237,7 @@ class ThreadViewMode < LineCursorMode
   def expand_all_quotes
     if(m = @message_lines[curpos])
       quotes = m.chunks.select { |c| (c.is_a?(Message::Quote) || c.is_a?(Message::Signature)) && c.lines.length > 1 }
-      numopen = quotes.inject(0) { |s, c| s + (@layout[c].state && @layout[c].state == :open ? 1 : 0) }
+      numopen = quotes.inject(0) { |s, c| s + (@layout[c].state == :open ? 1 : 0) }
       newstate = numopen > quotes.length / 2 ? :closed : :open
       quotes.each { |c| @layout[c].state = newstate }
       update