diff --git a/src/status_im/navigation/effects.cljs b/src/status_im/navigation/effects.cljs index b6dc872e926f..66302b6191c4 100644 --- a/src/status_im/navigation/effects.cljs +++ b/src/status_im/navigation/effects.cljs @@ -46,17 +46,19 @@ (defn- navigate [component] (let [{:keys [options]} (get views/screens component)] - (dismiss-all-modals) - (navigation/push - (name @state/root-id) - {:component {:id component - :name component - :options (merge (options/default-root) - (options/statusbar-and-navbar) - options - (if (:topBar options) - (options/merge-top-bar (options/topbar-options) options) - {:topBar {:visible false}}))}}))) + (js/requestAnimationFrame + (fn [] + (dismiss-all-modals) + (navigation/push + (name @state/root-id) + {:component {:id component + :name component + :options (merge (options/default-root) + (options/statusbar-and-navbar) + options + (if (:topBar options) + (options/merge-top-bar (options/topbar-options) options) + {:topBar {:visible false}}))}}))))) (rf/reg-fx :navigate-to navigate) @@ -65,15 +67,17 @@ (defn- navigate-to-within-stack [[component comp-id]] (let [{:keys [options]} (get views/screens component)] - (navigation/push - (name comp-id) - {:component {:id component - :name component - :options (merge (options/statusbar-and-navbar) - options - (if (:topBar options) - (options/merge-top-bar (options/topbar-options) options) - {:topBar {:visible false}}))}}))) + (js/requestAnimationFrame + (fn [] + (navigation/push + (name comp-id) + {:component {:id component + :name component + :options (merge (options/statusbar-and-navbar) + options + (if (:topBar options) + (options/merge-top-bar (options/topbar-options) options) + {:topBar {:visible false}}))}}))))) (rf/reg-fx :navigate-to-within-stack navigate-to-within-stack)