fix(navigation)_: Incorrect status bar color (#20258)

This commit is contained in:
Icaro Motta 2024-05-30 12:18:39 -03:00 committed by GitHub
parent c03d91bcb0
commit cb4ce20c98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 5 deletions

View File

@ -224,7 +224,8 @@
;;;; Bottom sheet ;;;; Bottom sheet
(rf/reg-fx :show-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 (rf/reg-fx :hide-bottom-sheet
(fn [] (navigation/dissmiss-overlay "bottom-sheet"))) (fn [] (navigation/dissmiss-overlay "bottom-sheet")))

View File

@ -112,12 +112,16 @@
(rf/defn show-bottom-sheet (rf/defn show-bottom-sheet
{:events [:show-bottom-sheet]} {:events [:show-bottom-sheet]}
[{:keys [db] :as cofx} content] [{: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 (rf/merge cofx
{:db (update-in db [:bottom-sheet :sheets] #(conj % content)) {:db (update-in db [:bottom-sheet :sheets] conj content)
:dismiss-keyboard nil} :dismiss-keyboard nil}
#(when-not hide? (fn [new-cofx]
(if (seq sheets) (hide-bottom-sheet %) {:show-bottom-sheet nil}))))) (when-not hide?
(if (seq sheets)
(hide-bottom-sheet new-cofx)
{:show-bottom-sheet {:theme theme}}))))))
(rf/defn dismiss-all-overlays (rf/defn dismiss-all-overlays
{:events [:dismiss-all-overlays]} {:events [:dismiss-all-overlays]}