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).empty?
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_unarchived_update sender, m
45 def handle_archived_update sender, m
46 t = thread_containing(m) or return
52 super + " #{Index.size} messages in index"