Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ protected override void OnParametersSet()

private void SubscribeForPolling(IRenderableComponent component, ITwinElement element)
{
if (_pollingStarted) return;
var presentation = this.Presentation;
if (presentation != null && presentation.StartsWith("Shadow")) return;
if (component == null) return;
if(PolledComponents.Contains(component)) return;
PolledComponents?.Add(component);
component?.AddToPolling(element, this.PollingInterval);
_pollingStarted = true;
Expand All @@ -126,7 +128,7 @@ private void UnSubscribeFromPolling()
{
foreach (var renderableComponent in PolledComponents)
{
renderableComponent.RemovePolledElements();
renderableComponent?.RemovePolledElements();
}

_pollingStarted = false;
Expand Down
Loading