mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-30 18:35:37 +00:00
18 lines
426 B
Plaintext
18 lines
426 B
Plaintext
|
(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)))
|