Fix: Communities home header flickering when user scrolls (#15060)
This commit is contained in:
parent
c12cab27f4
commit
a5571eae92
|
@ -74,7 +74,7 @@
|
||||||
:style {:line-height 21}}
|
:style {:line-height 21}}
|
||||||
name]])
|
name]])
|
||||||
(if top-nav
|
(if top-nav
|
||||||
[top-nav]
|
top-nav
|
||||||
[quo/page-nav
|
[quo/page-nav
|
||||||
(merge {:horizontal-description? true
|
(merge {:horizontal-description? true
|
||||||
:one-icon-align-left? true
|
:one-icon-align-left? true
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
:icon-background-color (icon-color)
|
:icon-background-color (icon-color)
|
||||||
:on-press #(rf/dispatch [:navigate-back])}}))])
|
:on-press #(rf/dispatch [:navigate-back])}}))])
|
||||||
(when title-colum
|
(when title-colum
|
||||||
[title-colum])
|
title-colum)
|
||||||
sticky-header]]))
|
sticky-header]]))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -77,18 +77,30 @@
|
||||||
|
|
||||||
(defn home-page-comunity-lists
|
(defn home-page-comunity-lists
|
||||||
[{:keys [selected-tab padding-top]}]
|
[{:keys [selected-tab padding-top]}]
|
||||||
(fn []
|
[rn/view {:style {:flex 1}}
|
||||||
[rn/view {:style {:flex 1}}
|
[communities-header selected-tab padding-top]
|
||||||
[communities-header selected-tab padding-top]
|
[render-communities-segments selected-tab]])
|
||||||
[render-communities-segments selected-tab]]))
|
|
||||||
|
|
||||||
(defn home-sticky-header
|
(defn home-sticky-header
|
||||||
[{:keys [selected-tab scroll-height padding-top]}]
|
[{:keys [selected-tab scroll-height padding-top]}]
|
||||||
(fn []
|
(when (> @scroll-height 80)
|
||||||
(when (> @scroll-height 80)
|
[rn/view
|
||||||
[rn/view
|
{:style style/blur-tabs-header}
|
||||||
{:style style/blur-tabs-header}
|
[community-segments selected-tab padding-top]]))
|
||||||
[community-segments selected-tab padding-top]])))
|
|
||||||
|
(defn home-nav
|
||||||
|
[]
|
||||||
|
[common.home/top-nav
|
||||||
|
{:type :default
|
||||||
|
:hide-search true
|
||||||
|
:style {:background-color :transparent}}])
|
||||||
|
|
||||||
|
(defn title-column
|
||||||
|
[]
|
||||||
|
[common.home/title-column
|
||||||
|
{:label (i18n/label :t/communities)
|
||||||
|
:handler #(rf/dispatch [:bottom-sheet/show-sheet :add-new {}])
|
||||||
|
:accessibility-label :new-chat-button}])
|
||||||
|
|
||||||
(defn communities-screen-content
|
(defn communities-screen-content
|
||||||
[]
|
[]
|
||||||
|
@ -98,16 +110,8 @@
|
||||||
[scroll-page/scroll-page
|
[scroll-page/scroll-page
|
||||||
{:name (i18n/label :t/communities)
|
{:name (i18n/label :t/communities)
|
||||||
:on-scroll #(reset! scroll-height %)
|
:on-scroll #(reset! scroll-height %)
|
||||||
:top-nav (fn []
|
:top-nav [home-nav]
|
||||||
[common.home/top-nav
|
:title-colum [title-column]
|
||||||
{:type :default
|
|
||||||
:hide-search true
|
|
||||||
:style {:background-color :transparent}}])
|
|
||||||
:title-colum (fn []
|
|
||||||
[common.home/title-column
|
|
||||||
{:label (i18n/label :t/communities)
|
|
||||||
:handler #(rf/dispatch [:bottom-sheet/show-sheet :add-new {}])
|
|
||||||
:accessibility-label :new-chat-button}])
|
|
||||||
:background-color (colors/theme-colors
|
:background-color (colors/theme-colors
|
||||||
colors/white
|
colors/white
|
||||||
colors/neutral-95)
|
colors/neutral-95)
|
||||||
|
|
Loading…
Reference in New Issue