Fix doubled Index Statistics numbers after searching in preferences

The preferences search feature moves label value attributes into text
content for highlighting, so stats refreshes that set the value
attribute rendered the new number in front of the stale text.

https://forums.zotero.org/discussion/comment/516909/#Comment_516909
(cherry picked from commit b6837a3a57)
This commit is contained in:
Dan Stillman 2026-08-18 14:52:47 -04:00
parent 59a3568213
commit 2913397bf2

View file

@ -391,10 +391,10 @@ Zotero_Preferences.Advanced = {
}
let stats = await Zotero.FullText.getIndexStats();
document.getElementById('fulltext-stats-indexed').setAttribute('value', stats.indexed.toLocaleString());
document.getElementById('fulltext-stats-partial').setAttribute('value', stats.partial.toLocaleString());
document.getElementById('fulltext-stats-notes').setAttribute('value', stats.notesIndexed.toLocaleString());
document.getElementById('fulltext-stats-not-available').setAttribute('value', stats.notAvailable.toLocaleString());
document.getElementById('fulltext-stats-indexed').textContent = stats.indexed.toLocaleString();
document.getElementById('fulltext-stats-partial').textContent = stats.partial.toLocaleString();
document.getElementById('fulltext-stats-notes').textContent = stats.notesIndexed.toLocaleString();
document.getElementById('fulltext-stats-not-available').textContent = stats.notAvailable.toLocaleString();
// Indexed + Partial + indexed notes are already what's in the search index, so they're the
// bar's numerator. Pending work across the auto-draining queues: extracted content not yet