mirror of
https://github.com/discourse/discourse.git
synced 2025-06-20 19:31:31 +08:00

Follow-up to ce9eec8606
.
When the review-index route is entered, we listen to the `/reviewable_counts` (or `/reviewable_counts/<user_id>` when the new user menu is enabled) channel so we can listen for changes to reviewables and update the UI accordingly. However, we currently don't unsubscribe when leaving the route which means each time the route is entered, we setup a new listener causing the browser to do unnecessary work and potentially state leakage.