Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid clearing dispatcher when user changes optOut setting #476

Conversation

lorenc-tomasz
Copy link
Contributor

PR fixes #474

Basically setting setting setOptOut always clears dispatcher. It should set only flag and events should be omitted, not cleared.

@hannesa2
Copy link
Collaborator

hannesa2 commented Feb 7, 2024

The tests are good, but they need an adaption too

@lorenc-tomasz
Copy link
Contributor Author

Fixed. Sorry for that.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3eaf203) 87.12% compared to head (724c912) 87.11%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #476      +/-   ##
============================================
- Coverage     87.12%   87.11%   -0.01%     
  Complexity      364      364              
============================================
  Files            32       32              
  Lines          1429     1428       -1     
  Branches        165      165              
============================================
- Hits           1245     1244       -1     
  Misses          115      115              
  Partials         69       69              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@hannesa2 hannesa2 left a comment

Choose a reason for hiding this comment

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

Small footprint 👍
Looks good to me.

@hannesa2 hannesa2 merged commit d0ca63c into matomo-org:master Feb 7, 2024
4 checks passed
@hannesa2
Copy link
Collaborator

hannesa2 commented Feb 7, 2024

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

Successfully merging this pull request may close these issues.

setOptOut clears dispatecher each time the method is invoked
3 participants