From 6b11473ecc7d436e4335d2aab9fcf647e214fe79 Mon Sep 17 00:00:00 2001 From: codemaster115 Date: Tue, 30 Apr 2024 08:11:55 -0700 Subject: [PATCH 1/4] fix: notification center blur --- .../contexts/shell/activity_center/style.cljs | 2 +- .../contexts/shell/activity_center/view.cljs | 29 ++++++++++--------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/status_im/contexts/shell/activity_center/style.cljs b/src/status_im/contexts/shell/activity_center/style.cljs index b5be388c9fb..eba8ab11771 100644 --- a/src/status_im/contexts/shell/activity_center/style.cljs +++ b/src/status_im/contexts/shell/activity_center/style.cljs @@ -56,5 +56,5 @@ (def blur {:style {:position :absolute :top 0 :left 0 :right 0 :bottom 0} - :overlayColor colors/neutral-80-opa-80 + :overlayColor colors/neutral-80-opa-80-blur :blur-amount 20}) diff --git a/src/status_im/contexts/shell/activity_center/view.cljs b/src/status_im/contexts/shell/activity_center/view.cljs index f987de763f8..ca7d3f7ef6a 100644 --- a/src/status_im/contexts/shell/activity_center/view.cljs +++ b/src/status_im/contexts/shell/activity_center/view.cljs @@ -1,7 +1,7 @@ (ns status-im.contexts.shell.activity-center.view (:require [oops.core :as oops] - [react-native.blur :as blur] + [quo.core :as quo] [react-native.core :as rn] [react-native.navigation :as navigation] [status-im.contexts.shell.activity-center.header.view :as header] @@ -67,16 +67,17 @@ (fn [] (let [notifications (rf/sub [:activity-center/notifications]) customization-color (rf/sub [:profile/customization-color])] - [rn/view {:flex 1 :padding-top (navigation/status-bar-height)} - [blur/view style/blur] - [header/header] - [rn/flat-list - {:data notifications - :render-data {:active-swipeable active-swipeable - :customization-color customization-color} - :content-container-style {:flex-grow 1} - :empty-component [empty-tab/empty-tab] - :key-fn :id - :on-scroll-to-index-failed identity - :on-end-reached #(rf/dispatch [:activity-center.notifications/fetch-next-page]) - :render-fn notification-component}]])))) + [quo/overlay {:type :shell} + [rn/view {:flex 1 :padding-top (navigation/status-bar-height)} + [header/header] + [rn/flat-list + {:data notifications + :render-data {:active-swipeable active-swipeable + :customization-color customization-color} + :content-container-style {:flex-grow 1} + :empty-component [empty-tab/empty-tab] + :key-fn :id + :on-scroll-to-index-failed identity + :on-end-reached #(rf/dispatch [:activity-center.notifications/fetch-next-page]) + :render-fn notification-component}]] + ])))) From f276f59446069eccb2a26b0e66e4a9a4b53770b1 Mon Sep 17 00:00:00 2001 From: codemaster115 Date: Mon, 6 May 2024 06:31:42 -0700 Subject: [PATCH 2/4] fix: tag color --- .../notifications/activity_log/view.cljs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/quo/components/notifications/activity_log/view.cljs b/src/quo/components/notifications/activity_log/view.cljs index 9b4d3ef4a0a..10efc2ac29a 100644 --- a/src/quo/components/notifications/activity_log/view.cljs +++ b/src/quo/components/notifications/activity_log/view.cljs @@ -8,8 +8,10 @@ [quo.components.notifications.activity-log.style :as style] [quo.components.tags.status-tags :as status-tags] [quo.foundations.colors :as colors] + [quo.theme] [react-native.core :as rn] - [utils.i18n :as i18n])) + [utils.i18n :as i18n] + [utils.re-frame :as rf])) (defn- activity-reply-text-input [{:keys [on-update-reply max-reply-length valid-reply?]} reply-input set-reply-input] @@ -145,11 +147,13 @@ (defmethod footer-item-view :status [{:keys [label subtype blur?]} _ _] - [status-tags/status-tag - {:size :small - :label label - :status {:type subtype} - :blur? blur?}]) + (let [app-theme (rf/sub [:theme])] + [quo.theme/provider app-theme + [status-tags/status-tag + {:size :small + :label label + :status {:type subtype} + :blur? blur?}]])) (defn- footer [{:keys [replying? items] :as props}] From 7c90542cea47e2dafe59be51166deca9994adf85 Mon Sep 17 00:00:00 2001 From: codemaster115 Date: Mon, 6 May 2024 12:38:38 -0700 Subject: [PATCH 3/4] fix: lint --- .../notifications/activity_log/view.cljs | 18 ++++++------- .../notification/contact_requests/view.cljs | 26 +++++++++++-------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/quo/components/notifications/activity_log/view.cljs b/src/quo/components/notifications/activity_log/view.cljs index 10efc2ac29a..c2c6058d242 100644 --- a/src/quo/components/notifications/activity_log/view.cljs +++ b/src/quo/components/notifications/activity_log/view.cljs @@ -10,8 +10,7 @@ [quo.foundations.colors :as colors] [quo.theme] [react-native.core :as rn] - [utils.i18n :as i18n] - [utils.re-frame :as rf])) + [utils.i18n :as i18n])) (defn- activity-reply-text-input [{:keys [on-update-reply max-reply-length valid-reply?]} reply-input set-reply-input] @@ -146,14 +145,13 @@ label])) (defmethod footer-item-view :status - [{:keys [label subtype blur?]} _ _] - (let [app-theme (rf/sub [:theme])] - [quo.theme/provider app-theme - [status-tags/status-tag - {:size :small - :label label - :status {:type subtype} - :blur? blur?}]])) + [{:keys [label subtype blur? theme]} _ _] + [quo.theme/provider theme + [status-tags/status-tag + {:size :small + :label label + :status {:type subtype} + :blur? blur?}]]) (defn- footer [{:keys [replying? items] :as props}] diff --git a/src/status_im/contexts/shell/activity_center/notification/contact_requests/view.cljs b/src/status_im/contexts/shell/activity_center/notification/contact_requests/view.cljs index a05ab2318bc..72b84dbd7a3 100644 --- a/src/status_im/contexts/shell/activity_center/notification/contact_requests/view.cljs +++ b/src/status_im/contexts/shell/activity_center/notification/contact_requests/view.cljs @@ -58,7 +58,7 @@ child))) (defn- outgoing-contact-request-view - [{:keys [notification set-swipeable-height customization-color]}] + [{:keys [notification set-swipeable-height customization-color]} theme] (let [{:keys [chat-id message last-message accepted]} notification {:keys [contact-request-state] :as message} (or message last-message)] (if accepted @@ -89,19 +89,20 @@ :subtype :pending :key :status-pending :blur? true - :label (i18n/label :t/pending)}] + :label (i18n/label :t/pending) + :theme theme}] constants/contact-request-message-state-declined [{:type :status :subtype :pending :key :status-pending :blur? true - :label (i18n/label :t/pending)}] - + :label (i18n/label :t/pending) + :theme theme}] nil)}]))) (defn- incoming-contact-request-view - [{:keys [notification set-swipeable-height customization-color]}] + [{:keys [notification set-swipeable-height customization-color]} theme] (let [{:keys [id author message last-message]} notification message (or message last-message)] [quo/activity-log @@ -122,14 +123,16 @@ :subtype :positive :key :status-accepted :blur? true - :label (i18n/label :t/accepted)}] + :label (i18n/label :t/accepted) + :theme theme}] constants/contact-request-message-state-declined [{:type :status :subtype :negative :key :status-declined :blur? true - :label (i18n/label :t/declined)}] + :label (i18n/label :t/declined) + :theme theme}] constants/contact-request-message-state-pending [{:type :button @@ -151,18 +154,19 @@ [{:keys [notification] :as props}] (let [{:keys [author message last-message]} notification {:keys [public-key]} (rf/sub [:multiaccount/contact]) - {:keys [contact-request-state]} (or message last-message)] + {:keys [contact-request-state]} (or message last-message) + app-theme (rf/sub [:theme])] [swipeable props (cond (= public-key author) - [outgoing-contact-request-view props] + [outgoing-contact-request-view props app-theme] (= contact-request-state constants/contact-request-message-state-accepted) [gesture/touchable-without-feedback {:on-press (fn [] (rf/dispatch [:hide-popover]) (rf/dispatch [:chat.ui/start-chat author]))} - [incoming-contact-request-view props]] + [incoming-contact-request-view props app-theme]] :else - [incoming-contact-request-view props])])) + [incoming-contact-request-view props app-theme])])) From 9dd48da4873c044a2a9c8fbba0022af1523c7d46 Mon Sep 17 00:00:00 2001 From: codemaster115 Date: Tue, 7 May 2024 06:18:48 -0700 Subject: [PATCH 4/4] fix: lint --- src/legacy/status_im/ui/screens/profile/seed/views.cljs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/legacy/status_im/ui/screens/profile/seed/views.cljs b/src/legacy/status_im/ui/screens/profile/seed/views.cljs index 47f5978cbcb..5d96a691b19 100644 --- a/src/legacy/status_im/ui/screens/profile/seed/views.cljs +++ b/src/legacy/status_im/ui/screens/profile/seed/views.cljs @@ -13,11 +13,11 @@ [legacy.status-im.utils.utils :as utils] [re-frame.core :as re-frame] [react-native.core :as rn] + [react-native.platform :as platform] + [react-native.safe-area :as safe-area] [reagent.core :as reagent] [utils.i18n :as i18n] - [utils.re-frame :as rf] - [react-native.platform :as platform] - [react-native.safe-area :as safe-area])) + [utils.re-frame :as rf])) (def steps-numbers {:intro 1