Rename property for clarity

This commit is contained in:
Thomas Piccirello 2025-06-08 22:40:25 -07:00
commit 280aa15a90
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View file

@ -310,7 +310,7 @@
const addRowsToTable = (rows, selectedRows) => { const addRowsToTable = (rows, selectedRows) => {
let rowId = 0; let rowId = 0;
const rootNode = new window.qBittorrent.FileTree.FolderNode(); const rootNode = new window.qBittorrent.FileTree.FolderNode();
rootNode.autoCheckFolders = false; rootNode.autoCalculateCheckedState = false;
rows.forEach((row) => { rows.forEach((row) => {
const pathItems = row.path.split(window.qBittorrent.Filesystem.PathSeparator); const pathItems = row.path.split(window.qBittorrent.Filesystem.PathSeparator);
@ -334,7 +334,7 @@
if (folderNode === null) { if (folderNode === null) {
folderNode = new window.qBittorrent.FileTree.FolderNode(); folderNode = new window.qBittorrent.FileTree.FolderNode();
folderNode.autoCheckFolders = false; folderNode.autoCalculateCheckedState = false;
folderNode.rowId = rowId; folderNode.rowId = rowId;
folderNode.path = (parent.path === "") folderNode.path = (parent.path === "")
? folderName ? folderName

View file

@ -151,9 +151,9 @@ window.qBittorrent.FileTree ??= (() => {
class FolderNode extends FileNode { class FolderNode extends FileNode {
/** /**
* Will automatically tick the checkbox for a folder if all subfolders and files are also ticked * When true, the folder's `checked` state will be calculately automatically based on its children
*/ */
autoCheckFolders = true; autoCalculateCheckedState = true;
isFolder = true; isFolder = true;
fileId = -1; fileId = -1;
@ -212,7 +212,7 @@ window.qBittorrent.FileTree ??= (() => {
} }
} }
root.checked = root.autoCheckFolders ? root.checked : TriState.Checked; root.checked = root.autoCalculateCheckedState ? root.checked : TriState.Checked;
root.progress /= root.size; root.progress /= root.size;
root.availability /= root.size; root.availability /= root.size;
} }