From 3eb570f0824905f31d97e22f9a4e0da2194e51ae Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Tue, 26 Mar 2019 14:17:16 +0100 Subject: [PATCH] Set chaos mode every time, dont show the popup everytime Signed-off-by: Igor Mandrigin --- src/status_im/events.cljs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/status_im/events.cljs b/src/status_im/events.cljs index 1a880f502c..c6ce4e649e 100644 --- a/src/status_im/events.cljs +++ b/src/status_im/events.cljs @@ -180,17 +180,17 @@ :accounts.ui/chaos-mode-switched (fn [{:keys [db] :as cofx} [_ chaos-mode?]] (let [old-chaos-mode? (get-in db [:account/account :settings :chaos-mode?])] - (when (not= old-chaos-mode? chaos-mode?) - (fx/merge - cofx - (when chaos-mode? - {:ui/show-confirmation - {:title (i18n/label :t/chaos-unicorn-day) - :content (i18n/label :t/chaos-unicorn-day-details) - :confirm-button-text (i18n/label :t/see-details) - :cancel-button-text (i18n/label :t/cancel) - :on-accept open-chaos-unicorn-day-link}}) - (accounts/switch-chaos-mode chaos-mode?)))))) + (fx/merge + cofx + (when (and chaos-mode? + (not= old-chaos-mode? chaos-mode?)) + {:ui/show-confirmation + {:title (i18n/label :t/chaos-unicorn-day) + :content (i18n/label :t/chaos-unicorn-day-details) + :confirm-button-text (i18n/label :t/see-details) + :cancel-button-text (i18n/label :t/cancel) + :on-accept open-chaos-unicorn-day-link}}) + (accounts/switch-chaos-mode chaos-mode?))))) (handlers/register-handler-fx :accounts.ui/notifications-enabled