Skip to content

Commit

Permalink
chore:fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Son89 committed Jun 16, 2023
1 parent c4fc9af commit b3c881e
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions src/status_im2/navigation/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@
(when top?
{:padding-top (safe-area/get-top)})))

(defn screen-wrapper
[{:keys [insets background-color component sheet? screen-theme]}]
(let [user-theme (quo2.theme/get-theme)]
[quo2.theme/provider {:theme (or screen-theme user-theme)}
[rn/view {:style (wrapped-screen-style insets background-color)}
[inactive]
(if sheet?
[:f> bottom-sheet-screen/f-view component]
[component])]
(when js/goog.DEBUG
[reloader/reload-view])]))

(defn screen
[key]
(reagent.core/reactify-component
Expand All @@ -59,18 +71,15 @@
screens)
(keyword key))
{:keys [insets sheet? theme]} options
user-theme (theme/get-theme)
background-color (or (get-in options [:layout :backgroundColor])
(when sheet? :transparent))]
^{:key (str "root" key @reloader/cnt)}
[quo2.theme/provider {:theme (or theme user-theme)}
[rn/view {:style (wrapped-screen-style insets background-color)}
[inactive]
(if sheet?
[:f> bottom-sheet-screen/f-view component]
[component])]
(when js/goog.DEBUG
[reloader/reload-view])]))))
[screen-wrapper
{:insets insets
:background-color background-color
:component component
:sheet? sheet?
:screen-theme theme}]))))

(def bottom-sheet
(reagent/reactify-component
Expand Down

0 comments on commit b3c881e

Please sign in to comment.