[Fix] Activity Centre UI bug (#14398)
* [Fix] Activity Centre UI bug * [Fix] Namespace update for config * [Chore] Moved navigation to Activity Center as reframe event * [Chore] Code Format
This commit is contained in:
parent
3777ebc36e
commit
84da3128bf
|
@ -6,6 +6,18 @@
|
|||
[status-im.utils.fx :as fx]
|
||||
[taoensso.timbre :as log]))
|
||||
|
||||
;;;; Navigation
|
||||
|
||||
(fx/defn open-activity-center
|
||||
{:events [:activity-center/open]}
|
||||
[_]
|
||||
(rf/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}}]))
|
||||
|
||||
;;;; Misc
|
||||
|
||||
(fx/defn process-notification-failure
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
[window-width top bottom]
|
||||
{:flex 1
|
||||
:width window-width
|
||||
:padding-top (if (pos? 0) (+ top 12) 12)
|
||||
:padding-top (if (pos? top) (+ top 12) 12)
|
||||
:padding-bottom bottom})
|
||||
|
||||
(def notifications-container
|
||||
|
|
|
@ -259,12 +259,7 @@
|
|||
:on-press #(do
|
||||
(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
|
||||
:blur-type :dark}}])
|
||||
(re-frame/dispatch [:activity-center/open])
|
||||
(re-frame/dispatch [:navigate-to :notifications-center])))}
|
||||
[icons/icon :main-icons/notification2 {:color (quo2.colors/theme-colors quo2.colors/neutral-100 quo2.colors/white)}]]
|
||||
(when (pos? notif-count)
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
[status-im.ui.components.topbar :as topbar]
|
||||
[status-im.ui.components.invite.views :as invite]
|
||||
[status-im.utils.handlers :refer [<sub >evt]]
|
||||
[status-im.utils.config :as config]
|
||||
[quo2.components.markdown.text :as quo2.text]
|
||||
[status-im.qr-scanner.core :as qr-scanner]
|
||||
[status-im.ui.components.chat-icon.styles :as chat-icon.styles]
|
||||
|
@ -37,7 +36,8 @@
|
|||
[status-im.ui2.screens.chat.components.message-home-item.view :refer [messages-home-item]]
|
||||
[status-im.ui2.screens.chat.components.contact-item.view :refer [contact-item]]
|
||||
[clojure.string :as str]
|
||||
[status-im2.common.plus-button.view :as components.plus-button])
|
||||
[status-im2.common.plus-button.view :as components.plus-button]
|
||||
[status-im2.setup.config :as config])
|
||||
(:require-macros [status-im.utils.views :as views]))
|
||||
|
||||
(defn home-tooltip-view []
|
||||
|
@ -314,7 +314,7 @@
|
|||
: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 [:activity-center/open])
|
||||
(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)
|
||||
|
|
|
@ -9,10 +9,17 @@
|
|||
[quo2.foundations.colors :as colors]
|
||||
[quo2.components.community.discover-card :as discover-card]
|
||||
[quo2.components.navigation.top-nav :as topnav]
|
||||
[status-im2.setup.config :as config]
|
||||
[status-im2.common.plus-button.view :as components.plus-button]
|
||||
[status-im2.contexts.communities.home.actions.view :as home.actions]
|
||||
[status-im2.contexts.communities.home.style :as style]))
|
||||
|
||||
(defn navigate-to-activity-center []
|
||||
(rf/dispatch [:mark-all-activity-center-notifications-as-read])
|
||||
(if config/new-activity-center-enabled?
|
||||
(rf/dispatch [:activity-center/open])
|
||||
(rf/dispatch [:navigate-to :notifications-center])))
|
||||
|
||||
(defn plus-button []
|
||||
[components.plus-button/plus-button
|
||||
{:on-press #(re-frame/dispatch [:bottom-sheet/show-sheet :add-new {}])
|
||||
|
@ -88,7 +95,8 @@
|
|||
:background-color (colors/theme-colors
|
||||
colors/neutral-5
|
||||
colors/neutral-95)}}
|
||||
[topnav/top-nav {:type :default}]
|
||||
[topnav/top-nav {:type :default
|
||||
:open-activity-center navigate-to-activity-center}]
|
||||
[title-column]
|
||||
[discover-card/discover-card {:on-press #(rf/dispatch [:navigate-to :discover-communities])
|
||||
:title (i18n/label :t/discover)
|
||||
|
|
Loading…
Reference in New Issue