Sha256: 9e2d87eb54127d162ae1c36da774ea3bd02bfc90bef7901b18bd1f1f54db681c

Contents?: true

Size: 686 Bytes

Versions: 4

Compression:

Stored size: 686 Bytes

Contents

module Redwood

class SearchResultsMode < ThreadIndexMode
  def initialize qobj
    @qobj = qobj
    super
  end

  ## TODO: think about this
  def is_relevant? m; super; end

  def load_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
    end)
  end
end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sup-0.0.5 lib/sup/modes/search-results-mode.rb
sup-0.0.8 lib/sup/modes/search-results-mode.rb
sup-0.0.6 lib/sup/modes/search-results-mode.rb
sup-0.0.7 lib/sup/modes/search-results-mode.rb