Skip to content

Conversation

@prodderman
Copy link

No description provided.

event[eventPropertyName] = values[eventPropertyIndex]
})

subscription[event.eventSymbol]?.listeners.forEach((listener) => listener(event))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

this.state[key] = val
})

this.stateSubscriptions.forEach((listener) => listener(this.state))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need this state outside?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To know if it is replying now or not, how much time has replayed.

removeTimeSeries?: ISubscriptionList
}

type OnDemandMethod = 'replay' | 'setSpeed' | 'stopAndResume' | 'stopAndClear'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create a separate class for onDemand and add typed methods:

  • reply
  • setSpeed
  • stopAndResume
  • stopAndClear

} else if (method === 'clear') {
this.endpoint.invokeOnDemandService(
{ op: 'stopAndClear', args: [] },
changeStateIfSuccess({ speed: 0, replay: false, clear: true, time: 0 })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How's it connected with the onDemand service?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean state? I think it implies to change the state when we invoke any of onDemand methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants