diff options
author | Amine Mouafik <amine@mouafik.fr> | 2019-05-12 20:00:41 +0700 |
---|---|---|
committer | Amine Mouafik <amine@mouafik.fr> | 2019-05-12 20:00:41 +0700 |
commit | d8a1d5f9151cc31f4c2b5c0096a35e49b2c74d61 (patch) | |
tree | 3974d449d8ef389fc61bf880ae758b5debc22a80 /src/features/delayApp/index.js | |
parent | Use dark background in SVG logo (diff) | |
parent | Update CHANGELOG.md (diff) | |
download | ferdium-app-d8a1d5f9151cc31f4c2b5c0096a35e49b2c74d61.tar.gz ferdium-app-d8a1d5f9151cc31f4c2b5c0096a35e49b2c74d61.tar.zst ferdium-app-d8a1d5f9151cc31f4c2b5c0096a35e49b2c74d61.zip |
Merge tag 'v5.1.0'
# Conflicts:
# README.md
# src/components/layout/AppLayout.js
Diffstat (limited to 'src/features/delayApp/index.js')
-rw-r--r-- | src/features/delayApp/index.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/features/delayApp/index.js b/src/features/delayApp/index.js index 28aa50eb2..67f0fc5e6 100644 --- a/src/features/delayApp/index.js +++ b/src/features/delayApp/index.js | |||
@@ -3,7 +3,7 @@ import moment from 'moment'; | |||
3 | import DelayAppComponent from './Component'; | 3 | import DelayAppComponent from './Component'; |
4 | 4 | ||
5 | import { DEFAULT_FEATURES_CONFIG } from '../../config'; | 5 | import { DEFAULT_FEATURES_CONFIG } from '../../config'; |
6 | import { gaEvent } from '../../lib/analytics'; | 6 | import { gaEvent, gaPage } from '../../lib/analytics'; |
7 | 7 | ||
8 | const debug = require('debug')('Franz:feature:delayApp'); | 8 | const debug = require('debug')('Franz:feature:delayApp'); |
9 | 9 | ||
@@ -28,8 +28,12 @@ export default function init(stores) { | |||
28 | let shownAfterLaunch = false; | 28 | let shownAfterLaunch = false; |
29 | let timeLastDelay = moment(); | 29 | let timeLastDelay = moment(); |
30 | 30 | ||
31 | window.franz.features.delayApp = { | ||
32 | state, | ||
33 | }; | ||
34 | |||
31 | reaction( | 35 | reaction( |
32 | () => stores.features.features.needToWaitToProceed && !stores.user.data.isPremium, | 36 | () => stores.user.isLoggedIn && stores.features.features.needToWaitToProceed && !stores.user.data.isPremium, |
33 | (isEnabled) => { | 37 | (isEnabled) => { |
34 | if (isEnabled) { | 38 | if (isEnabled) { |
35 | debug('Enabling `delayApp` feature'); | 39 | debug('Enabling `delayApp` feature'); |
@@ -50,7 +54,8 @@ export default function init(stores) { | |||
50 | debug(`App will be delayed for ${config.delayDuration / 1000}s`); | 54 | debug(`App will be delayed for ${config.delayDuration / 1000}s`); |
51 | 55 | ||
52 | setVisibility(true); | 56 | setVisibility(true); |
53 | gaEvent('delayApp', 'show', 'Delay App Feature'); | 57 | gaPage('/delayApp'); |
58 | gaEvent('DelayApp', 'show', 'Delay App Feature'); | ||
54 | 59 | ||
55 | timeLastDelay = moment(); | 60 | timeLastDelay = moment(); |
56 | shownAfterLaunch = true; | 61 | shownAfterLaunch = true; |