Remove Identity Verification tab in Activity Center (#19667)
* tweak: hide the identity verification tab inside the activity center * tweak: hide not-implemented features by default in dev * fix: remove nil tabs from when rendering quo tabs
This commit is contained in:
parent
2e2104d4d1
commit
ca53bf7388
2
.env
2
.env
|
@ -35,4 +35,4 @@ LOCAL_PAIRING_ENABLED=1
|
|||
TEST_STATEOFUS=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
TEST_NETWORKS_ENABLED=1
|
||||
SHOW_NOT_IMPLEMENTED_FEATURES=1
|
||||
SHOW_NOT_IMPLEMENTED_FEATURES=0
|
||||
|
|
|
@ -116,6 +116,8 @@
|
|||
set-active-tab-id] (rn/use-state default-active)
|
||||
[fading set-fading] (rn/use-state fade-end-percentage)
|
||||
flat-list-ref (rn/use-ref-atom nil)
|
||||
tabs-data (rn/use-memo (fn [] (filterv some? data))
|
||||
[data])
|
||||
clean-props (dissoc props
|
||||
:default-active
|
||||
:fade-end-percentage
|
||||
|
@ -142,8 +144,8 @@
|
|||
:index
|
||||
(utils.collection/first-index
|
||||
#(= active-tab-id (:id %))
|
||||
data)}))))
|
||||
[active-tab-id data])
|
||||
tabs-data)}))))
|
||||
[active-tab-id tabs-data])
|
||||
on-tab-press (rn/use-callback (fn [id index]
|
||||
(set-active-tab-id id)
|
||||
(when (and scroll-on-press? @flat-list-ref)
|
||||
|
@ -175,7 +177,7 @@
|
|||
:horizontal true
|
||||
:scroll-event-throttle 64
|
||||
:shows-horizontal-scroll-indicator false
|
||||
:data data
|
||||
:data tabs-data
|
||||
:key-fn (comp str :id)
|
||||
:on-scroll-to-index-failed identity
|
||||
:on-scroll on-scroll
|
||||
|
@ -184,7 +186,7 @@
|
|||
:render-data {:active-tab-id active-tab-id
|
||||
:blur? blur?
|
||||
:customization-color customization-color
|
||||
:number-of-items (count data)
|
||||
:number-of-items (count tabs-data)
|
||||
:size size
|
||||
:on-press on-tab-press
|
||||
:style style}})]]]
|
||||
|
@ -195,8 +197,8 @@
|
|||
{:active-tab-id active-tab-id
|
||||
:blur? blur?
|
||||
:customization-color customization-color
|
||||
:number-of-items (count data)
|
||||
:number-of-items (count tabs-data)
|
||||
:size size
|
||||
:on-press on-tab-press
|
||||
:style style}])
|
||||
data)])))
|
||||
tabs-data)])))
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
(:require
|
||||
[clojure.set :as set]
|
||||
[quo.core :as quo]
|
||||
[status-im.config :as config]
|
||||
[status-im.contexts.shell.activity-center.notification-types :as types]
|
||||
[status-im.contexts.shell.activity-center.style :as style]
|
||||
[utils.i18n :as i18n]
|
||||
|
@ -48,12 +49,13 @@
|
|||
:accessibility-label :tab-contact-request
|
||||
:notification-dot? (when-not is-mark-all-as-read-undoable?
|
||||
(contains? types-with-unread types/contact-request))}
|
||||
{:id types/contact-verification
|
||||
:label (i18n/label :t/identity-verification)
|
||||
:accessibility-label :tab-contact-verification
|
||||
:notification-dot? (when-not is-mark-all-as-read-undoable?
|
||||
(contains? types-with-unread
|
||||
types/contact-verification))}
|
||||
(when config/show-not-implemented-features?
|
||||
{:id types/contact-verification
|
||||
:label (i18n/label :t/identity-verification)
|
||||
:accessibility-label :tab-contact-verification
|
||||
:notification-dot? (when-not is-mark-all-as-read-undoable?
|
||||
(contains? types-with-unread
|
||||
types/contact-verification))})
|
||||
{:id types/tx
|
||||
:label (i18n/label :t/transactions)
|
||||
:accessibility-label :tab-tx
|
||||
|
|
Loading…
Reference in New Issue