1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 03:12:33 +01:00

Bring back list-per-group counts

Regression from:
- cbc0cbadaa
This commit is contained in:
Raymond Hill 2023-05-07 19:07:21 -04:00
parent 56092189d1
commit 9808423845
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -380,8 +380,11 @@ const toggleFilterList = (elem, on, ui = false) => {
const updateListNode = listNode => { const updateListNode = listNode => {
if ( listNode === null ) { return; } if ( listNode === null ) { return; }
if ( listNode.dataset.role !== 'node' ) { return; } if ( listNode.dataset.role !== 'node' ) { return; }
if ( listNode.dataset.parent === 'root' ) { return; }
const listLeaves = qsa$(listNode, '.listEntry[data-role="leaf"].checked'); const listLeaves = qsa$(listNode, '.listEntry[data-role="leaf"].checked');
dom.text(qs$(listNode, '.nodestats'),
renderNodeStats(listLeaves.length, qsa$(listNode, '.listEntry[data-role="leaf"]').length)
);
if ( listNode.dataset.parent === 'root' ) { return; }
let usedFilterCount = 0; let usedFilterCount = 0;
let totalFilterCount = 0; let totalFilterCount = 0;
let isCached = false; let isCached = false;
@ -399,9 +402,6 @@ const updateListNode = listNode => {
} }
dom.cl.toggle(listNode, 'checked', listLeaves.length !== 0); dom.cl.toggle(listNode, 'checked', listLeaves.length !== 0);
dom.prop(qs$(listNode, ':scope > .detailbar input'), 'checked', listLeaves.length !== 0); dom.prop(qs$(listNode, ':scope > .detailbar input'), 'checked', listLeaves.length !== 0);
dom.text(qs$(listNode, '.nodestats'),
renderNodeStats(listLeaves.length, qsa$(listNode, '.listEntry[data-role="leaf"]').length)
);
dom.text(qs$(listNode, '.leafstats'), dom.text(qs$(listNode, '.leafstats'),
renderLeafStats(usedFilterCount, totalFilterCount) renderLeafStats(usedFilterCount, totalFilterCount)
); );