diff --git a/src/status_im/ui/components/topnav.cljs b/src/status_im/ui/components/topnav.cljs index c1e6f69c1d..c8d6f051fc 100644 --- a/src/status_im/ui/components/topnav.cljs +++ b/src/status_im/ui/components/topnav.cljs @@ -41,6 +41,7 @@ (re-frame/dispatch [:mark-all-activity-center-notifications-as-read]) (if config/new-activity-center-enabled? (re-frame/dispatch [:show-popover {:view :activity-center + :style {:margin 0} :disable-touchable-overlay? true :blur-view? true :blur-view-props {:blur-amount 20 diff --git a/src/status_im/ui/screens/activity_center/views.cljs b/src/status_im/ui/screens/activity_center/views.cljs index 8ddeacb31a..5325ce3f9f 100644 --- a/src/status_im/ui/screens/activity_center/views.cljs +++ b/src/status_im/ui/screens/activity_center/views.cljs @@ -1,5 +1,6 @@ (ns status-im.ui.screens.activity-center.views (:require [quo.components.animated.pressable :as animation] + [quo.react :as react] [quo.react-native :as rn] [quo2.components.buttons.button :as button] [quo2.components.markdown.text :as text] @@ -7,7 +8,6 @@ [quo2.components.tabs.tabs :as tabs] [quo2.components.tags.context-tags :as context-tags] [quo2.foundations.colors :as colors] - [reagent.core :as reagent] [status-im.constants :as constants] [status-im.i18n.i18n :as i18n] [status-im.multiaccounts.core :as multiaccounts] @@ -197,7 +197,7 @@ :type :blur-bg :size 32 :override-theme :dark - :style {:margin-vertical 12 + :style {:margin-bottom 12 :margin-left screen-padding} :on-press #(>evt [:hide-popover])} :main-icons2/close] @@ -219,19 +219,20 @@ (defn activity-center [] - (reagent/create-class - {:component-did-mount #(>evt [:activity-center.notifications/fetch-first-page]) - :reagent-render - (fn [] - (let [notifications (evt [:activity-center.notifications/fetch-next-page]) - :render-fn render-notification}]]]))})) + [:f> + (fn [] + (let [notifications (evt [:activity-center.notifications/fetch-first-page])) + [rn/view {:style {:flex 1 + :width window-width + :padding-top (if (pos? top) (+ top 12) 12) + :padding-bottom bottom}} + [header] + [rn/flat-list {:content-container-style {:flex-grow 1} + :data notifications + :empty-component [empty-tab] + :key-fn :id + :on-end-reached #(>evt [:activity-center.notifications/fetch-next-page]) + :render-fn render-notification}]]))]) \ No newline at end of file diff --git a/src/status_im/ui/screens/home/views.cljs b/src/status_im/ui/screens/home/views.cljs index c864c13fbc..359d13f7c9 100644 --- a/src/status_im/ui/screens/home/views.cljs +++ b/src/status_im/ui/screens/home/views.cljs @@ -258,6 +258,7 @@ (re-frame/dispatch [:mark-all-activity-center-notifications-as-read]) (if config/new-activity-center-enabled? (re-frame/dispatch [:show-popover {:view :activity-center + :style {:margin 0} :disable-touchable-overlay? true :blur-view? true :blur-view-props {:blur-amount 20 diff --git a/src/status_im/ui2/screens/chat/home.cljs b/src/status_im/ui2/screens/chat/home.cljs index 1d542f019f..0e657ae6a7 100644 --- a/src/status_im/ui2/screens/chat/home.cljs +++ b/src/status_im/ui2/screens/chat/home.cljs @@ -338,7 +338,12 @@ :on-press #(do (re-frame/dispatch [:mark-all-activity-center-notifications-as-read]) (if config/new-activity-center-enabled? - (re-frame/dispatch [:navigate-to :activity-center]) + (re-frame/dispatch [:show-popover {:view :activity-center + :style {:margin 0} + :disable-touchable-overlay? true + :blur-view? true + :blur-view-props {:blur-amount 20 + :blur-type :dark}}]) (re-frame/dispatch [:navigate-to :notifications-center])))} [icons/icon :main-icons/notification2 {:color (colors/theme-colors colors/neutral-100 colors/white)}]] (when (pos? notif-count)