]> git.cworth.org Git - sup/commitdiff
fixed drafts not loading problem
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sun, 4 Feb 2007 23:23:39 +0000 (23:23 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sun, 4 Feb 2007 23:23:39 +0000 (23:23 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@300 5c8cc53c-5e98-4d25-b20a-d8db53a31250

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

index a6920fd5ca75d8e9d16162ab6b647ea35afab86b..49ddf3f1cbbc9a785c3ae3f8e9c35182cc2417f8 100644 (file)
@@ -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
index 190afcaf98488c8c905dcd5cd30e47a541c4a8db..14f219be9fdb3cc04eb759b6d7c377aeb898087d 100644 (file)
@@ -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
 
index 75c82ace72ee29062d8bc2f56ae8b4bc4e4ab76a..71f4d3bbbe0f6ae5a89bf285989658d7c852a8c9 100644 (file)
@@ -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