diff options
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/delayApp/index.js | 9 | ||||
-rw-r--r-- | src/features/workspaces/store.js | 5 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/features/delayApp/index.js b/src/features/delayApp/index.js index bd0395376..5b28fb7c8 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'); |
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js index 7f41cfc88..13227e033 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js | |||
@@ -45,6 +45,11 @@ export default class WorkspacesStore extends FeatureStore { | |||
45 | return getUserWorkspacesRequest.result || []; | 45 | return getUserWorkspacesRequest.result || []; |
46 | } | 46 | } |
47 | 47 | ||
48 | @computed get isLoadingWorkspaces() { | ||
49 | if (!this.isFeatureActive) return false; | ||
50 | return getUserWorkspacesRequest.isExecutingFirstTime; | ||
51 | } | ||
52 | |||
48 | @computed get settings() { | 53 | @computed get settings() { |
49 | return localStorage.getItem('workspaces') || {}; | 54 | return localStorage.getItem('workspaces') || {}; |
50 | } | 55 | } |