diff --git a/src/lib/statsig/statsig.tsx b/src/lib/statsig/statsig.tsx index 81707d2b..7d86f407 100644 --- a/src/lib/statsig/statsig.tsx +++ b/src/lib/statsig/statsig.tsx @@ -226,11 +226,11 @@ AppState.addEventListener('change', (state: AppStateStatus) => { let secondsActive = 0 if (lastActive != null) { secondsActive = Math.round((performance.now() - lastActive) / 1e3) + lastActive = null + logEvent('state:background:sampled', { + secondsActive, + }) } - lastActive = null - logEvent('state:background:sampled', { - secondsActive, - }) } })