From eff8c1f1e3d6787141fe41a6c43b62ce2108aa00 Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Wed, 3 Apr 2024 16:53:32 +0530 Subject: [PATCH] fix alert banner flicker in ios --- src/status_im/common/alert_banner/view.cljs | 32 +++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/status_im/common/alert_banner/view.cljs b/src/status_im/common/alert_banner/view.cljs index 7363b400f16..3cd4e341a34 100644 --- a/src/status_im/common/alert_banner/view.cljs +++ b/src/status_im/common/alert_banner/view.cljs @@ -46,23 +46,25 @@ safe-area-top (safe-area/get-top) colors-map (get-colors-map theme)] [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 :y (+ safe-area-top (* constants/alert-banner-height banners-count)) :width (:width (rn/get-window)) :height constants/alert-banner-height :borderRadius style/border-radius}]} - [rn/view - {:style {:height safe-area-top - :background-color (get-in colors-map - [(if error-banner :error :alert) :background-color])}}] - (when error-banner - [banner - (assoc error-banner - :colors-map colors-map - :second-banner? false)]) - (when alert-banner - [banner - (assoc alert-banner - :colors-map colors-map - :second-banner? (= 2 banners-count))])])) + [rn/view {:style {:background-color colors/neutral-100}} + [rn/view + {:style {:height safe-area-top + :background-color (get-in colors-map + [(if error-banner :error :alert) :background-color])}}] + (when error-banner + [banner + (assoc error-banner + :colors-map colors-map + :second-banner? false)]) + (when alert-banner + [banner + (assoc alert-banner + :colors-map colors-map + :second-banner? (= 2 banners-count))])]]))