Fix navigate-to-clean [#3903]
This commit is contained in:
parent
06650aecbb
commit
5a96b329f3
|
@ -23,7 +23,7 @@
|
||||||
([view-id {:keys [db]} screen-params]
|
([view-id {:keys [db]} screen-params]
|
||||||
;; TODO (jeluard) Unify all :navigate-to flavours. Maybe accept a map of parameters?
|
;; TODO (jeluard) Unify all :navigate-to flavours. Maybe accept a map of parameters?
|
||||||
|
|
||||||
(let [db (cond-> db
|
(let [db (cond-> (assoc db :navigation-stack (list))
|
||||||
(seq screen-params)
|
(seq screen-params)
|
||||||
(assoc-in [:navigation/screen-params view-id] screen-params))]
|
(assoc-in [:navigation/screen-params view-id] screen-params))]
|
||||||
{:db (push-view db view-id)})))
|
{:db (push-view db view-id)})))
|
||||||
|
@ -97,8 +97,8 @@
|
||||||
|
|
||||||
(handlers/register-handler-fx
|
(handlers/register-handler-fx
|
||||||
:navigate-to-clean
|
:navigate-to-clean
|
||||||
(fn [{:keys [db]} [_ & params]]
|
(fn [cofx [_ view-id params]]
|
||||||
{:db (apply navigate-to db params)}))
|
(navigate-to-clean view-id cofx params)))
|
||||||
|
|
||||||
(handlers/register-handler-fx
|
(handlers/register-handler-fx
|
||||||
:navigate-to-tab
|
:navigate-to-tab
|
||||||
|
|
Loading…
Reference in New Issue