From cb4ce20c98f60123d6a1068a764b2e6dd83d163b Mon Sep 17 00:00:00 2001 From: Icaro Motta Date: Thu, 30 May 2024 12:18:39 -0300 Subject: [PATCH] fix(navigation)_: Incorrect status bar color (#20258) --- src/status_im/navigation/effects.cljs | 3 ++- src/status_im/navigation/events.cljs | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/status_im/navigation/effects.cljs b/src/status_im/navigation/effects.cljs index 6abdc5fac3..6acb2d4315 100644 --- a/src/status_im/navigation/effects.cljs +++ b/src/status_im/navigation/effects.cljs @@ -224,7 +224,8 @@ ;;;; Bottom sheet (rf/reg-fx :show-bottom-sheet - (fn [] (show-overlay "bottom-sheet"))) + (fn [options] + (show-overlay "bottom-sheet" options))) (rf/reg-fx :hide-bottom-sheet (fn [] (navigation/dissmiss-overlay "bottom-sheet"))) diff --git a/src/status_im/navigation/events.cljs b/src/status_im/navigation/events.cljs index 16c688ff01..b50886df73 100644 --- a/src/status_im/navigation/events.cljs +++ b/src/status_im/navigation/events.cljs @@ -112,12 +112,16 @@ (rf/defn show-bottom-sheet {:events [:show-bottom-sheet]} [{:keys [db] :as cofx} content] - (let [{:keys [sheets hide?]} (:bottom-sheet db)] + (let [theme (or (:theme content) (:theme db)) + {:keys [sheets hide?]} (:bottom-sheet db)] (rf/merge cofx - {:db (update-in db [:bottom-sheet :sheets] #(conj % content)) + {:db (update-in db [:bottom-sheet :sheets] conj content) :dismiss-keyboard nil} - #(when-not hide? - (if (seq sheets) (hide-bottom-sheet %) {:show-bottom-sheet nil}))))) + (fn [new-cofx] + (when-not hide? + (if (seq sheets) + (hide-bottom-sheet new-cofx) + {:show-bottom-sheet {:theme theme}})))))) (rf/defn dismiss-all-overlays {:events [:dismiss-all-overlays]}