fix root id of :init-root-fx (#15228)

This commit is contained in:
Parvesh Monu 2023-03-02 12:10:41 +05:30 committed by GitHub
parent 7d9709ee67
commit 78682b823b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -189,10 +189,11 @@
(re-frame/reg-fx (re-frame/reg-fx
:init-root-fx :init-root-fx
(fn [new-root-id] (fn [new-root-id]
(log/debug :init-root-fx new-root-id) (let [root (get (roots/roots) new-root-id)]
(dismiss-all-modals) (log/debug :init-root-fx new-root-id)
(reset! state/root-id new-root-id) (dismiss-all-modals)
(navigation/set-root (get (roots/roots) new-root-id)))) (reset! state/root-id (or (get-in root [:root :stack :id]) new-root-id))
(navigation/set-root root))))
(rf/defn set-multiaccount-root (rf/defn set-multiaccount-root
{:events [::set-multiaccount-root]} {:events [::set-multiaccount-root]}