Fix for two separate sections with different colors shown on the chat screen (dark mode) (#16265)

* Fix for two separate sections with different colors shown on the chat screen (dark mode)

* lint-fix
This commit is contained in:
Alexander 2023-06-16 15:48:52 +02:00 committed by GitHub
parent 563a266803
commit 68b9ea47a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 7 deletions

View File

@ -20,7 +20,7 @@
(defn header-container
[show?]
{:display (if show? :flex :none)
:background-color (colors/theme-colors colors/white colors/neutral-95)
:background-color (colors/theme-colors colors/white colors/neutral-100)
:top (- overscroll-cover-height)
:margin-bottom (- overscroll-cover-height)})
@ -28,7 +28,8 @@
[cover-bg-color]
{:flex 1
:height (+ overscroll-cover-height cover-height)
:background-color cover-bg-color})
:background-color (colors/theme-colors (:light cover-bg-color)
(:dark cover-bg-color))})
(defn header-bottom-part
[animation]
@ -38,7 +39,7 @@
{:top -16
:margin-bottom -16
:padding-bottom 24
:background-color (colors/theme-colors colors/white colors/neutral-100)}))
:background-color (colors/theme-colors colors/white colors/neutral-95)}))
(def header-avatar
{:top header-avatar-top-offset

View File

@ -195,8 +195,7 @@
[rn/view
{:style (style/header-container all-loaded?)
:on-layout on-layout}
(when cover-bg-color
[rn/view {:style (style/header-cover cover-bg-color)}])
[rn/view {:style (style/header-cover cover-bg-color)}]
[reanimated/view {:style (style/header-bottom-part border-animation)}
[rn/view {:style style/header-avatar}
[rn/view {:style {:align-items :flex-start}}
@ -306,7 +305,8 @@
(on-scroll event)))
:style (add-inverted-y-android
{:background-color (if all-loaded?
cover-bg-color
(colors/theme-colors (:light cover-bg-color)
(:dark cover-bg-color))
(colors/theme-colors
colors/white
colors/neutral-95))})

View File

@ -23,7 +23,8 @@
able-to-send-message?]
:as chat} (rf/sub [:chats/current-chat-chat-view])]
[messages.list/messages-list
{:cover-bg-color (colors/custom-color :turquoise 50 20)
{:cover-bg-color {:light (colors/custom-color :turquoise 50 20)
:dark (colors/custom-color :turquoise 50 40)}
:chat chat
:header-comp (fn [{:keys [scroll-y shared-all-loaded?]}]
[messages.navigation/navigation-view