Skip to content

Fix incorrect viewed files counter if reverted change was viewed (#36819)#36871

Closed
GiteaBot wants to merge 1 commit intogo-gitea:release/v1.25from
GiteaBot:backport-36819-v1.25
Closed

Fix incorrect viewed files counter if reverted change was viewed (#36819)#36871
GiteaBot wants to merge 1 commit intogo-gitea:release/v1.25from
GiteaBot:backport-36819-v1.25

Conversation

@GiteaBot
Copy link
Copy Markdown
Collaborator

@GiteaBot GiteaBot commented Mar 9, 2026

Backport #36819 by @bytedream

If a file is marked as viewed in a PR and all changes to those file are reverted afterwards, the file is still stored as viewed in the db, which causes an incorrect viewed files counter


image

…gitea#36819)

If a file is marked as viewed in a PR and all changes to those file are
reverted afterwards, the file is still stored as viewed in the db, which
causes an incorrect viewed files counter

---

<img width="468" height="139" alt="image"
src="https://github.com/user-attachments/assets/f13bf161-142d-49a9-8425-3884ee7abb84"
/>
@GiteaBot GiteaBot added modifies/go Pull requests that update Go code type/bug lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 9, 2026
@GiteaBot GiteaBot added this to the 1.25.5 milestone Mar 9, 2026
@GiteaBot GiteaBot requested review from lunny and silverwind March 9, 2026 08:23
@silverwind
Copy link
Copy Markdown
Member

Backport is broken and I don't think we should backport that one.

@silverwind silverwind closed this Mar 9, 2026
@GiteaBot GiteaBot removed this from the 1.25.5 milestone Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/go Pull requests that update Go code type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants