commit 918ba611f8d6aac0bcc1cd6c027a00c8bc39d9b6
parent 6d21fb93376ad4ccb651a8e98b385cef8343fa7e
Author: William Morgan <wmorgan-sup@masanjin.net>
Date: Sat, 24 May 2008 21:14:12 -0700
Merge commit 'origin/read-and-archive'
Diffstat:
1 file changed, 18 insertions(+), 0 deletions(-)
diff --git a/lib/sup/modes/inbox-mode.rb b/lib/sup/modes/inbox-mode.rb
@@ -6,6 +6,7 @@ class InboxMode < ThreadIndexMode
register_keymap do |k|
## overwrite toggle_archived with archive
k.add :archive, "Archive thread (remove from inbox)", 'a'
+ k.add :read_and_archive, "Archive thread (remove from inbox) and mark read", 'A'
end
def initialize
@@ -38,6 +39,23 @@ class InboxMode < ThreadIndexMode
regen_text
end
+ def read_and_archive
+ return unless cursor_thread
+ cursor_thread.remove_label :unread
+ cursor_thread.remove_label :inbox
+ hide_thread cursor_thread
+ regen_text
+ end
+
+ def multi_read_and_archive threads
+ threads.each do |t|
+ t.remove_label :unread
+ t.remove_label :inbox
+ hide_thread t
+ end
+ regen_text
+ end
+
def handle_unarchived_update sender, m
add_or_unhide m
end