Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

feat: allow for adding conflict listeners after client creation #393

Merged
merged 1 commit into from
Mar 9, 2020

Conversation

darahayes
Copy link
Contributor

Description

Adds a CompositeConflictListener class that always gets passed down to the ConflictLink. This allows us to add/remove listeners as needed. It's quick and dirty but it works and it has an integration test.

Checklist
  • npm test passes
  • npm run build works
  • tests are included
  • documentation is changed or added

* Composite Conflict Listener class that can accept register and remove individual listener functions as needed
* Gets passed down to the conflict link
*/
export class CompositeConflictListener implements ConflictListener {
Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome, does this mean the changes aren't even breaking changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

exactly, you can still pass your original conflictListener in options if desired but it'll get registered into this Composite one.

Copy link
Contributor

@kingsleyzissou kingsleyzissou left a comment

Choose a reason for hiding this comment

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

Tested in datasync-starter.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants