fixed help improve screen
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
df17c50612
commit
e9af024e0d
|
@ -4,9 +4,12 @@
|
|||
|
||||
(handlers/register-handler-fx
|
||||
:help-improve-handler
|
||||
(fn [{db :db} [_ yes? address next]]
|
||||
(merge (accounts/account-update {:sharing-usage-data? yes?} {:db db})
|
||||
{:dispatch-n [(if yes?
|
||||
[:register-mixpanel-tracking address]
|
||||
[:unregister-mixpanel-tracking])
|
||||
next]})))
|
||||
(fn [{{:accounts/keys [accounts current-account-id] :as db} :db} [_ yes? address next]]
|
||||
(let [{:keys [sharing-usage-data?]} (get accounts current-account-id)]
|
||||
(merge (accounts/account-update {:sharing-usage-data? yes?} {:db db})
|
||||
{:dispatch-n [(if yes?
|
||||
[:register-mixpanel-tracking address]
|
||||
(when (and next sharing-usage-data?)
|
||||
[:unregister-mixpanel-tracking]))
|
||||
(or next [:navigate-to-clean :home])]}))))
|
||||
|
||||
|
|
Loading…
Reference in New Issue