             [frontend.utils.seq :refer [find-index]]
             [frontend.state :as state]
             [frontend.utils :as utils :include-macros true :refer [mlog]]
+            [goog.functions :as gfun]
             [om.next :as om-next])
   (:require-macros [frontend.controllers.ws :refer [with-swallow-ignored-build-channels]]))
 

  [pusher-imp message {:keys [channel-name status]} _ _]
  (utils/mlog "subscription-error " channel-name status))

(defmethod post-ws-event! :refresh
  [pusher-imp message _ previous-state current-state comms app]
  (let [navigation-point (:navigation-point current-state)
        api-ch (:api comms)]
    (utils/mlog "ws refresh navigation-point" navigation-point)
    (api/get-projects api-ch)
    (condp contains? navigation-point
      #{:build} (when (get-in current-state state/show-usage-queue-path)

                                                     :builds-per-page (:builds-per-page current-state)
                                                     :all? (get-in current-state state/show-all-builds-path))
                                              api-ch)
      state/workflows-routes (debounced-refresh app)
      nil)))
