From 035b2e36c35ef47652c1f179ccd2869f15863380 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 18 Feb 2015 20:37:23 -0800 Subject: [PATCH] [Telemetry] Fire callback when objects are available Fire callback from telemetry subscriber when the set of object references changes. This allows views which use the subscriber to register one callback, while still ensuring that they are notified when there is new information to show. Supports fixed position view, WTD-879. --- platform/telemetry/src/TelemetrySubscription.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/telemetry/src/TelemetrySubscription.js b/platform/telemetry/src/TelemetrySubscription.js index b7deb5d449..cce24d48dd 100644 --- a/platform/telemetry/src/TelemetrySubscription.js +++ b/platform/telemetry/src/TelemetrySubscription.js @@ -138,6 +138,11 @@ define( function cacheObjectReferences(objects) { telemetryObjects = objects; metadatas = objects.map(lookupMetadata); + // Fire callback, as this will be the first time that + // telemetry objects are available + if (callback) { + callback(); + } return objects; }