diff --git a/src/renderer/registerIpcRendererListeners.ts b/src/renderer/registerIpcRendererListeners.ts index a6ac8b47..1987b14b 100644 --- a/src/renderer/registerIpcRendererListeners.ts +++ b/src/renderer/registerIpcRendererListeners.ts @@ -53,9 +53,14 @@ export default function registerIpcRendererListeners() { error.name = 'Updation Error'; handleError(true, error); }); - + document.addEventListener('visibilitychange', function () { - if (document.visibilityState !== 'hidden') { + const { visibilityState } = document; + if (visibilityState === 'visible' && !telemetry.started) { + telemetry.start(); + } + + if (visibilityState !== 'hidden') { return; }