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 }
13 raise "can't have more than one!" if defined? @@instance
17 def is_relevant? m; m.has_label? :inbox; end
19 ## label-list-mode wants to be able to raise us if the user selects
20 ## the "inbox" label, so we need to keep our singletonness around
21 def self.instance; @@instance; end
22 def killable?; false; end
25 return unless cursor_thread
26 cursor_thread.remove_label :inbox
27 hide_thread cursor_thread
31 def multi_archive threads
39 def handle_archived_update sender, t
46 # not quite working, and not sure if i like it anyways
47 # def handle_unarchived_update sender, t
48 # Redwood::log "unarchived #{t.subj}"
53 super + " #{Index.size} messages in index"