Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alwx committed Jul 25, 2023
1 parent 0c7d817 commit a359340
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
9 changes: 5 additions & 4 deletions src/status_im2/contexts/chat/messages/navigation/style.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,24 @@
:background-color (colors/theme-colors colors/white-opa-40 colors/neutral-80-opa-40)}
position))

(defn background-view []
(defn background-view
[theme]
{:position :absolute
:top 0
:left 0
:right 0
:height navigation-bar-height
:background-color (colors/theme-colors colors/white-opa-70 colors/neutral-100-opa-70)
:background-color (colors/theme-colors colors/white-opa-70 colors/neutral-100-opa-70 theme)
:display :flex
:flex-direction :row
:overflow :hidden})

(defn animated-background-view
[enabled? animation]
[enabled? animation theme]
(reanimated/apply-animations-to-style
(when enabled?
{:opacity animation})
(background-view)))
(background-view theme)))

(def blur-view
{:position :absolute
Expand Down
11 changes: 9 additions & 2 deletions src/status_im2/contexts/chat/messages/navigation/view.cljs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(ns status-im2.contexts.chat.messages.navigation.view
(:require [quo2.core :as quo]
[quo2.foundations.colors :as colors]
[quo2.theme :as theme]
[re-frame.db]
[react-native.blur :as blur]
[react-native.core :as rn]
Expand All @@ -14,7 +15,7 @@
[utils.i18n :as i18n]
[status-im2.common.home.actions.view :as actions]))

(defn f-navigation-view
(defn f-view
[{:keys [scroll-y]}]
(let [{:keys [group-chat chat-id chat-name emoji
chat-type]
Expand Down Expand Up @@ -55,7 +56,7 @@
:extrapolateRight "clamp"})]
[rn/view {:style style/navigation-view}
[reanimated/view
{:style (style/animated-background-view all-loaded? opacity-animation)}]
{:style (style/animated-background-view all-loaded? opacity-animation nil)}]

[reanimated/view {:style (style/animated-blur-view all-loaded? opacity-animation)}
[blur/view
Expand Down Expand Up @@ -114,3 +115,9 @@
:opacity-animation banner-opacity-animation
:all-loaded? all-loaded?
:top-offset style/navigation-bar-height}]]))

(defn- internal-navigation-view
[params]
[:f> f-view params])

(def navigation-view (theme/with-theme internal-navigation-view))
4 changes: 1 addition & 3 deletions src/status_im2/contexts/chat/messages/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
{:cover-bg-color :turquoise
:chat chat
:header-comp (fn [{:keys [scroll-y]}]
[:f>
messages.navigation/f-navigation-view
{:scroll-y scroll-y}])
[messages.navigation/navigation-view {:scroll-y scroll-y}])
:footer-comp (fn [{:keys [insets]}]
(if-not able-to-send-message?
[contact-requests.bottom-drawer/view chat-id contact-request-state
Expand Down

0 comments on commit a359340

Please sign in to comment.