]> git.cworth.org Git - sup/blobdiff - lib/sup/modes/person-search-results-mode.rb
preemptively load messages when scrolling
[sup] / lib / sup / modes / person-search-results-mode.rb
index 89badaec01fb868938a3a72a67d1186443a5a75a..fc09126e0e6ba228d5848567bcb78f97df17819c 100644 (file)
@@ -3,25 +3,10 @@ module Redwood
 class PersonSearchResultsMode < ThreadIndexMode
   def initialize people
     @people = people
-    super
+    super [], { :participants => @people }
   end
 
   def is_relevant? m; @people.any? { |p| m.from == p }; end
-
-  def load_threads opts={}
-    n = opts[:num] || ThreadIndexMode::LOAD_MORE_THREAD_NUM
-    load_n_threads_background n, :participants => @people,
-                                 :load_killed => true,
-                                 :load_spam => false,
-                                 :when_done =>(lambda do |num|
-      opts[:when_done].call(num) if opts[:when_done]
-      if num > 0
-        BufferManager.flash "Found #{num} threads"
-      else
-        BufferManager.flash "No matches"
-      end
-    end)
-  end
 end
 
 end