Skip to content

Commit 2df1099

Browse files
committed
fix: ensure we retain the checked state when disabled
1 parent 00a3218 commit 2df1099

File tree

1 file changed

+8
-4
lines changed
  • src/status_im/contexts/profile/settings/screens/notifications

1 file changed

+8
-4
lines changed

src/status_im/contexts/profile/settings/screens/notifications/view.cljs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@
5858
:action :selector
5959
:action-props {:on-change (when-not disabled? on-change)
6060
:disabled? disabled?
61-
:checked? (and (not disabled?)
62-
non-contact-notifications-enabled?)}}))
61+
:checked? (if (ff/enabled? ::ff/settings.news-notifications)
62+
non-contact-notifications-enabled?
63+
(and (not disabled?)
64+
non-contact-notifications-enabled?))}}))
6365

6466
(defn chat-community-mentions-notifications-setting
6567
[{:keys [notifications-enabled?
@@ -77,8 +79,10 @@
7779
:action :selector
7880
:action-props {:on-change (when-not disabled? on-change)
7981
:disabled? disabled?
80-
:checked? (and (not disabled?)
81-
community-mentions-notifications-enabled?)}}))
82+
:checked? (if (ff/enabled? ::ff/settings.news-notifications)
83+
community-mentions-notifications-enabled?
84+
(and (not disabled?)
85+
community-mentions-notifications-enabled?))}}))
8286

8387
(defn messenger-notifications-setting
8488
[{:keys [notifications-enabled? messenger-notifications-enabled?]}]

0 commit comments

Comments
 (0)