Commit 01d31d760adc4fbb65517621dc3c6e0be33f9642
- Diff rendering mode:
- inline
- side by side
lib/sup.rb
(1 / 0)
|   | |||
| 299 | 299 | require "sup/modes/person-search-results-mode" | |
| 300 | 300 | require "sup/modes/inbox-mode" | |
| 301 | 301 | require "sup/modes/main-inbox-mode" | |
| 302 | require "sup/modes/inbox-subset-mode" | ||
| 302 | 303 | require "sup/modes/buffer-list-mode" | |
| 303 | 304 | require "sup/modes/poll-mode" | |
| 304 | 305 | require "sup/modes/file-browser-mode" |
lib/sup/modes/inbox-subset-mode.rb
(17 / 0)
|   | |||
| 1 | module Redwood | ||
| 2 | |||
| 3 | class InboxSubsetMode < InboxMode | ||
| 4 | def self.spawn_nicely label | ||
| 5 | label = LabelManager.label_for(label) unless label.is_a?(Symbol) | ||
| 6 | case label | ||
| 7 | when nil | ||
| 8 | when :inbox | ||
| 9 | BufferManager.raise_to_front MainInboxMode.instance.buffer | ||
| 10 | else | ||
| 11 | b, new = BufferManager.spawn_unless_exists("Inbox threads with label '#{label}'") { InboxSubsetMode.new [label] } | ||
| 12 | b.mode.load_threads :num => b.content_height if new | ||
| 13 | end | ||
| 14 | end | ||
| 15 | end | ||
| 16 | |||
| 17 | end |
Comments
Add a new comment:
Login or create an account to post a comment
Add your comment
Please log in to comment

