From bb600d722efdfa9df1e49a1c17781c598e32ac1a Mon Sep 17 00:00:00 2001 From: Sean Hagstrom Date: Thu, 21 Nov 2024 10:14:38 -0800 Subject: [PATCH] fix: pass memoized on-scroll function to bottom-sheet screens --- src/status_im/common/bottom_sheet_screen/view.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/status_im/common/bottom_sheet_screen/view.cljs b/src/status_im/common/bottom_sheet_screen/view.cljs index bef2baebe9..37be8171e5 100644 --- a/src/status_im/common/bottom_sheet_screen/view.cljs +++ b/src/status_im/common/bottom_sheet_screen/view.cljs @@ -47,7 +47,8 @@ animating? (reagent/atom true) set-animating-true #(reset! animating? true) set-animating-false (fn [ms] - (js/setTimeout #(reset! animating? false) ms))] + (js/setTimeout #(reset! animating? false) ms)) + on-scroll-update #(on-scroll % curr-scroll)] (fn [{:keys [content skip-background?]}] (let [theme (quo.theme/use-theme) {:keys [top] :as insets} (safe-area/get-insets) @@ -94,5 +95,5 @@ :close close :scroll-enabled? scroll-enabled? :current-scroll curr-scroll - :on-scroll #(on-scroll % curr-scroll) + :on-scroll on-scroll-update :sheet-animating? animating?}]]]]))))