   (:require [cljs.core.async :refer [>! <!]]
             [relevance.data :as data]
             [relevance.io :as io]
-            [relevance.utils :refer [on-channel url-key]]
+            [relevance.migrations :as migrations]
+            [relevance.utils :refer [on-channel url-key host-key hostname]]
             [khroma.alarms :as alarms]
             [khroma.context-menus :as menus]
             [khroma.idle :as idle]

          (tabs/create {:url ext-url})))))


(defn sort-tabs! [window-id url-times]
  (go
    (let [tabs (->> (:tabs (<! (windows/get window-id)))
                    (map #(assoc % :time (or (:time (get url-times (url-key (:url %))))
                                             (- 2000 (:index %)))))
                    (sort-by #(* -1 (:time %)))
                    (map-indexed #(hash-map :index %1

            [re-frame.core :refer [dispatch register-sub register-handler subscribe dispatch-sync]]
            [khroma.extension :as ext]
            [khroma.browser-action :as browser]
            )
  (:require-macros [cljs.core.async.macros :refer [go go-loop]]))


