status-mobile/syng-im/src/syng_im/navigation.cljs

18 lines
426 B
Plaintext
Raw Normal View History

(ns syng-im.navigation)
(def ^{:dynamic true :private true} *nav-render*
"Flag to suppress navigator re-renders from outside om when pushing/popping."
true)
(defn nav-push [nav route]
(binding [*nav-render* false]
(.push nav (clj->js route))))
(defn nav-replace [nav route]
(binding [*nav-render* false]
(.replace nav (clj->js route))))
(defn nav-pop [nav]
(binding [*nav-render* false]
(.pop nav)))