MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / handlePaperCheck

Function handlePaperCheck

deployments/desktop/static/app.js:831–848  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

829}
830
831function handlePaperCheck(event) {
832 const input = event.currentTarget;
833 const number = Number(input.dataset.number);
834 const action = input.dataset.action;
835 const other = document.querySelector(
836 `[data-number="${number}"][data-action="${action === "read" ? "skip" : "read"}"]`
837 );
838
839 if (input.checked && other) other.checked = false;
840
841 state.selected.delete(number);
842 state.skipped.delete(number);
843 const read = document.querySelector(`[data-number="${number}"][data-action="read"]`);
844 const skip = document.querySelector(`[data-number="${number}"][data-action="skip"]`);
845 if (read && read.checked) state.selected.add(number);
846 if (skip && skip.checked) state.skipped.add(number);
847 updateSelectionSummary();
848}
849
850function updateSelectionSummary() {
851 $("readingQueueStat").textContent = state.selected.size;

Callers

nothing calls this directly

Calls 1

updateSelectionSummaryFunction · 0.70

Tested by

no test coverage detected