Skip to content

Commit

Permalink
Updated displayed count to reflect the filter criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
levon003 committed Apr 21, 2022
1 parent 5f6d6db commit 8cf7130
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,24 @@ const RevisionViewer = ({ className, revisions, setRevisions, counts, revisionFi

const getInvestigatingText = () => {
if (counts?.all?.all) {
return "Inspecting " + formatIndex(currRevisionIdx + 1) + " of " + formatNumber(counts?.all?.all) + " " + getSummary()
console.log(counts)
let prediction_key = focusSelected.prediction_filter
if (!prediction_key in counts) {
console.warn("Unknown prediction key.")
}

let revert_key = focusSelected.revert_filter
if (revert_key === "reverted") {
revert_key = "reverted_damaging"
} else if (revert_key === "any") {
revert_key = "all"
} else if (!revert_key in counts[prediction_key]) {
console.warn("Unknown revert key.")
}

const selected_count = counts[prediction_key][revert_key]
//const selected_count = counts?.all?.all // original, which produces the total number that meet the filter condition
return "Inspecting " + formatIndex(currRevisionIdx + 1) + " of " + formatNumber(selected_count) + " " + getSummary()
}
return "Loading..."
}
Expand Down

0 comments on commit 8cf7130

Please sign in to comment.