lib/sup/modes/search-results-mode.rb in sup-0.0.3 vs lib/sup/modes/search-results-mode.rb in sup-0.0.4

- old
+ new

@@ -11,14 +11,16 @@ end ## TODO: think about this def is_relevant? m; super; end - def load_more_threads n=ThreadIndexMode::LOAD_MORE_THREAD_NUM + def load_more_threads opts={} + n = opts[:num] || ThreadIndexMode::LOAD_MORE_THREAD_NUM load_n_threads_background n, :qobj => @qobj, :load_killed => true, :load_spam => false, :when_done =>(lambda do |num| + opts[:when_done].call if opts[:when_done] if num > 0 BufferManager.flash "Found #{num} threads" else BufferManager.flash "No matches" end