[sup-devel] [PATCH 2/3] undoing read_and_archive should preserve unread state

Anthony Martinez pi+sup at pihost.us
Mon Jan 4 01:06:35 EST 2010


---
 lib/sup/modes/inbox-mode.rb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/sup/modes/inbox-mode.rb b/lib/sup/modes/inbox-mode.rb
index ad3a864..852ddb7 100644
--- a/lib/sup/modes/inbox-mode.rb
+++ b/lib/sup/modes/inbox-mode.rb
@@ -66,9 +66,10 @@ class InboxMode < ThreadIndexMode
     return unless cursor_thread
     thread = cursor_thread # to make sure lambda only knows about 'old' cursor_thread
 
+    was_unread = thread.labels.member? :unread
     UndoManager.register "reading and archiving thread" do
       thread.apply_label :inbox
-      thread.apply_label :unread
+      thread.apply_label :unread if was_unread
       add_or_unhide thread.first
     end
 
-- 
1.6.5



More information about the Sup-devel mailing list