Skip to content

Commit

Permalink
remove default sync
Browse files Browse the repository at this point in the history
  • Loading branch information
pepijndevos committed Aug 30, 2022
1 parent 84ca42c commit bc229f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/main/nyancad/mosaic/common.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@
(println (keyset e))
((get shortcuts (keyset e) #()))))

(def default-sync "https://c6be5bcc-59a8-492d-91fd-59acc17fef02-bluemix.cloudantnosqldb.appdomain.cloud/schematics")

(defn pprint-str [data]
(-> data
pprint
Expand Down
5 changes: 3 additions & 2 deletions src/main/nyancad/mosaic/libman.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
(def params (js/URLSearchParams. js/window.location.search))
(def dbname (or (.get params "db") (js/localStorage.getItem "db") "schematics"))
(def dburl (if js/window.dburl (.-href (js/URL. dbname js/window.dburl)) dbname))
(def sync (or (.get params "sync") (js/localStorage.getItem "sync") cm/default-sync))
(def sync (or (.get params "sync") (js/localStorage.getItem "sync") js/window.default_sync))
(defonce db (pouchdb dburl))

(defonce modeldb (pouch-atom db "models" (r/atom {})))
Expand Down Expand Up @@ -326,6 +326,7 @@
(set! js/window.name "libman")
(set! js/document.onclick #(swap! context-content assoc :body nil))
(js/localStorage.setItem "db" dbname)
(js/localStorage.setItem "sync" sync)
(when (seq sync)
(js/localStorage.setItem "sync" sync))
(synchronise)
(render))

0 comments on commit bc229f8

Please sign in to comment.