From c17cd0f11ea6909cb658fd09049f21844eb34532 Mon Sep 17 00:00:00 2001 From: John Knox Date: Thu, 16 Jan 2020 08:14:25 -0800 Subject: [PATCH] Add isForeground to ping events Summary: I want to make ping events fire when in background or foreground. But doing that now could mess with some stats. Setting this up so we have the data. If it comes to it, after this has been going a while, we can add a filter to the existing queries for "isForeground=true" to preserve their behaviour. Reviewed By: mweststrate Differential Revision: D19428926 fbshipit-source-id: 7c175e9936dce52a59d17995dae61a82d23687f8 --- src/dispatcher/tracking.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dispatcher/tracking.tsx b/src/dispatcher/tracking.tsx index 065282568..1798b3947 100644 --- a/src/dispatcher/tracking.tsx +++ b/src/dispatcher/tracking.tsx @@ -118,6 +118,7 @@ export default (store: Store, logger: Logger) => { pluginStats: getPluginBackgroundStats(), app, sdkVersion, + isForeground: state.application.windowIsFocused, }; // reset dropped frames counter