code refactor
This commit is contained in:
parent
539b7bbff4
commit
31d0c14247
|
@ -199,24 +199,21 @@
|
||||||
([component] (show-overlay component {}))
|
([component] (show-overlay component {}))
|
||||||
([component opts]
|
([component opts]
|
||||||
(navigation/dissmiss-overlay component)
|
(navigation/dissmiss-overlay component)
|
||||||
(let [theme (rf/sub [:theme])]
|
(let [theme (rf/sub [:theme])
|
||||||
|
[rnn-status-bar _ nav-bar-color _] (get-status-nav-color component theme)]
|
||||||
(navigation/show-overlay
|
(navigation/show-overlay
|
||||||
{:component {:name component
|
{:component {:name component
|
||||||
:id component
|
:id component
|
||||||
:options (merge (options/statusbar-and-navbar-options theme nil nil)
|
:options (merge
|
||||||
{:layout {:componentBackgroundColor :transparent
|
(options/statusbar-and-navbar-options theme rnn-status-bar nav-bar-color)
|
||||||
:orientation ["portrait"]}
|
{:layout {:componentBackgroundColor :transparent
|
||||||
:overlay {:interceptTouchOutside true
|
:orientation ["portrait"]}
|
||||||
:handleKeyboardEvents true}}
|
:overlay {:interceptTouchOutside true
|
||||||
opts)}}))))
|
:handleKeyboardEvents true}}
|
||||||
|
opts)}}))))
|
||||||
|
|
||||||
(rf/reg-fx :show-toasts
|
(rf/reg-fx :show-toasts
|
||||||
(fn [[view-id theme]]
|
(fn [] (show-overlay "toasts")))
|
||||||
(let [[rnn-status-bar nav-bar-color] (get-status-nav-color view-id theme)]
|
|
||||||
(show-overlay "toasts"
|
|
||||||
(assoc (options/statusbar-and-navbar-options nil rnn-status-bar nav-bar-color)
|
|
||||||
:overlay
|
|
||||||
{:interceptTouchOutside false})))))
|
|
||||||
|
|
||||||
(rf/reg-fx :hide-toasts
|
(rf/reg-fx :hide-toasts
|
||||||
(fn [] (navigation/dissmiss-overlay "toasts")))
|
(fn [] (navigation/dissmiss-overlay "toasts")))
|
||||||
|
|
Loading…
Reference in New Issue