Set chaos mode every time, dont show the popup everytime
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
parent
581d27756e
commit
3eb570f082
|
@ -180,17 +180,17 @@
|
||||||
:accounts.ui/chaos-mode-switched
|
:accounts.ui/chaos-mode-switched
|
||||||
(fn [{:keys [db] :as cofx} [_ chaos-mode?]]
|
(fn [{:keys [db] :as cofx} [_ chaos-mode?]]
|
||||||
(let [old-chaos-mode? (get-in db [:account/account :settings :chaos-mode?])]
|
(let [old-chaos-mode? (get-in db [:account/account :settings :chaos-mode?])]
|
||||||
(when (not= old-chaos-mode? chaos-mode?)
|
(fx/merge
|
||||||
(fx/merge
|
cofx
|
||||||
cofx
|
(when (and chaos-mode?
|
||||||
(when chaos-mode?
|
(not= old-chaos-mode? chaos-mode?))
|
||||||
{:ui/show-confirmation
|
{:ui/show-confirmation
|
||||||
{:title (i18n/label :t/chaos-unicorn-day)
|
{:title (i18n/label :t/chaos-unicorn-day)
|
||||||
:content (i18n/label :t/chaos-unicorn-day-details)
|
:content (i18n/label :t/chaos-unicorn-day-details)
|
||||||
:confirm-button-text (i18n/label :t/see-details)
|
:confirm-button-text (i18n/label :t/see-details)
|
||||||
:cancel-button-text (i18n/label :t/cancel)
|
:cancel-button-text (i18n/label :t/cancel)
|
||||||
:on-accept open-chaos-unicorn-day-link}})
|
:on-accept open-chaos-unicorn-day-link}})
|
||||||
(accounts/switch-chaos-mode chaos-mode?))))))
|
(accounts/switch-chaos-mode chaos-mode?)))))
|
||||||
|
|
||||||
(handlers/register-handler-fx
|
(handlers/register-handler-fx
|
||||||
:accounts.ui/notifications-enabled
|
:accounts.ui/notifications-enabled
|
||||||
|
|
Loading…
Reference in New Issue