commit 1ab871042718291a5818bd1b557f24e66db2daac
parent c44f0da7fdd8abb3cde5f8a538fbdc7082c332d3
Author: Anthony Martinez <pi+sup@pihost.us>
Date: Sun, 3 Jan 2010 23:06:35 -0700
undoing read_and_archive should preserve unread state
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/sup/modes/inbox-mode.rb b/lib/sup/modes/inbox-mode.rb
@@ -64,9 +64,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