Show a progress indicator while logging in account using saved password.
On slower devices the white screen is shown for a few seconds after the status logo. It looks like that something is wrong with the app. This commit adds a simple progress screen (full-screen with an animated activity indicator) that is shown before the main screen is loaded.
This commit is contained in:
parent
aef1050924
commit
6de53a5e9c
|
@ -77,5 +77,6 @@
|
|||
(if password
|
||||
(handlers-macro/merge-fx cofx
|
||||
{:db (assoc-in db [:accounts/login :password] password)}
|
||||
(navigation/navigate-to-cofx :progress nil)
|
||||
(user-login))
|
||||
(navigation/navigate-to-cofx :login nil cofx)))
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
(ns status-im.ui.screens.progress.styles
|
||||
(:require [status-im.ui.components.colors :as colors]
|
||||
[status-im.ui.components.toolbar.styles :as toolbar.styles]))
|
||||
|
||||
(def container
|
||||
{:flex 1
|
||||
:align-items :center
|
||||
:justify-content :center
|
||||
:background-color colors/white})
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
(ns status-im.ui.screens.progress.views
|
||||
(:require-macros [status-im.utils.views :refer [defview letsubs]])
|
||||
(:require [status-im.ui.screens.progress.styles :as styles]
|
||||
[status-im.ui.components.react :as react]
|
||||
[status-im.ui.components.react :as components]))
|
||||
|
||||
;; a simple view with animated progress indicator in its center
|
||||
(defview progress [_]
|
||||
[react/keyboard-avoiding-view {:style styles/container}
|
||||
[components/activity-indicator {:animating true}]])
|
|
@ -11,6 +11,8 @@
|
|||
[status-im.ui.screens.accounts.recover.views :refer [recover]]
|
||||
[status-im.ui.screens.accounts.views :refer [accounts]]
|
||||
|
||||
[status-im.ui.screens.progress.views :refer [progress]]
|
||||
|
||||
[status-im.chat.screen :refer [chat]]
|
||||
[status-im.ui.screens.add-new.views :refer [add-new]]
|
||||
[status-im.ui.screens.add-new.new-chat.views :refer [new-chat]]
|
||||
|
@ -87,6 +89,7 @@
|
|||
:profile-photo-capture profile-photo-capture
|
||||
:accounts accounts
|
||||
:login login
|
||||
:progress progress
|
||||
:recover recover
|
||||
:network-settings network-settings
|
||||
:extensions-settings extensions-settings
|
||||
|
|
Loading…
Reference in New Issue