Fix navigate-to-clean [#3903]

This commit is contained in:
psdp 2018-04-23 22:33:00 +00:00 committed by Roman Volosovskyi
parent 06650aecbb
commit 5a96b329f3
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@
([view-id {:keys [db]} screen-params]
;; 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)
(assoc-in [:navigation/screen-params view-id] screen-params))]
{:db (push-view db view-id)})))
@ -97,8 +97,8 @@
(handlers/register-handler-fx
:navigate-to-clean
(fn [{:keys [db]} [_ & params]]
{:db (apply navigate-to db params)}))
(fn [cofx [_ view-id params]]
(navigate-to-clean view-id cofx params)))
(handlers/register-handler-fx
:navigate-to-tab