1
1
mirror of https://github.com/go-gitea/gitea synced 2025-11-13 09:48:12 +00:00

Remove wrong code (#35846)

Follow #35821
Fix https://github.com/go-gitea/gitea/pull/35844#issuecomment-3483521045

The reviewed file numbers and progress have been set from backend so
that we don't need to update the numbers when clicking `load more`.
This commit is contained in:
Lunny Xiao
2025-11-04 09:46:17 -08:00
committed by GitHub
parent 851db77256
commit 206f4c88b1
2 changed files with 1 additions and 10 deletions

View File

@@ -20,14 +20,6 @@ function refreshViewedFilesSummary() {
.replace('%[2]d', prReview.numberOfFiles);
}
// Explicitly recounts how many files the user has currently reviewed by counting the number of checked "viewed" checkboxes
// Additionally, the viewed files summary will be updated if it exists
export function countAndUpdateViewedFiles() {
// The number of files is constant, but the number of viewed files can change because files can be loaded dynamically
prReview.numberOfViewedFiles = document.querySelectorAll(`${viewedCheckboxSelector} > input[type=checkbox][checked]`).length;
refreshViewedFilesSummary();
}
// Initializes a listener for all children of the given html element
// (for example 'document' in the most basic case)
// to watch for changes of viewed-file checkboxes