diff options
author | 2019-10-07 20:18:19 +0200 | |
---|---|---|
committer | 2019-10-07 20:18:19 +0200 | |
commit | dd880340379c1be57acd95101180b29f146503a1 (patch) | |
tree | 58ad8565e4dc7bda21c3bba5731c178f94b6b2f8 /src/features | |
parent | Also show Franz loading spinner when workspaces are loading (diff) | |
download | ferdium-app-dd880340379c1be57acd95101180b29f146503a1.tar.gz ferdium-app-dd880340379c1be57acd95101180b29f146503a1.tar.zst ferdium-app-dd880340379c1be57acd95101180b29f146503a1.zip |
Fix app delay by waiting on workspaces to load
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/delayApp/index.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/features/delayApp/index.js b/src/features/delayApp/index.js index c0029873a..28b079e6b 100644 --- a/src/features/delayApp/index.js +++ b/src/features/delayApp/index.js | |||
@@ -4,6 +4,7 @@ import DelayAppComponent from './Component'; | |||
4 | 4 | ||
5 | import { DEFAULT_FEATURES_CONFIG } from '../../config'; | 5 | import { DEFAULT_FEATURES_CONFIG } from '../../config'; |
6 | import { gaEvent, gaPage } from '../../lib/analytics'; | 6 | import { gaEvent, gaPage } from '../../lib/analytics'; |
7 | import { getUserWorkspacesRequest } from '../workspaces/api'; | ||
7 | 8 | ||
8 | const debug = require('debug')('Franz:feature:delayApp'); | 9 | const debug = require('debug')('Franz:feature:delayApp'); |
9 | 10 | ||
@@ -33,7 +34,13 @@ export default function init(stores) { | |||
33 | }; | 34 | }; |
34 | 35 | ||
35 | reaction( | 36 | reaction( |
36 | () => stores.user.isLoggedIn && stores.services.allServicesRequest.wasExecuted && stores.features.features.needToWaitToProceed && !stores.user.data.isPremium, | 37 | () => ( |
38 | stores.user.isLoggedIn | ||
39 | && stores.services.allServicesRequest.wasExecuted | ||
40 | && getUserWorkspacesRequest.wasExecuted | ||
41 | && stores.features.features.needToWaitToProceed | ||
42 | && !stores.user.data.isPremium | ||
43 | ), | ||
37 | (isEnabled) => { | 44 | (isEnabled) => { |
38 | if (isEnabled) { | 45 | if (isEnabled) { |
39 | debug('Enabling `delayApp` feature'); | 46 | debug('Enabling `delayApp` feature'); |