(type, checkbox)
| 525 | } |
| 526 | |
| 527 | function toggleLocalSelectAll(type, checkbox) { |
| 528 | const set = selectedLocal[type]; |
| 529 | if (!set) return; |
| 530 | const shouldSelect = checkbox && checkbox.checked; |
| 531 | set.clear(); |
| 532 | if (shouldSelect) { |
| 533 | const items = cacheListState[type]?.items || []; |
| 534 | items.forEach(item => { |
| 535 | if (item && item.name) set.add(item.name); |
| 536 | }); |
| 537 | } |
| 538 | syncLocalRowCheckboxes(type); |
| 539 | updateSelectedCount(); |
| 540 | } |
| 541 | |
| 542 | function syncLocalRowCheckboxes(type) { |
| 543 | const body = type === 'image' ? ui.localImageBody : ui.localVideoBody; |
nothing calls this directly
no test coverage detected