Show spinner when refreshing wallet on iOS [#3667]

Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
This commit is contained in:
psdp 2018-05-08 05:53:01 +00:00 committed by Julien Eluard
parent 1a314f12ac
commit 8aeeb19f22
No known key found for this signature in database
GPG Key ID: 6FD7DB5437FCBEF6
2 changed files with 15 additions and 14 deletions

View File

@ -65,18 +65,18 @@
;; Main section ;; Main section
(def main-section (defstyle main-section
{:flex 1}) {:flex 1
:ios {:background-color colors/blue}})
(def scroll-top (defstyle scroll-bottom
(let [height (:height (react/get-dimensions "window"))] {:background-color colors/white
{:background-color colors/blue :zIndex -1
:zIndex -1 :position :absolute
:position :absolute :left 0
:height height :right 0
:top (- height) :android {:height 0}
:left 0 :ios {:height 9999}})
:right 0}))
(def section (def section
{:background-color colors/blue}) {:background-color colors/blue})

View File

@ -91,14 +91,15 @@
[react/refresh-control {:on-refresh #(re-frame/dispatch [:update-wallet]) [react/refresh-control {:on-refresh #(re-frame/dispatch [:update-wallet])
:tint-color :white :tint-color :white
:refreshing false}])} :refreshing false}])}
[react/view {:style styles/scroll-top}] ;; Hack to allow different colors for top / bottom scroll view]
[total-section portfolio-value currency] [total-section portfolio-value currency]
[list/action-list actions [list/action-list actions
{:container-style styles/action-section}] {:container-style styles/action-section}]
[asset-section assets currency]]])) [asset-section assets currency]
;; Hack to allow different colors for bottom scroll view (iOS only)
[react/view {:style styles/scroll-bottom}]]]))
(views/defview wallet [] (views/defview wallet []
(views/letsubs [{:keys [wallet-set-up-passed?]} [:get-current-account]] (views/letsubs [{:keys [wallet-set-up-passed?]} [:get-current-account]]
(if wallet-set-up-passed? (if wallet-set-up-passed?
[wallet-root] [wallet-root]
[onboarding.views/onboarding]))) [onboarding.views/onboarding])))