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

[4.x] Fix update counter #9479

Merged
merged 4 commits into from
Feb 7, 2024
Merged

[4.x] Fix update counter #9479

merged 4 commits into from
Feb 7, 2024

Conversation

jasonvarga
Copy link
Member

Fix double AJAX calls

The update counter badge was performing 2 ajax request for every cp page request.
The vue component is rendered twice: once in the desktop nav and once in the mobile nav.
This is fixed now by using a Vuex store to keep track of the count and request. Only one of them will trigger the request.

Remove unnecessary caching boolean

The update count is cached. We had a boolean being passed to the ajax route which attempted to force a re-cache when necessary. This has never actually been working, and is unnecessary anyway. This PR removes that unnecessary code.

@jasonvarga jasonvarga merged commit cad3395 into 4.x Feb 7, 2024
34 checks passed
@jasonvarga jasonvarga deleted the updates-count branch February 7, 2024 21:21
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.

None yet

1 participant