fix alert banner flicker in ios (#19495)

This commit is contained in:
Parvesh Monu 2024-04-10 21:16:33 +05:30 committed by GitHub
parent 8b417524fa
commit 074a2b292d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 17 additions and 15 deletions

View File

@ -46,23 +46,25 @@
safe-area-top (safe-area/get-top) safe-area-top (safe-area/get-top)
colors-map (get-colors-map theme)] colors-map (get-colors-map theme)]
[hole-view/hole-view [hole-view/hole-view
{:style {:background-color colors/neutral-100} ;; required for fix flicker issue https://github.com/status-im/status-mobile/issues/19490
{:style {:padding-bottom 1}
:holes [{:x 0 :holes [{:x 0
:y (+ safe-area-top (* constants/alert-banner-height banners-count)) :y (+ safe-area-top (* constants/alert-banner-height banners-count))
:width (:width (rn/get-window)) :width (:width (rn/get-window))
:height constants/alert-banner-height :height constants/alert-banner-height
:borderRadius style/border-radius}]} :borderRadius style/border-radius}]}
[rn/view [rn/view {:style {:background-color colors/neutral-100}}
{:style {:height safe-area-top [rn/view
:background-color (get-in colors-map {:style {:height safe-area-top
[(if error-banner :error :alert) :background-color])}}] :background-color (get-in colors-map
(when error-banner [(if error-banner :error :alert) :background-color])}}]
[banner (when error-banner
(assoc error-banner [banner
:colors-map colors-map (assoc error-banner
:second-banner? false)]) :colors-map colors-map
(when alert-banner :second-banner? false)])
[banner (when alert-banner
(assoc alert-banner [banner
:colors-map colors-map (assoc alert-banner
:second-banner? (= 2 banners-count))])])) :colors-map colors-map
:second-banner? (= 2 banners-count))])]]))