Skip to content

Commit

Permalink
fix: move feature-flag usage to settings screen instead of settings i…
Browse files Browse the repository at this point in the history
…tems definition
  • Loading branch information
seanstrom committed May 8, 2024
1 parent ba6e46c commit 945d5d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/status_im/contexts/profile/settings/list_items.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
:image :icon
:blur? true
:action :arrow}
(when (ff/enabled? ::ff/wallet.wallet-settings)
{:title (i18n/label :t/wallet)
:on-press #(rf/dispatch [:open-modal :screen/settings.wallet])
:image-props :i/wallet
:image :icon
:blur? true
:action :arrow})
{:title (i18n/label :t/wallet)
:on-press #(rf/dispatch [:open-modal :screen/settings.wallet])
:image-props :i/wallet
:image :icon
:blur? true
:action :arrow
:feature-flag ::ff/wallet.wallet-settings}
(when config/show-not-implemented-features?
{:title (i18n/label :t/dapps)
:on-press not-implemented/alert
Expand Down
8 changes: 7 additions & 1 deletion src/status_im/contexts/profile/settings/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@
[status-im.contexts.profile.settings.list-items :as settings.items]
[status-im.contexts.profile.settings.style :as style]
[status-im.contexts.profile.utils :as profile.utils]
[status-im.feature-flags :as ff]
[utils.debounce :as debounce]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))

(defn show-settings-item?
[{:keys [feature-flag]}]
(or (ff/enabled? feature-flag)
(nil? feature-flag)))

(defn- settings-item-view
[data]
[rf/delay-render
[quo/category
{:list-type :settings
:container-style {:padding-bottom 12}
:blur? true
:data data}]])
:data (filterv show-settings-item? data)}]])

(defn scroll-handler
[event scroll-y]
Expand Down

0 comments on commit 945d5d8

Please sign in to comment.