Polls shown as unanswered when toot goes back in view
Pre-Checks
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] Providing a screenshot or video to reproduce the issue or show visually what was meant.
- [ ] I am willing to provide a PR.
Describe the bug
Steps to reproduce:
- Submit an answer to a poll.
- Scroll until the poll is out of view (and destroyed by the virtual list).
- Scroll back to the poll.
The poll will be shown as unanswered even if it has been answered.
Reproduction video or screenshot
The video shows Elk alpha, I was able to reproduce the issue on Elk canary too.
Additional Context
No response
Start a new pull request in StackBlitz Codeflow.
@baptiste0928 I just noticed this issue in [email protected] and happy to see you created an issue. I'm happy to volunteer if you're busy.
It's interesting. I ran the app locally, and looked at my own feed where I saw the poll, and this time the toot loaded in its poll results view, which is what we want, given I already voted earlier. I went back to my Elk.app where I experienced the issue, scrolled up again to the same poll in my timeline, where it'd become "fresh" again. So when I refreshed the page, it updated itself to the results-because-you-voted state. To me that suggests the issue might be around caching of the timeline, and the fact that a poll component should be an exception to the rule so we make sure to have the most current data. I'll keep investigating 😃
Update -- made a video on my side also reproducing the issue. Tl;Dw - page refresh updates the status.poll
Does this still happen? Can't repro