-
Notifications
You must be signed in to change notification settings - Fork 83
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
feat: check cookie consent when muting game #1157
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1157 +/- ##
==========================================
- Coverage 91.31% 91.30% -0.02%
==========================================
Files 111 111
Lines 6197 6197
==========================================
- Hits 5659 5658 -1
- Misses 538 539 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @razvan-pro)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @razvan-pro)
game/static/game/js/game.js, line 489 at r1 (raw file):
} else { ocargo.sound.unmute() if (hasFunctionalCookiesConsent()) {
Since CodeClimate is complaining that this bit is duplicate code with the bit above and that the function's cyclomatic complexity is too high, maybe you could refactor this into a separate function and pass in the true/false argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @razvan-pro)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved
game/static/game/js/game.js, line 489 at r1 (raw file):
Previously, faucomte97 (Florian Aucomte) wrote…
Since CodeClimate is complaining that this bit is duplicate code with the bit above and that the function's cyclomatic complexity is too high, maybe you could refactor this into a separate function and pass in the true/false argument?
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @razvan-pro)
Description
When muting the game, the cookie should only be set if the user gave consent for functional cookies. Muting the game should still work, but the status won't be saved on page reload or other levels if the cookie is not set.
How Has This Been Tested?
Checklist:
This change is