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

FIX: Clear stale status of reloaded reviewables #13750

Merged
merged 3 commits into from Jul 16, 2021
Merged

Conversation

udan11
Copy link
Contributor

@udan11 udan11 commented Jul 15, 2021

Navigating away from and back to the reviewables reloaded Reviewable
records, but did not clear the "stale" attribute.

Navigating away from and back to the reviewables reloaded Reviewable
records, but did not clear the "stale" attribute.
@udan11 udan11 requested a review from ZogStriP July 15, 2021 18:16
When a user acts on a reviewable, all other clients are notified and a
generic "reviewable was resolved by someone" notice was shown instead of
the buttons. There is no need to keep secret the username of the acting
user.
@@ -39,6 +39,10 @@ export default DiscourseRoute.extend({
sort_order: meta.sort_order,
additionalFilters: meta.additional_filters || {},
});

controller.reviewables.forEach((reviewable) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: controller.reviewables.setEach("stale", false) is a little simpler.

Copy link
Member

Choose a reason for hiding this comment

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

TIL about setEach

@udan11 udan11 merged commit 079d2af into master Jul 16, 2021
@udan11 udan11 deleted the stale-reviewables branch July 16, 2021 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants