diff options
author | Stefan Malzner <stefan@adlk.io> | 2018-12-02 00:48:57 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2018-12-02 00:48:57 +0100 |
commit | d2d28569c3ec5f3e30f41efe6201fcb70d088c99 (patch) | |
tree | 566dd9834d3bba8268b57a69b95ad8ab77e52d5d /src/features | |
parent | Simplify service proxy feature init (diff) | |
download | ferdium-app-d2d28569c3ec5f3e30f41efe6201fcb70d088c99.tar.gz ferdium-app-d2d28569c3ec5f3e30f41efe6201fcb70d088c99.tar.zst ferdium-app-d2d28569c3ec5f3e30f41efe6201fcb70d088c99.zip |
Don't delay app when user has no services
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/delayApp/index.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/features/delayApp/index.js b/src/features/delayApp/index.js index 3fc0f2570..92d2dcf6a 100644 --- a/src/features/delayApp/index.js +++ b/src/features/delayApp/index.js | |||
@@ -40,6 +40,11 @@ export default function init(stores) { | |||
40 | config.delayDuration = globalConfig.wait !== undefined ? globalConfig.wait : DEFAULT_FEATURES_CONFIG.needToWaitToProceedConfig.wait; | 40 | config.delayDuration = globalConfig.wait !== undefined ? globalConfig.wait : DEFAULT_FEATURES_CONFIG.needToWaitToProceedConfig.wait; |
41 | 41 | ||
42 | autorun(() => { | 42 | autorun(() => { |
43 | if (stores.services.all.length === 0) { | ||
44 | shownAfterLaunch = true; | ||
45 | return; | ||
46 | } | ||
47 | |||
43 | const diff = moment().diff(timeLastDelay); | 48 | const diff = moment().diff(timeLastDelay); |
44 | if ((stores.app.isFocused && diff >= config.delayOffset) || !shownAfterLaunch) { | 49 | if ((stores.app.isFocused && diff >= config.delayOffset) || !shownAfterLaunch) { |
45 | debug(`App will be delayed for ${config.delayDuration / 1000}s`); | 50 | debug(`App will be delayed for ${config.delayDuration / 1000}s`); |