From d2d28569c3ec5f3e30f41efe6201fcb70d088c99 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Sun, 2 Dec 2018 00:48:57 +0100 Subject: Don't delay app when user has no services --- src/features/delayApp/index.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/features/delayApp') 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) { config.delayDuration = globalConfig.wait !== undefined ? globalConfig.wait : DEFAULT_FEATURES_CONFIG.needToWaitToProceedConfig.wait; autorun(() => { + if (stores.services.all.length === 0) { + shownAfterLaunch = true; + return; + } + const diff = moment().diff(timeLastDelay); if ((stores.app.isFocused && diff >= config.delayOffset) || !shownAfterLaunch) { debug(`App will be delayed for ${config.delayDuration / 1000}s`); -- cgit v1.2.3-54-g00ecf