WebUI: remove deleted torrents even if they are currently filtered out

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.
This commit is contained in:
Carmelo Scandaliato 2024-07-29 04:20:21 -04:00 committed by GitHub
parent 9d494e84bf
commit 642a9c29eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -827,13 +827,11 @@ window.qBittorrent.DynamicTable ??= (() => {
removeRow: function(rowId) {
this.selectedRows.erase(rowId);
const tr = this.getTrByRowId(rowId);
if (tr !== null) {
tr.destroy();
if (this.rows.has(rowId))
this.rows.erase(rowId);
return true;
}
return false;
const tr = this.getTrByRowId(rowId);
if (tr !== null)
tr.destroy();
},
clear: function() {