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]}