|
8 | 8 | [status-im.config :as config] |
9 | 9 | [status-im.contexts.shell.bottom-tabs.style :as style] |
10 | 10 | [status-im.contexts.shell.constants :as shell.constants] |
| 11 | + [status-im.feature-flags :as ff] |
11 | 12 | [utils.re-frame :as rf])) |
12 | 13 |
|
13 | 14 | (defn bottom-tab |
14 | | - [icon stack-id shared-values notifications-data] |
15 | | - (let [customization-color (rf/sub [:profile/customization-color]) |
| 15 | + [icon stack-id shared-values] |
| 16 | + (let [notifications-data (rf/sub [:shell/bottom-tabs-notifications-data]) |
| 17 | + customization-color (rf/sub [:profile/customization-color]) |
16 | 18 | on-press (rn/use-callback #(rf/dispatch [:shell/change-tab stack-id])) |
17 | 19 | icon-color (->> stack-id |
18 | 20 | (get shell.constants/tabs-icon-color-keywords) |
|
29 | 31 |
|
30 | 32 | (defn view |
31 | 33 | [shared-values] |
32 | | - (let [notifications-data (rf/sub [:shell/bottom-tabs-notifications-data]) |
33 | | - communities-double-tab-gesture (-> (gesture/gesture-tap) |
| 34 | + (let [communities-double-tab-gesture (-> (gesture/gesture-tap) |
34 | 35 | (gesture/number-of-taps 2) |
35 | 36 | (gesture/on-start |
36 | 37 | (fn [_event] |
|
44 | 45 | [reanimated/view |
45 | 46 | {:style (style/bottom-tabs-container (:bottom-tabs-height shared-values))} |
46 | 47 | [rn/view {:style (style/bottom-tabs)} |
47 | | - [bottom-tab :i/wallet :screen/wallet-stack shared-values notifications-data] |
| 48 | + [bottom-tab :i/wallet :screen/wallet-stack shared-values] |
| 49 | + (when (ff/enabled? ::ff/market) |
| 50 | + [bottom-tab :i/swap :screen/market-stack shared-values]) |
48 | 51 | [gesture/gesture-detector {:gesture messages-double-tap-gesture} |
49 | | - [bottom-tab :i/messages :screen/chats-stack shared-values notifications-data]] |
| 52 | + [bottom-tab :i/messages :screen/chats-stack shared-values]] |
50 | 53 | [gesture/gesture-detector {:gesture communities-double-tab-gesture} |
51 | | - [bottom-tab :i/communities :screen/communities-stack shared-values notifications-data]] |
| 54 | + [bottom-tab :i/communities :screen/communities-stack shared-values]] |
52 | 55 | (when config/show-not-implemented-features? |
53 | | - [bottom-tab :i/browser :screen/browser-stack shared-values notifications-data])]]])) |
| 56 | + [bottom-tab :i/browser :screen/browser-stack shared-values])]]])) |
0 commit comments