]> git.cworth.org Git - sup/commitdiff
bugfix: mark thread as read immediately upon view
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 12 Mar 2007 01:30:38 +0000 (01:30 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 12 Mar 2007 01:30:38 +0000 (01:30 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@348 5c8cc53c-5e98-4d25-b20a-d8db53a31250

doc/TODO
lib/sup/modes/thread-index-mode.rb
lib/sup/modes/thread-view-mode.rb

index 1150b75ddd8339eb5094f33b8373792d9d07fed4..7f3635b9d4d718c1c3128e952370d7f6d1638d66 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -1,9 +1,9 @@
 for 0.0.8
 ---------
 x maildir
-_ bugfix: single-line messages come empty upon reply
+x bugfix: single-line messages come empty upon reply
 _ bugfix: when one new message comes into an imap folder, we don't
-   catch it until a restart
+   catch it until a reload
 _ bugfix: triggering a pageup when cursor scrolling up jumps to the
    bottom of the page rather than the next line
 _ create attachments
@@ -11,7 +11,7 @@ _ forward attachments
 _ warnings: top-posting, missing attachment
 x compose in thread-view-mode auto-fills in person
 _ bugfix: stars on messages with blue backgrounds still have green bgs
-_ bugfix: mark messages as read immediately when t-v-m is opened
+x bugfix: mark messages as read immediately when t-v-m is opened
 
 for 0.0.9
 ---------
index e276ccc939b8bfb2855bb00dd690cc6d13b6f9c4..56e3d46e0555232d987adee4276b8bdd884afc21 100644 (file)
@@ -58,10 +58,6 @@ class ThreadIndexMode < LineCursorMode
   def select t=nil
     t ||= @threads[curpos]
 
-    ## this isn't working entirely. TODO:figure out why
-    # 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
       BufferManager.say("Loading message bodies...") do |sid|
@@ -74,6 +70,10 @@ class ThreadIndexMode < LineCursorMode
       BufferManager.draw_screen # lame TODO: make this unnecessary
       ## the first draw_screen is needed before topline and botline
       ## are set, and the second to show the cursor having moved
+
+      t.remove_label :unread
+      update_text_for_line curpos
+      UpdateManager.relay self, :read, t
     end
   end
 
index c699ca58479972c51cff564dec80b4fea13277bd..2ed4dc99de6fa8e9f48e437a2360729f0149ef2f 100644 (file)
@@ -254,9 +254,7 @@ class ThreadViewMode < LineCursorMode
   end
 
   def cleanup
-    @thread.remove_label :unread
-    UpdateManager.relay self, :read, @thread
-    @layout = @text = nil
+    @layout = @text = nil # for good luck
   end
 
   def archive_and_kill