Commit 54d7b514ad589f4451fbb874a0bd2aa62fa9ac3b
- Diff rendering mode:
- inline
- side by side
bin/sup
(3 / 1)
|   | |||
| 249 | 249 | user_label = bm.ask_with_completions :label, "Show threads with label (enter for listing): ", labels | |
| 250 | 250 | unless user_label.nil? | |
| 251 | 251 | if user_label.empty? | |
| 252 | bm.spawn_unless_exists("Label list") { LabelListMode.new } | ||
| 252 | bm.spawn_unless_exists("Label list") do | ||
| 253 | LabelListMode.new { |l| LabelSearchResultsMode.spawn_nicely l } | ||
| 254 | end | ||
| 253 | 255 | else | |
| 254 | 256 | LabelSearchResultsMode.spawn_nicely user_label | |
| 255 | 257 | end |
|   | |||
| 8 | 8 | k.add :toggle_show_unread_only, "Toggle between showing all labels and those with unread mail", 'u' | |
| 9 | 9 | end | |
| 10 | 10 | ||
| 11 | def initialize | ||
| 11 | def initialize &p | ||
| 12 | 12 | @labels = [] | |
| 13 | 13 | @text = [] | |
| 14 | 14 | @unread_only = false | |
| 15 | @proc = p | ||
| 15 | 16 | super | |
| 16 | 17 | regen_text | |
| 17 | 18 | end | |
| … | … | ||
| 84 | 84 | def select_label | |
| 85 | 85 | label, num_unread = @labels[curpos] | |
| 86 | 86 | return unless label | |
| 87 | LabelSearchResultsMode.spawn_nicely label | ||
| 87 | @proc.call label | ||
| 88 | 88 | end | |
| 89 | 89 | end | |
| 90 | 90 |

