Skip to content

Commit 6de53a5

Browse files
mandriginrasom
authored andcommitted
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.
1 parent aef1050 commit 6de53a5

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

src/status_im/ui/screens/accounts/login/models.cljs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,6 @@
7777
(if password
7878
(handlers-macro/merge-fx cofx
7979
{:db (assoc-in db [:accounts/login :password] password)}
80+
(navigation/navigate-to-cofx :progress nil)
8081
(user-login))
8182
(navigation/navigate-to-cofx :login nil cofx)))
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(ns status-im.ui.screens.progress.styles
2+
(:require [status-im.ui.components.colors :as colors]
3+
[status-im.ui.components.toolbar.styles :as toolbar.styles]))
4+
5+
(def container
6+
{:flex 1
7+
:align-items :center
8+
:justify-content :center
9+
:background-color colors/white})
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(ns status-im.ui.screens.progress.views
2+
(:require-macros [status-im.utils.views :refer [defview letsubs]])
3+
(:require [status-im.ui.screens.progress.styles :as styles]
4+
[status-im.ui.components.react :as react]
5+
[status-im.ui.components.react :as components]))
6+
7+
;; a simple view with animated progress indicator in its center
8+
(defview progress [_]
9+
[react/keyboard-avoiding-view {:style styles/container}
10+
[components/activity-indicator {:animating true}]])

src/status_im/ui/screens/views.cljs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
[status-im.ui.screens.accounts.recover.views :refer [recover]]
1212
[status-im.ui.screens.accounts.views :refer [accounts]]
1313

14+
[status-im.ui.screens.progress.views :refer [progress]]
15+
1416
[status-im.chat.screen :refer [chat]]
1517
[status-im.ui.screens.add-new.views :refer [add-new]]
1618
[status-im.ui.screens.add-new.new-chat.views :refer [new-chat]]
@@ -87,6 +89,7 @@
8789
:profile-photo-capture profile-photo-capture
8890
:accounts accounts
8991
:login login
92+
:progress progress
9093
:recover recover
9194
:network-settings network-settings
9295
:extensions-settings extensions-settings

0 commit comments

Comments
 (0)