"Toggle Comments for this file" button doesn't switch state from `active`
Summary
When working with diff in an MR, the "Toggle Comments for this file" button doesn't toggle its state from active.
Steps to reproduce
- Open an MR with comments on code changes
- Go to "Changes" tab
- Check the file that has comments: the comments will be expanded by default and the button in question will be active (see screenshot below)
- Click the button to close the comments
- Comments get closed, but the button stays in active state
- Now click the avatar on the left side of the diff to expand comments again. The button remains in active state
- Click the "collapse" button on the side of the diff to collapse the comments again. The button remains in active state
What is the current bug behavior?
The button doesn't change its state
What is the expected correct behavior?
The button should toggle active state depending on whether the comments are expanded or collapsed. No matter whether they are expanded/collapsed with the help of the button in the subject or with the help of the toggle on the side of the diff.
Relevant logs and/or screenshots
Video of the buggy behavior toggle-comments-diff