2016-03-25 17:22:13 +03:00
|
|
|
(ns syng-im.navigation)
|
2016-03-28 15:14:57 +03:00
|
|
|
|
|
|
|
(def ^{:dynamic true :private true} *nav-render*
|
|
|
|
"Flag to suppress navigator re-renders from outside om when pushing/popping."
|
|
|
|
true)
|
|
|
|
|
2016-03-29 23:45:31 +03:00
|
|
|
(defn nav-pop [nav]
|
|
|
|
(binding [*nav-render* true]
|
|
|
|
(.pop nav)))
|
|
|
|
|
2016-03-28 15:14:57 +03:00
|
|
|
(defn nav-push [nav route]
|
2016-03-29 23:45:31 +03:00
|
|
|
(binding [*nav-render* true]
|
2016-03-28 15:14:57 +03:00
|
|
|
(.push nav (clj->js route))))
|
|
|
|
|
|
|
|
(defn nav-replace [nav route]
|
2016-03-29 23:45:31 +03:00
|
|
|
(binding [*nav-render* true]
|
2016-03-28 15:14:57 +03:00
|
|
|
(.replace nav (clj->js route))))
|