apply suggestions

This commit is contained in:
tehcneko 2025-04-17 11:17:02 +01:00
commit 1e0ac13be1

View file

@ -97,7 +97,7 @@ window.qBittorrent.DynamicTable ??= (() => {
this.setupVirtualList(); this.setupVirtualList();
}, },
setupVirtualList() { setupVirtualList: function() {
if (!this.useVirtualList) if (!this.useVirtualList)
return; return;
this.table.style.position = "relative"; this.table.style.position = "relative";
@ -979,7 +979,7 @@ window.qBittorrent.DynamicTable ??= (() => {
return tr; return tr;
}, },
updateRowElement(tr, rowId, top) { updateRowElement: function(tr, rowId, top) {
tr.dataset.rowId = rowId; tr.dataset.rowId = rowId;
tr.rowId = rowId; tr.rowId = rowId;
@ -2414,8 +2414,8 @@ window.qBittorrent.DynamicTable ??= (() => {
span = document.createElement("span"); span = document.createElement("span");
td.append(span); td.append(span);
} }
span.textContent = node.renamed;
span.id = fileNameRenamedId; span.id = fileNameRenamedId;
span.textContent = node.renamed;
}; };
}, },
@ -2804,7 +2804,7 @@ window.qBittorrent.DynamicTable ??= (() => {
collapseIcon.addEventListener("click", (e) => { collapseIcon.addEventListener("click", (e) => {
const id = collapseIcon.dataset.id; const id = collapseIcon.dataset.id;
const node = that.getNode(id); const node = that.getNode(id);
if (node) { if (node !== null) {
if (that.isCollapsed(node.rowId)) if (that.isCollapsed(node.rowId))
that.expandNode(node.rowId); that.expandNode(node.rowId);
else else