Skip to content

Commit

Permalink
WebUI: remove deleted torrents even if they are currently filtered out
Browse files Browse the repository at this point in the history
Remove the torrent row regardless of it being visible.

I've also removed the return value because:
* it doesn't appear to be used by any caller;
* other functions (e.g. updateRowData) do not return any value;
* it's not clear whether true refers to the torrent being removed from the list of all torrents or just the visible ones.

Closes #21070.
PR #21071.
  • Loading branch information
cascandaliato authored Jul 29, 2024
1 parent 9d494e8 commit 642a9c2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/webui/www/private/scripts/dynamicTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -827,13 +827,11 @@ window.qBittorrent.DynamicTable ??= (() => {

removeRow: function(rowId) {
this.selectedRows.erase(rowId);
if (this.rows.has(rowId))
this.rows.erase(rowId);
const tr = this.getTrByRowId(rowId);
if (tr !== null) {
if (tr !== null)
tr.destroy();
this.rows.erase(rowId);
return true;
}
return false;
},

clear: function() {
Expand Down

0 comments on commit 642a9c2

Please sign in to comment.