[#4149] fixed modal on iphonex
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
37fe1e2b9e
commit
68bb21c598
|
@ -210,9 +210,6 @@
|
||||||
|
|
||||||
;; Platform-specific View
|
;; Platform-specific View
|
||||||
|
|
||||||
(def platform-specific-view
|
|
||||||
(if platform/iphone-x? safe-area-view view))
|
|
||||||
|
|
||||||
(defmulti create-main-screen-view #(cond
|
(defmulti create-main-screen-view #(cond
|
||||||
platform/iphone-x? :iphone-x
|
platform/iphone-x? :iphone-x
|
||||||
platform/ios? :ios
|
platform/ios? :ios
|
||||||
|
|
|
@ -75,7 +75,8 @@
|
||||||
;;; - edit-my-profile -
|
;;; - edit-my-profile -
|
||||||
;;; |
|
;;; |
|
||||||
;;; - profile-photo-capture
|
;;; - profile-photo-capture
|
||||||
(views/compile-views root-view
|
(views/compile-views
|
||||||
|
root-view
|
||||||
[{:views #{:home :wallet :my-profile}
|
[{:views #{:home :wallet :my-profile}
|
||||||
:component main-tabs}
|
:component main-tabs}
|
||||||
|
|
||||||
|
@ -113,13 +114,8 @@
|
||||||
:parent :my-profile
|
:parent :my-profile
|
||||||
:component profile-photo-capture}])
|
:component profile-photo-capture}])
|
||||||
|
|
||||||
(defview main []
|
(defn get-main-component [view-id]
|
||||||
(letsubs [signed-up? [:signed-up?]
|
(case view-id
|
||||||
view-id [:get :view-id]
|
|
||||||
modal-view [:get :modal]]
|
|
||||||
{:component-will-update (fn [] (react/dismiss-keyboard!))}
|
|
||||||
(when view-id
|
|
||||||
(let [component (case view-id
|
|
||||||
:intro intro
|
:intro intro
|
||||||
:create-account create-account
|
:create-account create-account
|
||||||
:usage-data usage-data
|
:usage-data usage-data
|
||||||
|
@ -160,7 +156,37 @@
|
||||||
:contact-code contact-code
|
:contact-code contact-code
|
||||||
:profile-qr-viewer profile.user/qr-viewer
|
:profile-qr-viewer profile.user/qr-viewer
|
||||||
:backup-seed backup-seed
|
:backup-seed backup-seed
|
||||||
[react/view [react/text (str "Unknown view: " view-id)]])
|
[react/view [react/text (str "Unknown view: " view-id)]]))
|
||||||
|
|
||||||
|
(defn get-modal-component [modal-view]
|
||||||
|
(case modal-view
|
||||||
|
:qr-scanner qr-scanner
|
||||||
|
:contact-list-modal contact-list-modal
|
||||||
|
:wallet-transactions-filter wallet-transactions/filter-history
|
||||||
|
:wallet-settings-assets wallet-settings/manage-assets
|
||||||
|
:wallet-send-transaction-modal send-transaction-modal
|
||||||
|
:wallet-transaction-sent-modal transaction-sent-modal
|
||||||
|
:wallet-sign-message-modal sign-message-modal
|
||||||
|
:wallet-transaction-fee wallet.send/transaction-fee
|
||||||
|
[react/view [react/text (str "Unknown modal view: " modal-view)]]))
|
||||||
|
|
||||||
|
(defview main-modal []
|
||||||
|
(letsubs [modal-view [:get :modal]]
|
||||||
|
(when modal-view
|
||||||
|
[view common-styles/modal
|
||||||
|
[modal {:animation-type :slide
|
||||||
|
:transparent true
|
||||||
|
:on-request-close #(dispatch [:navigate-back])}
|
||||||
|
(let [component (get-modal-component modal-view)]
|
||||||
|
[react/main-screen-modal-view modal-view
|
||||||
|
[component]])]])))
|
||||||
|
|
||||||
|
(defview main []
|
||||||
|
(letsubs [signed-up? [:signed-up?]
|
||||||
|
view-id [:get :view-id]]
|
||||||
|
{:component-will-update (fn [] (react/dismiss-keyboard!))}
|
||||||
|
(when view-id
|
||||||
|
(let [component (get-main-component view-id)
|
||||||
main-screen-view (create-main-screen-view view-id)]
|
main-screen-view (create-main-screen-view view-id)]
|
||||||
[main-screen-view common-styles/flex
|
[main-screen-view common-styles/flex
|
||||||
(if (and config/compile-views-enabled?
|
(if (and config/compile-views-enabled?
|
||||||
|
@ -172,20 +198,4 @@
|
||||||
view-id))
|
view-id))
|
||||||
[root-view]
|
[root-view]
|
||||||
[component])
|
[component])
|
||||||
(when modal-view
|
[main-modal]]))))
|
||||||
[view common-styles/modal
|
|
||||||
[modal {:animation-type :slide
|
|
||||||
:transparent true
|
|
||||||
:on-request-close #(dispatch [:navigate-back])}
|
|
||||||
(let [component (case modal-view
|
|
||||||
:qr-scanner qr-scanner
|
|
||||||
:contact-list-modal contact-list-modal
|
|
||||||
:wallet-transactions-filter wallet-transactions/filter-history
|
|
||||||
:wallet-settings-assets wallet-settings/manage-assets
|
|
||||||
:wallet-send-transaction-modal send-transaction-modal
|
|
||||||
:wallet-transaction-sent-modal transaction-sent-modal
|
|
||||||
:wallet-sign-message-modal sign-message-modal
|
|
||||||
:wallet-transaction-fee wallet.send/transaction-fee
|
|
||||||
[react/view [react/text (str "Unknown modal view: " modal-view)]])]
|
|
||||||
[react/main-screen-modal-view modal-view
|
|
||||||
[component]])]])]))))
|
|
||||||
|
|
Loading…
Reference in New Issue