5 class InboxMode < ThreadIndexMode
7 ## overwrite toggle_archived with archive
8 k.add :archive, "Archive thread (remove from inbox)", 'a'
12 super [:inbox, :sent], { :label => :inbox, :skip_killed => true }
13 raise "can't have more than one!" if defined? @@instance
18 m.has_label? :inbox && ([:spam, :deleted, :killed] & m.labels).length == 0
21 ## label-list-mode wants to be able to raise us if the user selects
22 ## the "inbox" label, so we need to keep our singletonness around
23 def self.instance; @@instance; end
24 def killable?; false; end
27 return unless cursor_thread
28 cursor_thread.remove_label :inbox
29 hide_thread cursor_thread
33 def multi_archive threads
41 def handle_archived_update sender, t
48 # not quite working, and not sure if i like it anyways
49 # def handle_unarchived_update sender, t
50 # Redwood::log "unarchived #{t.subj}"
55 super + " #{Index.size} messages in index"