mirror of
https://github.com/go-gitea/gitea
synced 2025-12-06 21:08:25 +00:00
Fix incorrect viewed files counter if file has changed (#36009)
File changes since last review didn't decrease the viewed files counter --- <img width="440" height="178" alt="image" src="https://github.com/user-attachments/assets/da34fcf4-452f-4f71-8da2-97edbfc31fdd" /> Also reported here -> https://github.com/go-gitea/gitea/issues/35803#issuecomment-3567850285 --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@@ -331,7 +331,7 @@ func UpdateViewedFiles(ctx *context.Context) {
|
||||
updatedFiles[file] = state
|
||||
}
|
||||
|
||||
if err := pull_model.UpdateReviewState(ctx, ctx.Doer.ID, pull.ID, data.HeadCommitSHA, updatedFiles); err != nil {
|
||||
if _, err := pull_model.UpdateReviewState(ctx, ctx.Doer.ID, pull.ID, data.HeadCommitSHA, updatedFiles); err != nil {
|
||||
ctx.ServerError("UpdateReview", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user