Skip to content

Commit ce283ee

Browse files
committed
fixing search
1 parent da6f406 commit ce283ee

File tree

9 files changed

+235
-226
lines changed

9 files changed

+235
-226
lines changed

cljs-om/src/cljs_om/core.cljs

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,5 @@
5252
(go-loop [] (tweets/add-tweet (<! combined-tweets-chan) app-state word-cloud) (recur))
5353

5454
;;; The app starts with the search string encoded in the URI location hash.
55-
(tweets/start-search app-state (util/search-hash) tweets-chan)
55+
(defn start-search [search] (tweets/start-search app-state search tweets-chan))
56+
(start-search (util/search-hash))

cljs-om/src/cljs_om/tweets.cljs

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,5 @@
6161
(aset js/window "location" "hash" (js/encodeURIComponent s))
6262
(swap! app assoc :stream (js/EventSource. (str "/tweetFeed?q=" s)))
6363
(.addEventListener (:stream @app) "message" #(receive-sse tweets-chan %) false)
64-
(doall (for [x (range 5)] (ajax/prev-search "*" 500 (* 500 x))))))
64+
(doall (for [x (range 10)] (ajax/prev-search search 100 (* 100 x))))))
65+
;

0 commit comments

Comments
 (0)