From: wmorgan Date: Sun, 4 Feb 2007 23:23:39 +0000 (+0000) Subject: fixed drafts not loading problem X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=e8a8134b67c4b7f2c9acfa9c900fa513b3cbebd0;p=sup fixed drafts not loading problem git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@300 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- diff --git a/lib/sup/draft.rb b/lib/sup/draft.rb index a6920fd..49ddf3f 100644 --- a/lib/sup/draft.rb +++ b/lib/sup/draft.rb @@ -59,7 +59,7 @@ class DraftLoader < Source ids.each do |id| if id > cur_offset self.cur_offset = id - yield [id, [:draft]] + yield [id, [:draft, :inbox]] end end end diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index 190afca..14f219b 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -57,7 +57,8 @@ class ThreadIndexMode < LineCursorMode def select t=nil t ||= @threads[curpos] - t = t.clone # XXXX highly experimental + t = t.clone # required so that messages added later on don't completely + # screw everything up ## TODO: don't regen text completely Redwood::reporting_thread do @@ -81,11 +82,13 @@ class ThreadIndexMode < LineCursorMode def handle_starred_update m return unless(t = @ts.thread_for m) update_text_for_line @lines[t] + BufferManager.draw_screen end def handle_read_update m return unless(t = @ts.thread_for m) update_text_for_line @lines[t] + BufferManager.draw_screen end ## overwrite me! @@ -103,6 +106,7 @@ class ThreadIndexMode < LineCursorMode if @ts.contains_id? mid @ts.remove mid update + BufferManager.draw_screen end end diff --git a/lib/sup/update.rb b/lib/sup/update.rb index 75c82ac..71f4d3b 100644 --- a/lib/sup/update.rb +++ b/lib/sup/update.rb @@ -14,7 +14,6 @@ class UpdateManager def relay type, *args meth = "handle_#{type}_update".intern @targets.keys.each { |o| o.send meth, *args if o.respond_to? meth } - BufferManager.draw_screen ## TODO: think about this end end